How to determine bus or a plant code?
I want to determine whether a plant is hiting reactive limit or not..
add a comment
First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
I want to determine whether a plant is hiting reactive limit or not..
The following python code will check the Q-limit state of a machine:
def maclimits(ibus,id):
ierr, q = psspy.macdat(ibus, id, 'Q')
ierr, qmax = psspy.macdat(ibus, id, 'QMAX')
ierr, qmin = psspy.macdat(ibus, id, 'QMIN')
answer = 0 #machine is within reactive limits
if q >= qmax:
answer = 1 #machine hits upper reactive limit
elif q <= qmin:
answer = -1 #machine hits lower reactive limit
return answer
#usage, having savnw loaded in PSSe:
qlimit = maclimits(3018,'1')
print qlimit
Asked: 2014-03-06 05:20:23 -0500
Seen: 2,133 times
Last updated: Mar 06 '14