pot_generation = n.generators_t["p_max_pu"].loc[:,n_obj_generators_wind] * n.generators["p_nom"].loc[n_obj_generators_wind]
act_generation = n.model["Generator-p"].loc[:,n_obj_generators_wind]
curtailment= -(- act_generation + pot_generation)
sum_curtailemnt =curtailment.sum()
n.model.objective + sum_curtailemnt
With pot_generation -->
Generator wind-2-SouthWest wind-3-Central wind-4-North \
snapshot
2019-01-01 00:00:00 0.840 0.126000 0.039667
2019-01-01 01:00:00 0.970 0.123333 0.045667
act_generation -->
Variable (snapshot: 25, Generator: 5)
-------------------------------------
[2019-01-01 00:00:00, wind-2-SouthWest]: Generator-p[2019-01-01 00:00:00, wind-2-SouthWest] ∈ [-inf, inf]
[2019-01-01 00:00:00, wind-3-Central]: Generator-p[2019-01-01 00:00:00, wind-3-Central] ∈ [-inf, inf]
[2019-01-01 00:00:00, wind-4-North]: Generator-p[2019-01-01 00:00:00, wind-4-North] ∈ [-inf, inf]
curtailment -->
LinearExpression (snapshot: 25, Generator: 5):
----------------------------------------------
[2019-01-01 00:00:00, wind-2-SouthWest]: +1 Generator-p[2019-01-01 00:00:00, wind-2-SouthWest] - 0.84
[2019-01-01 00:00:00, wind-3-Central]: +1 Generator-p[2019-01-01 00:00:00, wind-3-Central] - 0.126
[2019-01-01 00:00:00, wind-4-North]: +1 Generator-p[2019-01-01 00:00:00, wind-4-North] - 0.03967
sum_curtailemnt -->
LinearExpression
----------------
+1 Generator-p[2019-01-01 00:00:00, wind-2-SouthWest] + 1 Generator-p[2019-01-01 00:00:00, wind-3-Central] + 1 Generator-p[2019-01-01 00:00:00, wind-4-North] - 2958 ..
Does anyone has an idea which mistake I have?
Thanks, Frank