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

Ask Your Question
0

Check if case solve or not after using psspy.fdns() routine.

asked Nov 16 '17

Power_System_Engineer gravatar image

Is there a way to check if the case solve or not and output that status to a text file?

1 answer

Sort by » oldest newest most voted
0

answered Nov 17 '17

perolofl gravatar image

The following script goes through all cases in working directory and writes the error codes from API FDNS and SOLVED to a text file.

import glob
with open('cases_solved.txt','w') as f:  
    for file in glob.glob('*.sav'):
        psspy.case(file)
        f.write('%s \t%s \t%s\n' %(file,psspy.fdns(),psspy.solved()))
link

Comments

thanks!!!!

Power_System_Engineer gravatar imagePower_System_Engineer (Nov 17 '17)

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: Nov 16 '17

Seen: 656 times

Last updated: Nov 17 '17