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.
Show also the output in the progress window!