First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

abusint returning ierr=1 (working case is empty)

asked Apr 20 '17

anders6307 gravatar image

I'm trying to setup a subsystem in order to get a list of buses from the case. However, with the code below, abusint returns ierr = 1 even though the case has valid buses and the values in the "areas" list are all valid areas. Any ideas?

Thanks in advance for the help

ierr = psspy.psseinit(12000)
    print(ierr)
    psspy.case=(r'C:\PTI\case.sav')
    subsystemnumber = 1
    ierr = psspy.bsysinit(1)
    psspy.bsysdef(1, 1)
    areas = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ,12]
    no_areas = len(areas)
    ierr = psspy.bsys(subsystemnumber, numarea=no_areas, areas=areas)
    print ierr
    buses = ()
    ierr, buses = psspy.abusint(subsystemnumber, 2, "NUMBER")
    print buses

2 answers

Sort by » oldest newest most voted
0

answered May 1 '17

zezo510 gravatar image

Try psspy.case(r'C:\PTI\case.sav')

link
0

answered Apr 22 '17

jconto gravatar image

The code is fine. I run it using PSSe v.33.9 and v.34.1, on the savnw.sav case with areas = [1,2] and got the expected bus list.

link

Comments

What version of python are you running? I am wondering if it is something with my installation or configuration

anders6307 gravatar imageanders6307 (Apr 24 '17)

i have python 2.7

jconto gravatar imagejconto (Apr 25 '17)

Your third line should use three quotes, like: psspy.case(r"""C:\PTI\case.sav""")

jconto gravatar imagejconto (May 1 '17)

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: Apr 20 '17

Seen: 534 times

Last updated: May 01 '17