First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

Is there anyway I can count number of branches between specific buses?

asked Jan 16 '19

newbee123 gravatar image

I'm trying to write a code to count the number of devices in the buses that user chose.

I know how to count things like generators, shunts, etc.. but I don't know if there is anyway to count the number of branches and transformers.

Is there anyone who tried this before?

1 answer

Sort by » oldest newest most voted
0

answered Jan 16 '19

perolofl gravatar image

Use inibrn and nxtbrn3, for example, to loop all branches and transfomers connected to ibus:

ibus = 154
ierr = psspy.inibrn(ibus, 2)
while True:
    ierr, jbus, kbus, ickt = psspy.nxtbrn3(ibus)
    if ierr>0: break
link

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: Jan 16 '19

Seen: 480 times

Last updated: Jan 16 '19