Ask Your Question
1

How to add a extra digit on the bus numbers in PSS/E

asked 2015-02-11 00:28:56 -0500

PSSE_ABCD gravatar image

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 exampleI I have “bus 101” and I would like to have “Bus 100101” but ensuring we have all branches, Transformers, load generators being updated as well. My network has 2000 bus bars, and when I copy and paste the new numbers in the old fashioned way, I get into allot of issues-. Does anyone have a code or existing script which does this?

Thanks in advance.

edit retag flag offensive close merge delete

4 answers

Sort by » oldest newest most voted
0

answered 2018-08-17 08:35:18 -0500

perolofl gravatar image

This is simple to do with activity BSNM. In python:

offset = 100000
psspy.bsnm(0,1,0,1,[offset,0],"","",1,"")
psspy.bsnm(0,1,4,1,[offset,0],"","",0,"")
psspy.bsnm(0,1,7,0,[0,0],"","",0,"")
edit flag offensive delete link more
0

answered 2018-08-09 09:09:08 -0500

Juan gravatar image

How can I created the file .trn ? What format have te file .trn?

edit flag offensive delete link more
0

answered 2015-02-12 05:00:52 -0500

rimux gravatar image

updated 2015-02-12 05:02:29 -0500

Use standard PSS/E functions. From top menu:

Power Flow -> Renumber Buses -> By Bus Number

Just prepare .trn file which format as far as I remember is very easy:

'old bus number'  'new bus number'
edit flag offensive delete link more

Comments

How can you use this to change _all_ numbers? Can you make a macro somehow using the GUI? I'm not that experienced, but as far as I can tell, that's not a possibility here.

Transmission Impossible gravatar imageTransmission Impossible ( 2015-02-12 05:10:49 -0500 )edit

You can do it in Excel, 2000 bus bars are not too much for excel for sure :) And from Excel copy those two columns of old/new bus numbers into .trn file in any text editor.

rimux gravatar imagerimux ( 2015-02-17 00:18:48 -0500 )edit
0

answered 2015-02-11 02:35:32 -0500

Transmission Impossible gravatar image

updated 2015-02-12 01:31:26 -0500

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!

edit flag offensive delete link more

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: 2015-02-11 00:28:56 -0500

Seen: 1,299 times

Last updated: Aug 17