oemof / oemof-solph

A model generator for energy system modelling and optimisation (LP/MILP).
https://oemof.org
MIT License
303 stars 127 forks source link

Investment: Combination of offset and existing #858

Open p-snft opened 2 years ago

p-snft commented 2 years ago

Currently, it is not possible to combine an offset and an existing capacity when investing into a flow. This makes sense, if you think of the offset as the abscissa of the linear cost function. If there is an existing size, the offset is already paid for. However, the offset could be generalised so that adding capacity has a certain cost of set.

PS: Strictly speaking, the current investment model is convex.

joroeder commented 2 years ago

To be honest, I didn't understand exactly all what you wrote 😊

Currently, it is not possible to combine an offset and an existing capacity when investing into a flow.

Yes

This makes sense, if you think of the offset as the abscissa of the linear cost function. If there is an existing size, the offset is already paid for.

Yes, but it would be possible to create a separate Flow / Transformer for the existing capacity, so that a new investment can be modeled again with the offset.

However, the offset could be generalised so that adding capacity has a certain cost of set.

You mean, like piecewise-linear cost function and so on? This would be very nice. In the end, you can already do that by defining multiple InvestmentFlows with offset and with different minimum and maximum investment values, which are the single segments of a piecewise linear function. However, this is not very convenient.

Or do you mean, there should be the combination of existing and offset?

PS: Strictly speaking, the current investment model is convex.

Why? If there is a binary decision variable in the investment flow, then, to my understanding this is nonconvex. In the case of existing and without the offset-investment, I agree :)

p-snft commented 2 years ago

Background: I want to optimise an energy system with arbitrary values for the existing capacity. It feels awkward to model it as a separate flow with zero capacity, if it not present.

(Let's just ignore the petty discussion about what convex means.)