Ask Your Question
0

Total generation and power load

asked Apr 7 '5

Vlad gravatar image

Hello,

When I use B (bus based reports on a subsystem) it gives a lot of summarized info like this:

                    X------ ACTUAL ------X X----- NOMINAL ------X
                            MW        MVAR         MW        MVAR
                    FROM GENERATION               57.4     -174.9        57.4     -174.9
                    TO CONSTANT POWER LOAD       166.0       56.1       166.0       56.1

Is there a way in Python to obtain exactly that values (57.4MW and 166MW) and export them in excel?

1 answer

Sort by » oldest newest most voted
0

answered Apr 7 '5

perolofl gravatar image

updated Apr 8 '5

Use GENDAT and BUSDT2 to obtain the total PGEN and PLOAD at the bus.

EDIT:

I didn't find any API returning bus subsystem totals. However, it is possible to use API scal for this. Example: A bus subsystem defined with sid=0.

ierr, totals, moto = psspy.scal_4(0,0,0,[],[])

The totals for the selected subsystem are returned in a tuple. Here, totals[1] contains the total MW load and totals[2] the total MW generation. See PAG manual for the rest of the content in totals.

link

Comments

Is a subsystem, many buses and generators, so I need a python function that returns the sum of the power of generators in that subsystem... exactly what the B button does

Vlad gravatar imageVlad (Apr 7 '5)

thank you. I managed to obtain the exact value.

Vlad gravatar imageVlad (Apr 8 '5)

can you share your solution?

jconto gravatar imagejconto (31 hours ago)

psspy.bsysrcl(0,r"""mysubsystem.sbsxml""")
psspy.subs(0,0)
ierr,totals,moto=psspy.scal_2(0,0,1,[0,0,0,0,0],[0.0,0.0,0.0,0.0,0.0,0.0,0.0])
psspy.scal_2(0,0,2,[0,0,0,0,0],[0.0,0.0,0.0,0.0,0.0,0.0,0.0])
print "Subsystem Load", totals[1]
my PSSEv33 does't have scal_4

Vlad gravatar imageVlad (21 hours ago)

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: Apr 7 '5

Seen: 65 times

Last updated: 2 days ago