1

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

  • 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 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.

PSSE_ABCD's avatar
11
PSSE_ABCD
asked 2015-02-11 00:28:56 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

5 Answers

0

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

Juan's avatar
21
Juan
answered 2018-08-09 09:09:08 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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.

lfplan2's avatar
1
lfplan2
answered 2020-08-21 00:24:48 -0500
edit flag offensive 0 remove flag delete link

Comments

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

perolofl's avatar perolofl (2020-08-24 02:15:37 -0500) edit
add a comment see more comments
0

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'
rimux's avatar
296
rimux
answered 2015-02-12 05:00:52 -0500, updated 2015-02-12 05:02:29 -0500
edit flag offensive 0 remove flag delete 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.

Transmission Impossible's avatar Transmission 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's avatar rimux (2015-02-17 00:18:48 -0500) edit
add a comment see more comments
0

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:35:32 -0500, updated 2015-02-12 01:31:26 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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,"")
perolofl's avatar
3.8k
perolofl
answered 2018-08-17 08:35:18 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer