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

Ask Your Question
0

How to change bus type in PSS/E?

asked Jun 7 '2

gaurab_dash gravatar image

updated Jun 7 '2

I am trying to identify the buses in PSS/E which are generator buses but have no units connected to them. After this, the bus type of these buses will be converted to 1.

The written code is: psspy.bsys(1,1,[0.0, 1200],0,[],0,[],0,[],0,[]) ierr, [busnumber, bustype, buszone, busowner] = psspy.abusint(sid=1,flag=2,string=['NUMBER','TYPE','ZONE','OWNER']) for k in range(len(bustype)): ierr,Totals,moto = psspy.scal2(0,0,1,[0,0,0,0,0],[0.0,0.0,0.0,0.0,0.0,0.0,0.0]) if Totals[8] == 0: psspy.buschng4(busnumber[k],0,[1,i,i,i],[f,f,f,f,f,f,f],s) else: psspy.buschng4(busnumber[k],0,[2,i,i,i],[f,f,f,f,f,f,f],s)

1 answer

Sort by » oldest newest most voted
0

answered Jun 7 '2

perolofl gravatar image

Your solution is rather odd.

Here is my proposal:

ierr,plants = psspy.agenbusint(sid=-1, flag=3, string=['NUMBER','TYPE'])
for ibus,code in zip(*plants):
    if code < 2 or code > 3: continue
    ierr, cmpval = psspy.gendat(ibus)
    if ierr == 3:
        psspy.bus_chng_4(ibus,0,[1])
link

Comments

Thank You. It works.

gaurab_dash gravatar imagegaurab_dash (Jun 8 '2)

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

1 follower

Stats

Asked: Jun 7 '2

Seen: 714 times

Last updated: Jun 07 '22