0

How to find zero impedance branch lists

Dear

I would like to find the zero impdedance branch lists (From bus number, To bus number and ID)

Only for using "psspy.brch_2" ????

Song's avatar
1
Song
asked 2017-11-29 01:29:24 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

I didn't find any API returning ZILs so I wrote my own:

def get_zil(sid=-1):
    """ Returns ibus, jbus and id for zero impedance lines in three lists
    """
    ierr, thrshz = psspy.prmdat('THRSHZ')
    ierr, iarray = psspy.abrnint(sid, string=['FROMNUMBER','TONUMBER'])
    ierr, carray = psspy.abrnchar(sid,entry=1, string='ID')
    ierr, cmplxarray = psspy.abrncplx(sid, string=['RX'])
    ibl = []
    jbl = []
    idl = []
    for ibus,jbus,id,z in zip(iarray[0],iarray[1],carray[0],cmplxarray[0]):
        if z.real==0. and abs(z.imag)<=thrshz:
            ibl.append(ibus)
            jbl.append(jbus)
            idl.append(id)
    return ibl,jbl,idl

Create lists with:

ibusl,jbusl,idl = get_zil()
perolofl's avatar
3.8k
perolofl
answered 2017-11-29 15:33:25 -0500
edit flag offensive 0 remove flag delete link

Comments

Oh~thank you very much!!!

Song's avatar Song (2017-11-30 05:34:35 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer