oemof / oemof-solph

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

Multi-period remaining value calculation #1018

Open nailend opened 7 months ago

nailend commented 7 months ago

Describe the bug

Since #982 the remaining value of a component exceeding the optimization horizon is subtracted from the total costs. The remaining costs a determined using the ep_costs from the last investment period (see here) , even if the investment was taken before and with a different value.

I was just told by @eldmum, that increasing the costs in later periods (which normally doesn't happen, due to a learning curve) this affects the costs of the periods before and might even make some investments for free, due to the discounting effects.

Normally this should not have an effect but is definitely worth a note in the documentation.

@jokochems what do you think?

To Reproduce Steps to reproduce the behaviour:

jokochems commented 7 months ago

Well, first of all, you have to say that evaluating the remaining value is an optional thing to do.

Second, I think, while in general you are right about your remark and that edge case that can occur when using a learning curve approach, I don't see a strong argument why you would not be able to see higher ep_costs (of course, by assumption). I guess, this could happen - think of the increased PV and wind costs in the course of last year's energy crisis which was due to commodities such as steel as a major cost driver not underlying this learning curve assumption. So the idea was to keep it generic and oblige the modeler to make reasonable design choices her-/himself.

But I have to admit that I'm not an absolute expert when it comes to financial maths. We can discuss about how to proceed with that and I'd be eager to hear whether there is some sort of "standard" or "recommended" way how to address that. Also, I'm not aware of many models that consider remaining values. The first one that comes into my mind is OSeMOSYS.

eldmum commented 7 months ago

In this publication, a multi-period optimization model has been proposed. The salvage value, in case there is still lifetime after the optimization horizon, is calculated according to the equation here:

image

(Highlighted symbols are decision variables)

$R^{SLVG}_t$ is then discounted to present value by multiplying it with $(1 + r)^{(number of years - 1)}$.

jokochems commented 7 months ago

Thanks @eldmum. I'll need to have a closer look into that slide and the paper.

I tried to keep it simple and linear and my idea was to integrate a salvage value, coming from a simple NPV resp. annuity calculation.

I don't like the idea of introducing binary variables as a general thing. This will increase model complexity which is critical for large-scale long-term multi-period models.

jokochems commented 7 months ago

Just to add:

Though I introduced it, I'm not really using this feature. So feel free to draft a solution if you can. - I'm sorry, but I really don't have any capacities for development at the moment.

p-snft commented 7 months ago

There shouldn't be any options that come for free or at negative costs. The model would seek to deploy them to a pretty much unlimited extend.

If this is the case, the optimal solution is to invest. If you do not set bounds, the problem is unbound. I would just allow it.