Ask Your Question
0

Get the number of buses targeted by BSYS

asked 2019-05-15 05:26:08 -0500

toderesa97 gravatar image

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.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2019-05-15 06:02:05 -0500

drsgao gravatar image

updated 2019-05-15 06:02:24 -0500

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))
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2019-05-15 05:26:08 -0500

Seen: 1,084 times

Last updated: May 15 '19