Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The general way is the way which @perolofl said, you can also record the changes in the .dyr and all the changes in your simulation. In especial case: for example, if you want to change the active and reactive power of the generator at bus 10 to 30 and 50, you can use the following code

psspy.machine_chng_2(10,r"""1""",[_i,_i,_i,_i,_i,_i],[_f, 50.0,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) #change the Q to 50 psspy.machine_chng_2(10,r"""1""",[_i,_i,_i,_i,_i,_i],[ 30.0,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) #change the P to 30 Based on the above codes, each of the _i, and -f are as follows:

Bus Number, Bus Name, Id, Term Node Num , Term Node Name, Area Num , Area Name, Zone Num ,Zone Name, Code VSched (up), Remote Bus Number, In Service PGen (MW), PMax (MW), PMin (MW), QGen (Mvar), QMax (Mvar), QMin (Mvar), Mbase (MVA), R Source (up), X Source (up), RTran (pu)

                                            1

The general way is the way which @perolofl said, you can also record the changes in the .dyr and all the changes in your simulation. In especial case: for example, if you want to change the active and reactive power of the generator at bus 10 to 30 and 50, you can use the following code

psspy.machine_chng_2(10,r"""1""",[_i,_i,_i,_i,_i,_i],[_f, 50.0,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) #change the Q to 50 psspy.machine_chng_2(10,r"""1""",[_i,_i,_i,_i,_i,_i],[ 30.0,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) #change the P to 30 Based on the above codes, each of the _i, and -f are as follows:

Bus Number, Bus Name, Id, Term Node Num , Term Node Name, Area Num , Area Name, Zone Num ,Zone Name, Code VSched (up), Remote Bus Number, In Service PGen (MW), PMax (MW), PMin (MW), QGen (Mvar), QMax (Mvar), QMin (Mvar), Mbase (MVA), R Source (up), X Source (up), RTran (pu)

                                            1