Ask Your Question
1

psspy.asys doesn't work !

asked 2012-10-29 18:49:10 -0500

Mongo gravatar image

updated 2012-11-01 16:52:01 -0500

JervisW gravatar image

Hi friends,

I am trying to define a subsystem consisting of two areas, numbered in PSS/E as 19 and 20.

This is my code:


subsystem_number = 4 ## desired, could be anything between 0 and 11, right ?

areas = [19,20] ## these areas DO exist

number_of_areas_to_set = len(areas)

ierr = psspy.asys(subsystem_number, number_of_areas_to_set, areas)

print ierr

ierr, areas = psspy.aareacount(subsystem_number, _i)

print areas

print ierr

ierr, numbers = psspy.abusint(subsystem_number, _i,"NUMBER")

print numbers

On the screen, I get:


0

2

0

[None]

Please, does anyone know why my numbers array comes empty ??!!

Thanks a lot,

Andre

P.S. Have just found out this forum, very useful, thanks !

edit retag flag offensive close merge delete

Comments

Hi Andre, glad you liked the forum. I've come across the same problem as you many, many times. - Just edited the question to include code formatting.

JervisW gravatar imageJervisW ( 2012-10-29 22:21:19 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2012-10-29 22:30:28 -0500

JervisW gravatar image

The reason is that the asys commands create an area subsystem and not a bus subsystem. I find it to be incredibly annoying, and have personally been tripped up multiple times.

Here is how to create a bus subsystem that contain only the buses in the areas you wanted:

subsystem_number = 4 ## desired, could be anything between 0 and 11, right ?

areas = [19,20] ## these areas DO exist

number_of_areas_to_set = len(areas)

ierr = psspy.bsys(subsystem_number, numarea=number_of_areas_to_set, areas=areas)

print ierr

ierr, areas = psspy.aareacount(subsystem_number, _i)

print areas

print ierr

ierr, numbers = psspy.abusint(subsystem_number, _i,"NUMBER")

print numbers

Use the psspy.bsys to define a bus subsystem, they are used throughout the bus subsystem API (like abusint).

psspy.bsys is pretty cool, because you can define subsystems by other means too:

  • by base voltage;
  • by area;
  • by owner;
  • by zone; and
  • by listing individual buses.

Or by using a combination of any of the above.

edit flag offensive delete link more

Comments

1

Hi JervisW ! Thanks a lot ! So, would it be reasonable to say that asys is quite useless ? I spent the day looking at this thing ! :-( I haven't figured out how to write an answer (?); THANKS AGAIN AND CONGRATULATIONS FOR SETTING UP THIS FORUM !!! Andre

Mongo gravatar imageMongo ( 2012-10-29 22:56:49 -0500 )edit

I haven't found out what `asys` is useful for yet!. If anyone else has worked it out I'd be pleased to know what it is good for. This forum site takes away the "answer" button when someone else posts an answer to a question you asked. I'm not sure why that is - but I could look into it.

JervisW gravatar imageJervisW ( 2012-10-29 23:08:28 -0500 )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

Stats

Asked: 2012-10-29 18:49:10 -0500

Seen: 187 times

Last updated: Oct 29 '12