Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The TOTALS(2) element is an output variable for the the OLD subsystem load value. If you would like to retrieve the NEW load MW total of your subsystem, use the psspy.alodbuscplx function.

For example:

import psspy
_i, _f = psspy.getbatdefaults()

# Setup subsystem
psspy.bsys(1,0,[0.0,0.0],0,[],1,[126389],0,[],0,[])

# Scale load to 20 MW using constant P/Q ratio
ierr, totals, motors = psspy.scal_2(1, 0, 0, [0,1,0,1,0],[20.0,_f,_f,_f,_f,_f,_f])

# Print old load value
print 'OLD LOAD: {} MW'.format(round(totals[1],0))

# Print new load value
ierr, load = psspy.alodbuscplx(1, 1, 'TOTALNOM')
print 'NEW LOAD: {} MW'.format(round(load[0][0].real,0))