Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If I am understanding your question correctly, I would do something along the lines of the following:

total_mvar = 0
for i in range(1,8):
    ierr, steps, mvar = psspy.swsblk(bus, block)
    total_mvar = total_mvar + steps * mvar

psspy.report('Total MVAR at bus ' + str(bus) + ': ' + str(total_mvar) + '\n')

This (untested, hasty code) takes a bus and adds up all the switched shunt support on it. You would still need to add in any fixed shunts to find the actual VAR support on the bus. This could probably be done with inifxs(), nxtfxs(), and fxsdt1().

You could wrap this up in a nice chunk of code, providing a simple list of buses, and you could automate the process pretty easily.

As far as for generators, it wouldn't be too hard to do something similar to the capacitor code above.

If I am understanding your question correctly, I would do something along the lines of the following:

total_mvar = 0
for i block in range(1,8):
    ierr, steps, mvar = psspy.swsblk(bus, block)
    total_mvar = total_mvar + steps * mvar

psspy.report('Total MVAR at bus ' + str(bus) + ': ' + str(total_mvar) + '\n')

This (untested, hasty code) takes a bus and adds up all the switched shunt support on it. You would still need to add in any fixed shunts to find the actual VAR support on the bus. This could probably be done with inifxs(), nxtfxs(), and fxsdt1().

You could wrap this up in a nice chunk of code, providing a simple list of buses, and you could automate the process pretty easily.

As far as for generators, it wouldn't be too hard to do something similar to the capacitor code above.