Ask Your Question
0

How do I capture skipped contingencies in contingency analysis automation?

asked 2021-06-21 08:28:44 -0500

Automation Guy gravatar image

updated 2021-06-21 10:03:04 -0500

Hello All, I have built a python based PSS/E automation to run contingency analysis using a predefined Contingency definitions. I have to run this predefined contingencies on several PSS/E models. One issue that I see is there might be a contingency definition which might not be valid on a given PSS/E base case and therefore can skip executing the analysis. This information is shown on the progress window. Since, I'm running thousands of contingencies, I would like to capture all such skipped contingencies into a variable and present to the user in the log file. I see the flag for the unsolved contingencies but I couldn't find anything that I may use to capture all skipped contingencies.

One way to address this issue is to redirect from the output progress window to log file and then read the log file and filter the data with key words to find such skipped contingencies. I would like to know if there is any other easy/best method to capture the skipped contingencies.

Your input is appreciated!!

Thanks

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2021-06-23 19:58:27 -0500

GaryB gravatar image

Parsing the log file is probably the best way. Also you will end up with zero length .out files that may also be used to detect such a condition.

Be advised, some simulations may halt and not terminate causing your script to hang up. I use python multiprocessing to launch each dynamics run in its own process. While running, I monitor the file sizes of the .out and .log files. If they stop growing larger and the case is still running, it gets terminated. An ever increasing size of these two files means it’s still working.

edit flag offensive delete link more

Comments

How do you make sure the case is still running in order to terminate it (while the file sizes aren’t increasing)?

Type1_bus gravatar imageType1_bus ( 2021-07-18 03:21:25 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2021-06-21 08:28:44 -0500

Seen: 333 times

Last updated: Jun 23 '21