Fix EQ constraint in case no hydro exist
This commit is contained in:
parent
bc8ac24c33
commit
9e61e30ff4
@ -216,6 +216,7 @@ def add_EQ_constraints(n, o, scaling=1e-1):
|
||||
.T.groupby(ggrouper, axis=1)
|
||||
.apply(join_exprs)
|
||||
)
|
||||
if not n.storage_units_t.inflow.empty:
|
||||
lhs_spill = (
|
||||
linexpr(
|
||||
(
|
||||
@ -228,6 +229,8 @@ def add_EQ_constraints(n, o, scaling=1e-1):
|
||||
)
|
||||
lhs_spill = lhs_spill.reindex(lhs_gen.index).fillna("")
|
||||
lhs = lhs_gen + lhs_spill
|
||||
else:
|
||||
lhs = lhs_gen
|
||||
define_constraints(n, lhs, ">=", rhs, "equity", "min")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user