Ask Your Question
1

Is there an API routine that lists transformers regulating the same bus?

asked 2014-01-23 09:29:28 -0500

Gav gravatar image

I need to identify all transformers (2 winding) that are regulating the same bus so that I can change the tap changer control data of all these transformers via a Python script. Is there an API routine that keeps track of devices controlling the same bus?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-01-23 19:50:17 -0500

Enrique gravatar image

updated 2014-01-23 19:51:56 -0500

I have not come across such an API. The following function will return the lists of 2 winding transformers regulating the bus you specify by the icont argument.

def TwoWTfmr_RegIcont(sid=-1, owner=1, ties=1, flag=1, entry=1, icont=0):
    ierr, [bus1, bus2, icontnumber] = psspy.atrnint(sid=sid, owner=owner, ties=ties, 
                                                    flag=flag, entry=entry, 
                                                    string=['FROMNUMBER', 'TONUMBER', 
                                                            'ICONTNUMBER'])

    ierr, [tfmr_id] = psspy.atrnchar(sid=sid, owner=owner, ties=ties, flag=flag,
                                     entry=entry, string='ID')

    tfmrs = [(b1, b2, tid) for b1, b2, tid, icnt in zip(bus1, bus2, tfmr_id, icontnumber) 
            if icnt == icont]
    return zip(*tfmrs)

# Sample usage
psspy.case(r"C:\Program Files (x86)\PTI\PSSE33\EXAMPLE\bench2.sav")
[b1,b2,ckt] = TwoWTfmr_RegIcont(flag=2, icont=6011)
print b1, b2, ckt
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2014-01-23 09:29:28 -0500

Seen: 361 times

Last updated: Jan 23 '14