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

Ask Your Question
0

Getting .RUN error "Activity RUN is invalid--activity STRT needs to be executed (003381)" after succesfully running .STRT

asked Sep 4 '19

Maelstrom888 gravatar image

updated Sep 5 '19

Hello All,

I'm having problems getting a short python Dynamic script to run. Please see the code below:

import os,sys
import psse34
import psspy
import redirect

# Redirect output from PSSE to Python:
redirect.psse2py()

# Last case:
psspy.psseinit()
CASE = r"Planning Coordinator provided dynamic .SAV case"
ierr = psspy.case(CASE)
print("case error: {}".format(ierr))

# Convert loads (3 step process):
psspy.conl(-1,1,1)
psspy.conl(-1,1,2,[0,0],[100,0,0,100])
psspy.conl(-1,1,3)

# Convert generators:
psspy.cong()

# Solve for dynamics
psspy.ordr()
psspy.fact()
psspy.tysl()

# Save converted case
case_root = os.path.splitext(CASE)[0]
psspy.save(case_root + "_C.sav")

ierr = psspy.rstr(r"Planning Coordinator provided snapshot with channels for this case ")
print("rstr error: {}".format(ierr))
# Initialize
ierr = psspy.strt(outfile=r"C:\Users\u45738\OneDrive\Projects\Dynamics\test_out_PC_2024.out")
print("strt error: {}".format(ierr))
ierr = psspy.run(tpause=0)
print ierr

# 3-phase fault on 101 to 102 # 3 line
psspy.dist_branch_fault(ibus= 101,jbus= 102,id='3')

# Run to 24 cycles
time = 24.0/60.0
psspy.run(tpause=time)

# Clear fault 
psspy.dist_clear_fault()
psspy.dist_branch_trip(ibus=101,jbus=102,id='3')

time = 20
psspy.run(tpause=time)

This error occurs even when starting from the planning coordinator provided .cnv file. I have error outputs at various stages and am getting "0" for the .STRT command. This is a large case (115000 buses) but I have seen cases this size ran before in my previous position.

Thanks for your help!

EDIT I was able to get these models to run by changing to the updated .STRT_2 API and using "net machine power" for OPTION(2). Thanks again for all of your answers, they were very helpful in solving this issue.

Comments

Show also the output in the progress window!

perolofl gravatar imageperolofl (Sep 4 '19)

6 answers

Sort by » oldest newest most voted
0

answered Sep 5 '19

perolofl gravatar image

If a script is not running as expected, you should run the script inside PSSE and read the output in the progress window to find the problem.

Load your converted case and snapshot in PSSE's GUI and make STRT manually. You will now see the problem, for example a missing generator model, as bikaran1991 suggested.

Also, note that error code=0 from psspy.strt does not mean that the initialisation was succesful. You may have "initial conditions suspect". Use API psspy.okstrt to check the result of strt.

link
0

answered Sep 23 '19

Thanks for solution.

link
0

answered Sep 5 '19

jconto gravatar image

Once you resolved this initialization error, it is good to run without fault applied, to get flat-lines on all channels. This 'flatrun' test helps to detect unstable model behavior over the total simulation period (20 sec?).

link
0

answered Sep 5 '19

txc gravatar image

You can also browse to dynamics - simulation options - uncheck the enable checking for check model data during initialization and then hit start. This might resolve your issue.

link
0

answered Sep 5 '19

zezo510 gravatar image

I ran your code on a sample case and snap files and it worked fine. Which leads me to think that the issue is in the initialization stage. Check if the case initialized OK and no initial suspects or messages are present in the progress of activity STRT. However, initial suspects will not prevent the RUN activity unless a generator model is missing.

link
0

answered Sep 5 '19

bikiran1991 gravatar image

check the psse log file. i got this error before when psse threw up an error while reading the case (such as generator dynamics model did not have a corresponding entry within the raw file)

link

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: Sep 4 '19

Seen: 1,282 times

Last updated: Sep 23 '19