Programmatic access to Newton solution results
Is there a way, from within python, to access solution results after performing a newton solution? The things I would like for my programs to access are:
- Number of iterations to solve (if solved)
- Largest MW/MVAR mismatch
- Individual iteration largest change - P,Q,V,A as reported in progress window.
I could theoretically get the number of iterations by repeatedly solving the case while varying the iteration limit and checking psspy.solved() for non-convergence but this is somewhat ridiculous.
The only way that I can think of to get this information is to direct the progress device to a file and then parse the data from the file. Has anyone written code for doing this? Could you share it?
Check out the following API calls: 1) psspy.iterat() 2) psspy.maxmsm(), psspy.sysmsm 3) Not sure how to accomplish this besides the procedure you suggested.
@cajief great advice. Those APIs will get you most of what you are after.