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

Ask Your Question
0

Can you work around PSSe crashing on some events?

asked Jun 6 '18

anonymous user

Anonymous

Hi everyone,

Thank you in advance for your help. I am currently running contingency events from a python shell. My program works great with the exception of one thing, it crashes on certain events. Is there anyway of putting the files in a loop where if PSSe crashes, script will just restart PSSe and continue on to the next event without having to rerun in manually? These are dynamic simulations.

1 answer

Sort by ยป oldest newest most voted
0

answered Jun 7 '18

jconto gravatar image

Use python error catching feature:

for i in events:
   try:
      psspy.comandxx()     #potentially could cause a crash
   except:
      print 'error message'
      continue             # next event
   #....do something if no error occurred:
link

Comments

Question: Will this work if the crash occurs in the fortran code of PSSE?

perolofl gravatar imageperolofl (Jun 7 '18)

I would say no, since error handling are intrinsic to the language, so it would have to be within the Fortran code to be effective. I tried the above code template on several psspy calls, and able to avoid PSSe crashes.

jconto gravatar imagejconto (Jun 7 '18)

What is the command, psspy.comandxx()? The didn't fix the issue unfortunately

phippstech gravatar imagephippstech (Apr 24 '19)

The "commandxx" represents the specific psspy function (like "run", to execute a dynamic run) that could cause a crash. The "except" block will handle any error caused in the execution of such function.

jconto gravatar imagejconto (Apr 25 '19)

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

1 follower

Stats

Asked: Jun 6 '18

Seen: 848 times

Last updated: Jun 06 '18