Skip to content

Commit

Permalink
added warning message when multiple slacks are changed to gens 🐑
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Schaefer committed Sep 29, 2019
1 parent 7b09ba6 commit a20587a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pandapower/auxiliary.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ def _check_connectivity_opf(ppc):
# if slack is in reachable other slacks are connected to this one. Set it to Gen bus
demoted_slacks = list(intersection - {slack})
ppc['bus'][demoted_slacks, BUS_TYPE] = PV
logger.warning("Multiple connected slacks in one area found. This would probably lead to non-convergence "
"of the OPF. I'll change all but one slack (ext_grid) to gens. To avoid undesired "
"behaviour, rather convert the slacks to gens yourself and set slack=True for one of them.")

isolated_nodes, pus, qus, ppc = _set_isolated_nodes_out_of_service(ppc, bus_not_reachable)
return isolated_nodes, pus, qus
Expand Down

0 comments on commit a20587a

Please sign in to comment.