e2nIEE / pandapower

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

oos-elements in create_generic_coordinates #630

Open dlohmeier opened 4 years ago

dlohmeier commented 4 years ago

I just realized that when setting parts of a network out of service (line and buses), the function create_generic_coordinates() raises an exception. This is the code that raises the issue:

gnet = copy.deepcopy(net)
gnet.bus = gnet.bus[gnet.bus.in_service == True]
graph, meshed, roots = build_igraph_from_pp(gnet, respect_switches)

If there are oos-lines in the net connecting oos-buses, they will not be neglected in the graph creation, but the respective nodes were not added to the graph before (as the bueses were already removed). So, how should this be treated? There is the option to not exclude oos-buses or to also exclude all oos-branches (i.e. also trafos). This could also just be added as a parameter to the function...

jhmenke commented 4 years ago

That's definitely not intended behaviour. I think there should be a general switch that defines whether to include or exclude out of service elements.

rbolgaryn commented 4 years ago

Hi @dlohmeier ,

the function create_nxgraph has a parameter "include_oos_elements". Does the igraph function have a similar parameter?

dlohmeier commented 4 years ago

No, it doesn't, that should be exactly the switch that Jan-Hendrik was pointing at.