Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Just a thought, if understand the question right, since you mention chsb and output files also (you mean OUT files? They are for dynamic studies).

After forming a bus subsystem, say the sid is 7. Then you can use the API (Chapter 8), "ierr, buses = abuscount(sid, flag)", to get the number of buses in the said subsystem.

So, say, the subsystem sid is 7 and you want all the buses (including the not in servie ones), then, something like:

import psspy

# sid=7, volt range is 275kV to 400kV    
psspy.bsys(7,1,[ 275., 400.],0,[],0,[],0,[],0,[])

# all buses in the subsystem
_, busCount = psspy.abuscount(7, 2)

print("No. of targeted buses = " + str(busCount))

Just a thought, if I understand the question right, since you mention chsb and output files also (you mean OUT files? They are for dynamic studies).

After forming a bus subsystem, say the sid is 7. Then you can use the API (Chapter 8), "ierr, buses = abuscount(sid, flag)", to get the number of buses in the said subsystem.

So, say, the subsystem sid is 7 and you want all the buses (including the not in servie ones), then, something like:

import psspy

# sid=7, volt range is 275kV to 400kV    
psspy.bsys(7,1,[ 275., 400.],0,[],0,[],0,[],0,[])

# all buses in the subsystem
_, busCount = psspy.abuscount(7, 2)

print("No. of targeted buses = " + str(busCount))