Ask Your Question

Maelstrom888's profile - activity

2019-09-11 00:31:51 -0500 received badge  Famous Question (source)
2019-09-05 12:44:20 -0500 received badge  Scholar (source)
2019-09-05 12:40:21 -0500 received badge  Editor (source)
2019-09-05 07:09:55 -0500 received badge  Notable Question (source)
2019-09-04 23:21:34 -0500 received badge  Popular Question (source)
2019-09-04 15:20:46 -0500 asked a question 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.