Ask Your Question
0

How to determine bus or a plant code?

asked 2014-03-06 05:20:23 -0500

sagar gravatar image

I want to determine whether a plant is hiting reactive limit or not..

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-03-06 10:38:51 -0500

jconto gravatar image

updated 2014-03-06 10:39:49 -0500

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

Stats

Asked: 2014-03-06 05:20:23 -0500

Seen: 2,067 times

Last updated: Mar 06 '14