Ask Your Question
0

Can you work around PSSe crashing on some events?

asked 2018-06-06 11:59:25 -0500

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.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-06-06 19:57:02 -0500

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:
edit flag offensive delete link more

Comments

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

perolofl gravatar imageperolofl ( 2018-06-07 05:34:49 -0500 )edit

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 ( 2018-06-07 10:35:08 -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: 2018-06-06 11:59:25 -0500

Seen: 69 times

Last updated: Jun 06