Investment planning

Hi,

First I want to thank all oemof developers to establish this great framwework and forum.

Currently I am trying to optimsie an expansion planning with oemof. Therefore there is the need to include investment points e.g in the future and also tell the model to introduce certain technologies not before a point in time. To begin with, I tried to feed in the investment costs at certain timesteps via csv file which did not work giving me an error:

_ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()._`

Is this problem solvable within oemof?

Thank you very much for your help.

Best regards,
Lukas

:grinning:

We need to know where the error comes from, so you should post a little more of the error message.

As I understand it, it should be possible. But the ep_costs is a float not a sequence as you can see here:

https://oemof.readthedocs.io/en/stable/api/oemof.solph.html#oemof.solph.options.Investment

This could be the cause of your error. But if I understand your problem the right way you could use the max attribute of the flow which contains the Investment object. The max attribute is a sequence and could be set to 0 for the first half of the year and 1 for the second half. But you have to think about how to calculate the ep_costs in that case. This is just one idea and it depends on the model context which I do not know.

Thank you very much for your help Uwe.

You are right the error came from ep_costs which cannot be handled as sequence. The max function is great to decide about future investment times, but the problem remains that the ep_costs cannot be adjusted for a certain point in time (following the timesteps), as you already mentioned.

Do you think it is possible to modify ep_costs that far, that it can be used as a sequence?

Thank you very much for your consideration.

Best regards,
Lukas