First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
This should get you started. The following code will give you a string variable "temp" with the solution text. Now you just have to step through it and count the tap changes for each transformer.
import redirect, sys, StringIO
# Redirect the output to a string, solve, then reset output
redirect.psse2py()
sys.stdout = temp = StringIO.StringIO()
psspy.fnsl([1,0,0,1,1,0,99,0])
redirect.py2psse()
# Convert temp to a normal string
temp = "" + temp.getvalue()
# Insert code to analyse the "temp" string and count tap changes
# (This will differ depending on your PSSE version)
print temp
2 | No.2 Revision |
This should get you started. The following code will give you a string variable "temp" with the solution text. Now you just have to step through it and count the tap changes for how many times each transformer.shunt changes.
import redirect, sys, StringIO
# Redirect the output to a string, solve, then reset output
redirect.psse2py()
sys.stdout = temp = StringIO.StringIO()
psspy.fnsl([1,0,0,1,1,0,99,0])
redirect.py2psse()
# Convert temp to a normal string
temp = "" + temp.getvalue()
# Insert code to analyse the "temp" string and count tap shunt changes
# (This will differ depending on your PSSE version)
print temp