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

Ask Your Question
0

API to get Bus Numbers

asked Sep 30 '0

lmcqueen gravatar image

Is there a Python API that gets the bus numbers that satisfy a voltage criteria (say below 0.90 p.u.) and returns it in an array? I understand that there is activity VCHK activity in PSS/E but the its result does not look like an array.

1 answer

Sort by » oldest newest most voted
0

answered Oct 2 '0

SqFKYo gravatar image

The easiest way would be to utilize the numpy Python package and make a filter based on the voltages. First you ask the pu-voltages of the buses and the numbers of the buses: (PSSE33 API here)

import numpy as np
_, (voltages, ) = psspy.abusreal(string='PU')
_, (buses, ) = psspy.abusint(string='NUMBER')
voltages = np.array(voltages)
buses = np.array(buses)
print(buses[voltages < 0.9])
link

Comments

Thank you @SqFKYo!

lmcqueen gravatar imagelmcqueen (Oct 5 '0)

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: Sep 30 '0

Seen: 899 times

Last updated: Oct 02 '20