Investment variation & Investment during year

Hello Community,

I am currently simulating the German electricity and heat market in a simplified form with some renewable and conventional power plants from 2020 to 2050. Now I have 2 problems:

  1. Over time, especially for wind and PV the investment costs changes and for lignite the variable costs changes too.
    For the input of the variable_costs I used a DataFrame, so for each timestamp there are different costs. But for the ep_costs (in oemof.solph.options.Investment) no floats can be used.
    Is there any way to vary the investment costs over time?

this Works:
variable_costs = powerplant_parameter[(‘Lignite’,‘variable costs’)]

this not:
ep_costs =powerplant_parameter[(‘Lignite’,‘epc’)]
.
.
AttributeError: ‘Series’ object has no attribute ‘is_expression_type’

  1. Currently all investments are made at the beginning of the first year.
    Is it possible:
    2.1
    to limit the maximum investment per year? Or to set maximum addition rates?
    Unfortunately, the “maximum” parameter in the investment function only limits completely.
    2.2
    to make the investment only when it is necessary. For example, if the demand increases steeply only in the 5th year, it is not necessary to invest the money already at the beginning. Or if the investment amounts are much lower in the 10th year.

The output of the model.solver_results is dated 1/1/2020 00:00:00, so I assume that there can be multiple investment periods.

My first idea was to create a loop for each year and import the new power plant output in the new year. But then it is not possible to plan investments for the future (nuclear and coal phase out).

Thank you for your help,
Philipp

Hello Philipp,

as of now, it is only possible to invest once at the beginning of each simulation run (t=0) in oemof.solph. A feature which allows for multi-period investments in on the way and will be available in a month or so (see: Features/periods by jokochems · Pull Request #750 · oemof/oemof-solph · GitHub).

Now let’s have a look at the nitty-gritty of your question:

  1. You can pass a timeseries of variable costs. Please ensure that this has the same length as your energy system’s timeindex. Converting it to a numpy array (i.e. exexuting series.values where series is of type pd.Series) should be the best way to use in the assignment. The investment annuities, i.e. ep_cost may only be given as a scalar value (float or int). The multi-period investment feature will allow to pass ep_cost as a sequence (which will be indexed by periods, e.g. years).
    2.1 In principle, you can impose a maximum investment limit for your entire optimization horizon. There is no way (yet) to limit the investments within a certain period, e.g. year. The multi-period investment feature will allow to do that.
    2.2 Yeah, that is the thing with planning your system today for 2050. This does not make so much sense.

No, you are wrong to assume that there are multiple investment periods in your moel. What you get only replicates what you have passed as a timeindex. And 1/1/2020 00:00:00 is probably your first timestep (for pyomo under the hood it is t=0) where the investments occur.

What you figured is a workaround, I have been using as well. You can introduce some sort of rolling window investments by putting a four loop around your model and passing the investment decisions taken in one iteration to the next. To take future timesteps into account, you have to add kind of a large overlap. Dependent on your system size, this may make your model quite computationally-intense to solve.

Best regards,
Johannes

1 Like

Thank you very much Johannes!
I just implemented your suggestion with the rolling window investment and it works well.
Maybe I will try the new multi-period investment when it is available. I am very interested to see if the simulation is improved significantly.
Best regards!
Philipp

Text and images licensed under CC BY 4.0Data licensed under CC0 1.0Code licensed under MITSite terms of serviceOpenmod mailing listOpenmod wiki.