How can I export Load and Transformers data from PSS/E
I use python to export Bus, Branches, Machines from PSS/E; I write code similar to:
istrings = ['number', 'type', 'area', 'zone', 'status']
ierr, idata = psspy.agenbusint(1,1,istrings)
rstrings = ['base', 'pu', 'kv', 'angle', 'pgen', 'qgen', 'mva', 'percent', 'pmax', 'pmin', 'qmax', 'qmin']
ierr, rdata = psspy.agenbusreal(1,1,rstrings)
cstrings = ['name', 'exname']
ierr, cdata = psspy.agenbuschar(1,1,cstrings)
But I don't know how to export Load and Transformers data from PSS/E.
You can do basically the exact same routine for loads and transformers. Use ALodBusInt, ALodBusChar, etc. for loads and ATrnInt and ATrnChar for transformers.
I've already tried to use AlodBusInt and AlodBusReal, they have many argument but most of them in MVA, i want export P (MW) and Q (MVAr). Thanks!
If you use aLodBusCplx along with the string “MVAACT”, you will get the load outputted in the form “real”-“cplx”j (i.e. 14.13-7.989 j). From there you can just strip the “j”, split the string on the “-“ character, and it will give you your MW and MVAr.
@nyga0082 The aLodBusCplx function should give you an array of complex values, so you shouldn't have to split anything, just use the .real and .imag prop. ie;err, value = psspy.alodbuscplx(...), to get the real and imaginary values of the first bus you would just use value[0].real and value[0].imag