First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
The following algorithm may work:
loop0:
For every busx in the subsystem of interest:
if bus is type 2, continue #skip generator bus
count the number of buses it is connected to #<- this is a loop
only if busx is connected to one bus, add to list those branches containing busx, then extrude such busx.
increase +1 single_bus counter
go back to loop0 until there is no more busx connected to one bus (single_bus counter=0).
2 | No.2 Revision |
The following algorithm may work:
loop0:
For every busx in the subsystem of interest:
if bus is type 2, continue #skip generator bus
count the number of buses it is connected to #<- this is a loop
only if busx is connected to one bus, add to list those branches containing busx, then extrude such busx.
increase +1 single_bus counter
go back to loop0 until there is no more busx connected to one bus (single_bus counter=0).
8/24: I re-wrote rimux's code since it did not work in v.32.C:\fakepath\radial1.gif - click on the link, select the pic icon and rigth-click to download it, rename its extension to .py and run it after loading savnw case. This version does not bypass radial generators, connected to the grid with a transformer.
3 | No.3 Revision |
The following algorithm may work:
loop0:
For every busx in the subsystem of interest:
if bus is type 2, continue #skip generator bus
count the number of buses it is connected to #<- this is a loop
only if busx is connected to one bus, add to list those branches containing busx, then extrude such busx.
increase +1 single_bus counter
go back to loop0 until there is no more busx connected to one bus (single_bus counter=0).
8/24:
I re-wrote rimux's code since it did not work in v.32.C:\fakepath\radial1.gifv.32. - click on I posted the link, select the pic icon and rigth-click to download it, rename its extension to .py and run it after loading savnw case. code at my googledrive site (https://drive.google.com/drive/folders/0B7uS9L2Woq_7YzYzcGhXT2VQYXc) filename = brnradial.py. This version does not bypass radial generators, connected to the grid with a transformer.