Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

run scal_2 twice. First time to initialize it and get total MW values for load and generation and second time to execute the scaling. I load savnw.sav and for area 1 load, scale it 125% and run the code below:

area = 1
sid = 1
psspy.bsys(sid,0,[ 13.8, 500.],1,[area],0,[],0,[],0,[])
# SCAL_2 defined in API manual
moto, totals, ier = psspy.scal_2(sid,0,1,
                                 [0,0,0,0,0],
                                 [0.0,0.0,0.0,0.0,0.0,0.0,0.0]) #initialize for scaling.
# now totals[2] contains total generation in SID=1, which is area1
MWscale = 1.25
loadMW_area1 = totals[1]                            #total load in SID=1
loadMW_new   = loadMW_area1 * MWscale
MVARscale = MWscale * 100.0                     #scale factor in percentage
psspy.scal_2(sid,0,2,
             [_i,1,0,1,0],
             [loadMW_new, totals[2],0.0,totals[4],totals[5],-.0, MVARscale])

run scal_2 twice. First time to initialize it and get total MW values for load and generation and second time to execute the scaling. I load savnw.sav and for area 1 load, scale it 125% and run the code below:below scale to it 125% :

area = 1
sid = 1
psspy.bsys(sid,0,[ 13.8, 500.],1,[area],0,[],0,[],0,[])
# SCAL_2 defined in API manual
moto, totals, ier = psspy.scal_2(sid,0,1,
                                 [0,0,0,0,0],
                                 [0.0,0.0,0.0,0.0,0.0,0.0,0.0]) #initialize for scaling.
# now totals[2] contains total generation in SID=1, which is area1
MWscale = 1.25
loadMW_area1 = totals[1]                            #total load in SID=1
loadMW_new   = loadMW_area1 * MWscale
MVARscale = MWscale * 100.0                     #scale factor in percentage
psspy.scal_2(sid,0,2,
             [_i,1,0,1,0],
             [loadMW_new, totals[2],0.0,totals[4],totals[5],-.0, MVARscale])

run scal_2 twice. First time to initialize it and get total MW values for load and generation and second time to execute the scaling. I load savnw.sav and for area 1 load, run the code below to scale to it 125% :

area = 1
sid = 1
psspy.bsys(sid,0,[ 13.8, 500.],1,[area],0,[],0,[],0,[])
# SCAL_2 defined in API manual
moto, totals, ier = psspy.scal_2(sid,0,1,
                                 [0,0,0,0,0],
                                 [0.0,0.0,0.0,0.0,0.0,0.0,0.0]) #initialize for scaling.
# now totals[2] contains total generation in SID=1, which is area1
MWscale = 1.25
loadMW_area1 = totals[1]                            #total load in SID=1
loadMW_new   = loadMW_area1 * MWscale
MVARscale = MWscale * 100.0                     #scale factor in percentage
psspy.scal_2(sid,0,2,
             [_i,1,0,1,0],
             [loadMW_new, totals[2],0.0,totals[4],totals[5],-.0, MVARscale])