Ask Your Question
0

API to get Bus Numbers

asked 2020-09-30 09:19:17 -0600

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.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2020-10-02 02:17:25 -0600

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

Comments

Thank you @SqFKYo!

lmcqueen gravatar imagelmcqueen ( 2020-10-04 20:12:57 -0600 )edit

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: 2020-09-30 09:19:17 -0600

Seen: 796 times

Last updated: Oct 02 '20