Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You have to call nxtbrn in a loop until there are no more branches connected to ibus. See example below:

tobuses,ckts = [],[]
ierr = psspy.inibrn(ibus,2)
while ierr==0:
    ierr, jbus, ickt = psspy.nxtbrn(ibus)
    if ierr==0: 
        tobuses.append(jbus)
        ckts.append(ickt)

List tobuses will contain the to bus number of all branches and 2W connected to ibus. List ckts contains the id's.