Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do you output the load of the bus and store it as a variable

In the API manual, psspy.scal_2 controls the scalable load option in PSSE. I don't know how to output the value and store it as a variable? Like using an object/array totals.real. In the manual it says TOTALS(2) is associated with the load MW total. Is this right or is there another code that returns the value of the scabale load. Thank you. The error output is displayed below: AttributeError: 'list' object has no attribute 'real'

 psspy.bsys(1,0,[0.0,0.0],0,[],1,[126389],0,[],0,[])
 [ierr,totals,moto]=psspy.scal_2(1,0,1,[0,0,0,0,0],[0.0,0.0,0.0,0.0,0.0,0.0,0.0])
 totals=[0,1,0,0,0,0,0,0,0,0,0]
 totalz=totals.real
 output='LOAD: {} MW'.format(round(totalz,0))
 print(output)