e2nIEE / pandapower

Convenient Power System Modelling and Analysis based on PYPOWER and pandas
https://www.pandapower.org
Other
881 stars 484 forks source link

XWards: auxiliary buses are not removed from net if the load flow did not converge #67

Closed rbolgaryn closed 7 years ago

rbolgaryn commented 7 years ago
XWard elements create dummy buses for the load flow, that are cleaned up afterwards.
However, if the load flow does not converge, those buses end up staying in the net and don't get
removed. This can potentially lead to thousands of dummy buses in net.

See test in commit b418d43

lthurner commented 7 years ago

Good catch. The _clean_up function removes all intermediate buses: https://github.com/lthurner/pandapower/blob/develop/pandapower/powerflow.py#L83 It should be called also when the power flow does not converge. Can you implement that?

rbolgaryn commented 7 years ago

fixed in commit 9801364 - _clean_up is called when loadflow doesn't converge, using an optional argument res=False.