1

psspy.asys doesn't work !

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 !

Mongo's avatar
91
Mongo
asked 2012-10-29 18:49:10 -0500
JervisW's avatar
1.3k
JervisW
updated 2012-11-01 16:52:01 -0500
edit flag offensive 0 remove flag 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's avatar JervisW (2012-10-29 22:21:19 -0500) edit
add a comment see more comments

1 Answer

0

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.

JervisW's avatar
1.3k
JervisW
answered 2012-10-29 22:30:28 -0500
edit flag offensive 0 remove flag delete link

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's avatar Mongo (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's avatar JervisW (2012-10-29 23:08:28 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer