First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Don't know what the reasons are that call strt number of times. The purpose of strt is to help debug the model errors or missing models. I don't think that it is a good practice to run strt a couple of times, as the power flow conditions may not be what you want (i.e., the condition at t=0-, may not be the one that you want to study).
However, for your particular question, you can set loop based on the return of okstrt() function. something like,
# initialization
bStrt = 1;
while bStrt:
ierr = psspy.strt();
if ierr > 0:
print 'STRT Error with code:', ierr;
break;
bStrt = psspy.okstrt();
# run