From 6b6e2d58d7b65dd44ab5a1a7c4d0d5bfc5bf5547 Mon Sep 17 00:00:00 2001 From: sdrauz Date: Thu, 7 Jan 2021 11:21:22 +0100 Subject: [PATCH] Pep 8 --- pandapower/build_gen.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandapower/build_gen.py b/pandapower/build_gen.py index 5ae1bb90c..687619c73 100644 --- a/pandapower/build_gen.py +++ b/pandapower/build_gen.py @@ -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