Skip to content

Commit

Permalink
Merge pull request e2nIEE#1368 from friederikemeier/develop
Browse files Browse the repository at this point in the history
Making OPF_FLOW_LIM for pypower OPF accessible through the kwargs
  • Loading branch information
SteffenMeinecke authored Nov 15, 2021
2 parents e47fc8e + 37acde8 commit 3fba410
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pandapower/optimal_powerflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ def _optimal_powerflow(net, verbose, suppress_warnings, **kwargs):
ac = net["_options"]["ac"]
init = net["_options"]["init"]

ppopt = ppoption(VERBOSE=verbose, OPF_FLOW_LIM=2, PF_DC=not ac, INIT=init, **kwargs)
if not "OPF_FLOW_LIM" in kwargs:
kwargs["OPF_FLOW_LIM"] = 2

ppopt = ppoption(VERBOSE=verbose, PF_DC=not ac, INIT=init, **kwargs)
net["OPF_converged"] = False
net["converged"] = False
_add_auxiliary_elements(net)
Expand Down

0 comments on commit 3fba410

Please sign in to comment.