First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
1

Determine which shunts are toggling

asked Jan 4 '14

nyga0082 gravatar image

I have a handful of cases that I'm running a large number of outages on. In some of the scenarios, there are one or two switched shunt devices that are toggling (every few iterations) in an attempt to find a happy voltage on their buses; thus causing my solution to not reach convergence. I know I could just widen the scheduled range for these devices, but I'm wondering if there's any way to programmatically pour through the solution report and find any shunt that switches more than 'x' number of times so I could go in and lock that device to allow for convergence.

Any thoughts

1 answer

Sort by » oldest newest most voted
1

answered Jan 6 '14

Eli Pack gravatar image

updated Jan 6 '14

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 how many times each 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 shunt changes
# (This will differ depending on your PSSE version)
print temp
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Jan 4 '14

Seen: 756 times

Last updated: Jan 05 '14