1

Single line diagram generation from saved case (RIMUX method)

  • retag add tags

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)
The Bull's avatar
1
The Bull
asked 2013-05-01 04:32:50 -0500
JervisW's avatar
1.3k
JervisW
updated 2013-05-08 04:54:45 -0500
edit flag offensive 0 remove flag 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's avatar rimux (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's avatar JervisW (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's avatar The Bull (2013-10-19 02:26:36 -0500) edit
add a comment see more comments

1 Answer

0

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

Anil Kumar's avatar
1
Anil Kumar
answered 2024-06-01 03:10:08 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer