Ask Your Question
1

Single line diagram generation from saved case (RIMUX method)

asked 2013-05-01 04:32:50 -0500

The Bull gravatar image

updated 2013-05-08 04:54:45 -0500

JervisW gravatar image

I don't know how the code written by rimux works ,GROWBUS api can only be used after you have opened saved case and here in this code no saved case file is opened ,and how to import excel file in psse which gives us bus numbers and bus locations (as suggested by rimux).Someone please guide me because i have tried many times but the above code is not working, following is the code developed by rimux

def DrawBusesSLD(buslist):

    n_buses=len(buslist)
    buses=[]
    for i in range(n_buses):
        buses.append(buslist[i][0])

    for i in range(n_buses):
        psspy.bsys(0,0,[0.0, 750.],0,[],1,[buses[i]],0,[],0,[])
        psspy.growbus(buslist[i][0],buslist[i][1], buslist[i][2])

    psspy.bsys(0,0,[0.0, 750.],0,[],n_buses,buses,0,[],0,[])
    for i in range(n_buses):
        psspy.growbus(buslist[i][0],buslist[i][1], buslist[i][2])


buslist=[[1000, 0, -3.4],
       [1001, 1.7, -5.1],
       [1002, 3.4, -5.1],
       [1003, 5.1, -3.4]]

DrawBusesSLD(buslist)
edit retag flag offensive close merge delete

Comments

Hi, I am not sure I understood the problem you are facing. This code should be run from within PSSE - just open PSSE, open desired sav, open python program with e.g. notepad++, change bus numbers in buslist (and add more), in psse create new empty diagram, and "run automation file". Thats it. About importing buslist information from excel - thats another story

rimux gravatar imagerimux ( 2013-05-02 00:10:40 -0500 )edit

This looks pretty straightforward to me too, as @rimux says, you'll need to already load the .sav case and run the python program with the "run automation file"

JervisW gravatar imageJervisW ( 2013-05-08 04:55:47 -0500 )edit
1

@ rimux and JervisW ,i am thankful to you but i have found the solution to my question.Combining Amaity's idea with my own i was able to draw sld from the saved case given. This is the link http://www.4shared.com/video/vg0luekp/how_to_draw_SLD.html hopefully it would be helpful :)

The Bull gravatar imageThe Bull ( 2013-10-19 02:26:36 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2024-06-01 03:10:08 -0500

Anil Kumar gravatar image

From the question i understand that 1) you want to draw (or develop) SLD with python code 2) the data for bus number and lat longs are in an excel file and you want to collect the data from excel and used it for excel

The idea of importing excel data to psse is not correct. Infact you can use python code which imports excel file to python and convert them to a list and use them to draw SLD using the above python program.

infact you can communicate between excel and python using xlwings package and psse package

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

1 follower

Stats

Asked: 2013-05-01 04:32:50 -0500

Seen: 1,717 times

Last updated: Jun 01