You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want the three energy storages to share an investment limit and implemented this using solph.constraints like this:
model = Model(es)
solph.constraints.investment_limit(model, limit=100)
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: