Open p-snft opened 3 months ago
The merged branch was not finalised. Continues in https://github.com/oemof/oemof-solph/pull/1111.
For the discussion how we implement this in a new way, we came from the problem formulation (how would that be maintainable) and still need to define the API details.
The current API only allows scalars, I'd change this:
Investment(
maximum=inf, # minimum_addition=list()
minimum=0, # minimum_addition=list()
ep_costs=0, # we directly take the numbers from this sequence
existing=0, # superseded by minimum_capacity[0]
nonconvex=False,
offset=0,
overall_maximum=None, # replace by maximum_capacity=list()
overall_minimum=None, # replace by minimum_capacity=list()
lifetime=None, # list (in periods)
age=0, # not needed anymore
interest_rate=0, # not needed anymore
fixed_costs=None, # not needed anymore
custom_attributes=None,
)
For the lifetime, lifetime[0]
gives lifetime of minimum_capacity[0]
(which is the existing), lifetime[1]
of minimum_addition[0]
and so forth. The number of indexes will be the same as minimum_addition[-1]
does not need a lifetime any more.
What do you think? (Also asking @mco-sch, who has used the feature in the current shape.)
Discounting functionality is not actually needed, as we allow time series anyway. So, we can remove code without reducing functionality. (Users should be able to calculate discounting externally. On the long run, we could also provide something in oemof.tools.)
At the user/dev meeting in Oldenburg, we agreed to go one step further. Investments should accept a time series of periodical costs for the investments. Changing capacities can be constrained using constraints linking the years, e.g. “capacity of this investment needs to be constant for fifteen years”.