0

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

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.

Maelstrom888's avatar
3
Maelstrom888
asked 2019-09-04 15:20:46 -0500, updated 2019-09-05 12:40:21 -0500
edit flag offensive 0 remove flag close merge delete

Comments

Show also the output in the progress window!

perolofl's avatar perolofl (2019-09-04 15:57:43 -0500) edit
add a comment see more comments

6 Answers

0

Thanks for solution.

sunitapr's avatar
1
sunitapr
answered 2019-09-23 01:48:16 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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.

txc's avatar
84
txc
answered 2019-09-05 07:53:49 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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)

bikiran1991's avatar
47
bikiran1991
answered 2019-09-04 21:30:15 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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?).

jconto's avatar
2.9k
jconto
answered 2019-09-05 09:46:28 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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.

zezo510's avatar
21
zezo510
answered 2019-09-05 07:00:13 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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.

perolofl's avatar
3.8k
perolofl
answered 2019-09-05 01:09:04 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer