Hello,
I have been trying to set up a multi period investment model in oemof.solph. I want to model a district heating system with both power to heat and CCGT as Thermal sources. Currently I am struggling with limiting the overal nominal value of my pth component over multiple periods. Assuming that I only have the space for 50 MW, I want the model to consider this as an overall constraint.
energysystem.add(
Converter(
label="pth",
inputs={bel: Flow()},
outputs={
bth: Flow(
nominal_value=solph.Investment(
maximum=10e3,
existing=5e3,
ep_costs=500,
lifetime=30,
age=28,
interest_rate=0.02,
),
variable_costs=0.1,
)
},
conversion_factors={bel: 0.99},
)
)
I know that I can limit the number of additional capacity/nominal_value per period using maximum=10e3. However, how do I include the constraint of 50e3/50MW total capacity installed over all periods?
I tried using the following code based on this link with no success:
flow_with_keyword = {('pth', 'bth'), flow}
model = solph.constraints.generic_integral_limit(
model, "nominal_value", flow_with_keyword, limit=50e3)
Since I could not find anything online I wanted to ask here in the forum. Thanks in advance.
Michel