0

Get the number of buses targeted by BSYS

I am running a simulation using psspy.bsys(2, 1, [3, 210]) to create a subsystem of buses with:

  • sid=2
  • Use KV values
  • Array specifying the range, [3, 210]

but according to the documentation, there are others way to create the subsystem.

I was wondering whether there is a way to know how many buses (the number) has been targeted by such function. I was expecting that function to return the number of buses targeted but it returns just error codes.

This doubt is because when monitoring multiple measures (VOLT, BSFREQ,...) using psspy.chsb happens to output everything indistinctly to the same file defined in psspy.strt()

Do you know if there is such a way to "output every chsb" to different output files? If not, is there any way to find out how many buses were targeted by bsys?

Thank you for any help you can provide. Tomás.

toderesa97's avatar
27
toderesa97
asked 2019-05-15 05:26:08 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

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))
drsgao's avatar
76
drsgao
answered 2019-05-15 06:02:05 -0500, updated 2019-05-15 06:02:24 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer