Open kbrcke opened 1 month ago
Yes, this is a bug. The constraint just assumes that every Investment{Type}Block
has investment_costs
if it exists. However, this is not the case. My suggested solution would be to follow that assumption and create the variable during initialisation of the InvestmentFlowBlock
.
Hi,
I have an energy system built with oemof solph that comprises amongst other things an three energy storages implemented like this:
I want the three energy storages to share an investment limit and implemented this using solph.constraints like this:
When solving the system, i get the following error message:
AttributeError: 'InvestmentFlowBlock' object has no attribute 'investment_costs'
This only occurs when no flow in the system has an investment assigned to it. My current workaround is to assign at least one investment into flows but with ep_costs = 0. However, I guess this is a solph bug, I wanted to report here.
Cheers, Karo