Skip to content

How to get an objective function? I want to maximize/minimize stuff. #5

@gruijter

Description

@gruijter

I am trying to model a home battery solution, where I want to optimize profit from buying/selling energy.
The result should charge the battery on cheap hours, and sell it on expensive hours, given the constraints.

The battery has a minimum and maximum capacity (SOC: 0 ... 5 kWh)
The charging / discharging speed has a minimum and a maximum (load: -2 ... 2 kW)
The energy prices vary per hour, and are known 24 hours in advance. (price[1] .... price[24])

What I am able to do is model the SOC and LOAD constraints. And I can model the profit.hour[n] = load.hour[n] x price.hour[n].
The total profit (objective function) would be profit.hour[1] + profit.hour[2] + ..... + profit.hour[24]

But now the big issue: How do I optimize to get maximum profit? (or alternatively minimize for cost)? I would like to see for each hour what the optimum load should be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions