Skip to content

Commit

Permalink
Pep 8
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrauz authored and sdrauz committed Jan 7, 2021
1 parent b8202af commit 6b6e2d5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pandapower/build_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,9 @@ def _build_pp_ext_grid(net, ppc, f, t):
add_q_constraints(net, "ext_grid", eg_is, ppc, f, t, delta)
add_p_constraints(net, "ext_grid", eg_is, ppc, f, t, delta)


if "controllable" in net["ext_grid"]:
# if we do and one of them is false, do this only for the ones, where it is false
eg_constrained = net.ext_grid[eg_is][net.ext_grid.controllable==False]
eg_constrained = net.ext_grid[eg_is][net.ext_grid.controllable == False]
if len(eg_constrained):
eg_constrained_bus = eg_constrained.bus
ppc["bus"][eg_constrained_bus, VMAX] = net["ext_grid"]["vm_pu"].values[eg_constrained.index] + delta
Expand Down

0 comments on commit 6b6e2d5

Please sign in to comment.