First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
I used to organize components like generators into tables based on their areas with the following script:
# Generators in subsystem 0
psspy.bsys(0,0,[ 0.38, 525.],0,[],0,[],1,[12],0,[])
ierr, (bus_arr, area_arr) = psspy.agenbusint(0, flag=4, string=["NUMBER", "AREA"])
# Group generators by areas
barras_por_areas = {}
for bus, area in zip(bus_arr, area_arr):
barras_por_areas[area] = barras_por_areas.get(area, []) + [bus]
# Make a table of generators ()
columns = 10
offset = 0
for area in barras_por_areas:
for i, bus in enumerate(barras_por_areas[area]):
psspy.growdiagram_2(1,1,["BU {}".format(bus)], i % columns, -offset - i // columns,[0,1,1,1,1,1,1,1,1,1,1,1,1])
offset += i // columns + 2 # Doble row to skip to another area
Is not a proper SLD but it helps as a visualization tool to easily check the data.