Ask Your Question
0

abusint returning ierr=1 (working case is empty)

asked 2017-04-20 15:38:54 -0600

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
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-05-01 15:19:53 -0600

zezo510 gravatar image

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

edit flag offensive delete link more
0

answered 2017-04-21 21:09:35 -0600

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.

edit flag offensive delete link more

Comments

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

anders6307 gravatar imageanders6307 ( 2017-04-24 11:07:03 -0600 )edit

i have python 2.7

jconto gravatar imagejconto ( 2017-04-24 19:57:04 -0600 )edit

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

jconto gravatar imagejconto ( 2017-05-01 15:33:41 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2017-04-20 15:38:54 -0600

Seen: 506 times

Last updated: May 01 '17