Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered Jan 3 '5

jconto gravatar image

From the API manual: "1.221. PSSEHALT_2 Use this API to end the operation of PSSE, closes all associated files and returns to the calling application"

After pssehalt is called, there is no PSSe in memory. So for the next run, you need to star over (import PSSe35 -> import psspy -> import psseinit)

Can you can post some code to see the pssehalt behavior?

click to hide/show revision 2
No.2 Revision

From the API manual: "1.221. PSSEHALT_2 Use this API to end the operation of PSSE, closes all associated files and returns to the calling application"

After pssehalt is called, there is no PSSe in memory. So for the next run, you need to star over (import PSSe35 -> import psspy -> import psseinit)

Can you can post some code to see the pssehalt behavior?

The following code completed the 2 loops, having halt2 run once outside the loop:

import sys
import psse35
import psspy
psspy.psseinit()

sys.path.insert(1,r"C:/Program Files/PTI/PSSE35/35.6/PSSPY39")
#sys.path.insert(0,"C:/Program Files/PTI/PSSE35/35.6/PSSBIN")
case_file = "IEEE9_v35.RAW"
dyr_file = "IEEE9.dyr"

for i in range(2):
    ierr = psspy.read(0, case_file)
    ierr = psspy.dyre_new([1, 1, 1, 1], dyr_file, "", "", "")    
    print('loop ',i)
psspy.pssehalt_2()