1

How to add a extra digit on the bus numbers

  • retag add tags

How easy would it be to create a python script to simply add a sixth number to all bus bars in a given network? For example we have “bus 101” and I would like to have “Bus 100101” but ensuring we have all branches, Transformers, load generators being updated as well. What will the code be, and is there an existing script for it.

anonymous user
asked 2015-02-11 00:24:54 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

You can use BUS_NUMBER. Check section 2.8 in the API-document. I'm pretty sure the following should do the trick:

ierr, iarray = abusint(-1, 2, 'NUMBER')  # Get bus numbers
                                         # -1 is to use a subsystem with all buses
                                         # 2 is to include all buses, not only in-service buses

for x in range(0,len(iarray)):
    ierr = psspy.bus_number(iarray[x],100000+iarray[x])  # Change bus numbers
                                         # iarray[x] is the current bus number
                                         # 100000+iarray[x] is the new bus number

PSS/E should automagically change the bus numbers for all other equipment.

Hope this helped!

Transmission Impossible's avatar
71
Transmission Impossible
answered 2015-02-11 02:36:22 -0500, updated 2015-02-12 01:31:52 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer