Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I don't know of any direct function to do this. Here's a little script that will do it for you though:

# Buses you want to get branches between
frmBus = 100086
toBus = 100087

# Initialise Branch fetching rutine. 
ierr = psspy.inibrn(frmBus,2) 

while ierr==0:            
    # Get next buses (including 3-wind transformers).
    ierr, jbus, kbus, ickt = psspy.nxtbrn3(frmBus)

    if jbus != toBus and kbus != toBus:
        # The to bus(es) are not the buses we are looking for
        continue

    # Grab whatever data you want from branches here
    # For example, grab branch status
    ierr, ival = psspy.brnint(frmBus, toBus, ickt, 'STATUS')
    print 'Branch from ' + str(frmBus) + ' to ' + str(toBus) + ', circuit ' + str(ickt) + ': ' + str(ival)