First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version | asked 2018-08-07 13:57:59 -0600 Anonymous |
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)