First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

Get the number of buses targeted by BSYS

asked May 15 '19

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.

1 answer

Sort by » oldest newest most voted
1

answered May 15 '19

drsgao gravatar image

updated May 15 '19

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))
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: May 15 '19

Seen: 1,150 times

Last updated: May 15 '19