Skip to content

Commit 3780cdd

Browse files
committed
linted code
1 parent 9c122f2 commit 3780cdd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/optimizer/optimizer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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:

0 commit comments

Comments
 (0)