How to retrieve generation data from Dynamic studies?
Hello everyone, im trying to retrieve both load data and generation data when running dymanics. And the code is running in increments with accordance to time delay. So every 0.017 seconds, it outputs generation and load. My load data retrieval is working in that the load is changing with response to tripped lines in the system. My generation stays constant which should not be the case. Anyway to retrieve generation in response to time in dynamics, is there any API out there and I want it so i can look at every generator in a particular area of the system instead of pre definig each generator.
[ierr, rval_C] = psspy.chnval(GL_C)
[ierr, rval_L] = psspy.chnval(GL_L)
C_freq = 60*(1 + rval_C)
L_freq = 60*(1 + rval_L)
[ierr, sysload_LI = psspy.ardat(#, 'LOAD')
[ierr, sysload_N] = psspy.ardat(#, 'LOAD')
[ierr, sysload_D] = psspy.ardat(#, 'LOAD')
[ierr, sysgen_N] = psspy.ardat(#, 'GEN')
[ierr, sysgen_L] = psspy.ardat(#, 'GEN')
sysgen_TOT = sysgen_N.real+sysgen_L.real
sysload_TOT = sysload_N.real+sysload_D.real+sysload_L.real
my_print(print_file, 'TIME NOW: {:.3f} SEC FREQ (HZ): [ {:.2f} IN C {:.2f} IN L {:.2f} GENERATION ] LOAD (MW): [ {:.2f} ]' , [tm_runto, C_freq, L_freq, sysgen_TOT, sysload_TOT])
TIME NOW: 0.017 SEC FREQ (HZ): [ 59.98 IN C 59.98 IN L 11921.08 GENERATION ] LOAD (MW): [ 15647.25 ]
TIME NOW: 0.033 SEC FREQ (HZ): [ 59.95 IN C 59.96 IN L 11921.08 GENERATION ] LOAD (MW): [ 15609.39 ]
TIME NOW: 0.050 SEC FREQ (HZ): [ 59.93 IN C 59.93 IN L 11921.08 GENERATION ] LOAD (MW): [ 15572.50 ]
TIME NOW: 0.067 SEC FREQ (HZ): [ 59.92 IN C 59.90 IN L 11921.08 GENERATION ] LOAD (MW): [ 15528.23 ]
TIME NOW: 0.083 SEC FREQ (HZ): [ 59.90 IN C 59.88 IN L 11921.08 GENERATION ] LOAD (MW): [ 15474.71 ]
TIME NOW: 0.100 SEC FREQ (HZ): [ 59.88 IN C 59.85 IN L 11921.08 GENERATION ] LOAD (MW): [ 15411.50 ]
TIME NOW: 0.117 SEC FREQ (HZ): [ 59.87 IN C 59.83 IN L 11921.08 GENERATION ] LOAD (MW): [ 15340.69 ]
TIME NOW: 0.133 SEC FREQ (HZ): [ 59.86 IN C 59.81 IN L 11921.08 GENERATION ] LOAD (MW): [ 15265.59 ]
TIME NOW: 0.150 SEC FREQ (HZ): [ 59.85 IN C 59.79 IN L 11921.08 GENERATION ] LOAD (MW): [ 15189.46 ]
TIME NOW: 0.167 SEC FREQ (HZ): [ 59.85 IN C 59.77 IN L 11921.08 GENERATION ] LOAD (MW): [ 15114.50 ]
TIME NOW: 0.183 SEC FREQ (HZ): [ 59.84 IN C 59.75 IN L 11921.08 GENERATION ] LOAD (MW): [ 15041.96 ]
TIME NOW: 0.200 SEC FREQ (HZ): [ 59.84 IN C 59.74 IN L 11921.08 GENERATION ] LOAD (MW): [ 14972.00 ]
TIME NOW: 0.217 SEC FREQ (HZ): [ 59.84 IN C 59.73 IN L 11921.08 GENERATION ] LOAD (MW): [ 14903.87 ]