File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -450,11 +450,11 @@ def _add_battery_constraints(self):
450450 p_demand = min (bat .c_max * self .time_series .dt [t ] / 3600. , bat .p_demand [t ])
451451 # two alternative constraints, only one is active:
452452 # constraint option 1: charge energy tries to reach min charge energy parameter
453- self .problem += (self .variables ['c' ][i ][t ] + self .variables ['p_demand_pen' ][i ][t ] \
453+ self .problem += (self .variables ['c' ][i ][t ] + self .variables ['p_demand_pen' ][i ][t ]
454454 + self .M * self .variables ['z_p_demand' ][i ][t ] >= p_demand )
455455 # constraint option 2: charge energy tries to reach energy to fill the battery to s_max
456- self .problem += (self .variables ['c' ][i ][t ] + self .variables ['p_demand_pen' ][i ][t ] \
457- + self .M * (1 - self .variables ['z_p_demand' ][i ][t ]) \
456+ self .problem += (self .variables ['c' ][i ][t ] + self .variables ['p_demand_pen' ][i ][t ]
457+ + self .M * (1 - self .variables ['z_p_demand' ][i ][t ])
458458 - (self .batteries [i ].s_max - self .variables ['s' ][i ][t ]) >= 0. )
459459 elif bat .c_min > 0 :
460460 # in time steps without given charging demand, apply normal lower bound:
You can’t perform that action at this time.
0 commit comments