Ask Your Question
0

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

asked 2019-09-04 15:20:46 -0500

Maelstrom888 gravatar image

updated 2019-09-05 12:40:21 -0500

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.

edit retag flag offensive close merge delete

Comments

Show also the output in the progress window!

perolofl gravatar imageperolofl ( 2019-09-04 15:57:43 -0500 )edit

6 answers

Sort by ยป oldest newest most voted
0

answered 2019-09-05 01:09:04 -0500

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.

edit flag offensive delete link more
0

answered 2019-09-23 01:48:16 -0500

Thanks for solution.

edit flag offensive delete link more
0

answered 2019-09-05 09:46:28 -0500

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

edit flag offensive delete link more
0

answered 2019-09-05 07:53:49 -0500

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.

edit flag offensive delete link more
0

answered 2019-09-05 07:00:13 -0500

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.

edit flag offensive delete link more
0

answered 2019-09-04 21:30:15 -0500

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)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Stats

Asked: 2019-09-04 15:20:46 -0500

Seen: 1,253 times

Last updated: Sep 23 '19