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

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered Feb 25 '14

yfwing gravatar image

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