First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
1

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

asked Feb 11 '15

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.

5 answers

Sort by » oldest newest most voted
0

answered Aug 21 '0

lfplan2 gravatar image

hi, you can update the BusNumber of huge number of buses in single go by using renumber buses in power flow by usinf text file. In text file make 1st column of existing busno. In second column new bus number. with this you can update the multiple bus numbers.

link

Comments

Yes, but it is much easier to use bsnm as shown in the answer Aug 17, 2018.

perolofl gravatar imageperolofl (Aug 24 '0)
0

answered Aug 17 '18

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,"")
link
0

answered Aug 9 '18

Juan gravatar image

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

link
0

answered Feb 12 '15

rimux gravatar image

updated Feb 12 '15

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'
link

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.

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 (Feb 17 '15)
0

answered Feb 11 '15

Transmission Impossible gravatar image

updated Feb 12 '15

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!

link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Feb 11 '15

Seen: 2,319 times

Last updated: Aug 21 '20