Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Your solution is rather odd.

Here is my proposal:

ierr,plants = psspy.agenbusint(sid=-1, flag=3, string=['NUMBER','TYPE'])
for ibus,code in zip(*plants):
    if code < 2 or code > 3: continue
    ierr, cmpval = psspy.gendat(ibus)
    if ierr == 3:
        psspy.bus_chng_4(ibus,0,[1])