Ask Your Question

Largeman's profile - activity

2015-11-30 07:16:40 -0500 received badge  Famous Question (source)
2014-11-04 02:17:12 -0500 received badge  Notable Question (source)
2014-09-12 11:17:35 -0500 received badge  Popular Question (source)
2014-08-27 16:51:39 -0500 answered a question Multiple SCMU and SEQD fail

To answer the comment, yes, I had included the underscores.

After doing a little further reading, I find that when using python with PSSE, the straight up API call won't work, it sometimes needs psspy at the start.

So

psspy.sequence_network_setup(1)

works as intended.

Now my code works. Just in case anyone else is looking, the code is designed to fault a bus, then remove transformers and branches from service one at a time and fault the bus with a branch off to see the change in fault level.

My coding is rarely elegant, but it is generally effective, so if anyone else is looking to do similar, I might be able to help.

2014-08-26 20:09:16 -0500 asked a question Multiple SCMU and SEQD fail

I am trying to do consecutive SCMU calls with upstream branches switched out. SCMU/1 does an SEQD each time if sequence network setup option is set to 1. BUT when i try to do sequencenetworksetup(1) i get told that the name is not defined. As this is meant to be part of the PSSE API, how can this not be defined? Am I missing something?

Hope someone can help.

2013-10-20 18:06:17 -0500 received badge  Famous Question (source)
2013-04-06 21:22:13 -0500 received badge  Notable Question (source)
2013-04-06 21:22:13 -0500 received badge  Popular Question (source)
2013-03-19 17:33:28 -0500 commented question Perform scmu sing en masse with output

I'm still back on version 32.0.5, it's what the client uses, so it's what we use. Your suggestion has worked. Thank you for your help. Now I just need to dig around and learn about python arrays and for loops. Cheers.

2013-03-19 05:46:05 -0500 received badge  Student (source)
2013-03-19 02:08:02 -0500 asked a question Perform scmu sing en masse with output

I am trying to perform a simple 3 phase fault on multiple busses without having to copy the results out of the reports, so I'm learning python. My problem is that it will produce a nice empty text file. The report in PSSE is all results, but the text file is useless. I know the 2 in "[2,0]" towards the end is for appending, which is what I would prefer, but just a bunch of files would do. My instinct is that there is an issue with PSSE more than the python script, but as I'm new, I want to check. Any and all help much appreciated. My code below:

import os,sys

PSSE_LOCATION = r"C:\Program Files (x86)\PTI\PSSE32\PSSBIN"
sys.path.append(PSSE_LOCATION)
os.environ['PATH'] = os.environ['PATH'] +';' + PSSE_LOCATION

import psspy

CASE = r"C:\Users\user\Desktop\PSSE\Model.sav"

_i=psspy.getdefaultint()
_f=psspy.getdefaultreal()
_s=psspy.getdefaultchar()

if __name__ == '__main__':
    psspy.psseinit(2000)
    psspy.case(CASE)
    psspy.scmu(1,[_i,_i,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f],_s)
    psspy.scmu(2,[7,100,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f],"")
    psspy.scmu(3,[_i,_i,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f],_s)
    #psspy.report_output(2,'C:\Users\user\Desktop\PSSE\Fault_Output\Bus_100.txt',[2,0])
    psspy.report(2,'C:\Users\user\Desktop\PSSE\Fault_Output\Bus_100.txt',[2,0])
    psspy.close_report()