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

Ask Your Question
2

Display report of branch with phyton

asked Sep 8 '12

anonymous user

Anonymous

updated Sep 10 '12

How can display a report in PSSE only selecting the any branches that I want wiht MW or MVR? for example if a bus connecting five branches I want to show me only two

Comments

1

Can you please clarify your question. Are you wanting to select, for example, all branches with a flow between 100 and 150 MW?

jsexauer gravatar imagejsexauer (Sep 10 '12)

for example if a bus connecting five branches I want to show me only two.

Juan gravatar imageJuan (Sep 10 '12)

On what criteria would choose which two branches to select?

jsexauer gravatar imagejsexauer (Sep 10 '12)

@Juan do you mean that you want to click on the branches to select them?

JervisW gravatar imageJervisW (Sep 10 '12)

1 answer

Sort by » oldest newest most voted
1

answered Oct 3 '12

rimux gravatar image

updated Oct 3 '12

I am doing branch reports with python. Have written functions that retrieve information about branch, and later just construct report the way I like, e.g.:

def GetBranchMVA(bus1,bus2,id):
  e, mva = psspy.brnmsc(bus1,bus2,id,"MVA")
  if e==0:
    return mva
  else:
    return 0

branches=[[6704,6886,"1"],[6740,6885,"1"]]
l_branches=len(branches)
for i in range(l_branches):
  mva=GetBranchMVA(branches[i][0],branches[i][1],branches[i][2])
  s=str(i+1)+". "+str(branches[i][0])+"-"+str(branches[i][1])+"-"+str(branches[i][2])+"  "+str(round(mva,2))+" MVA"+"\n"
  psspy.progress(s)
link

Comments

Looks like a great way to display the branch information just the way you like it. For those interested the output looks like this (correct me if I'm wrong @rimux): 1. 6704-6886-1 5.23 MVA 2. 6740-6885-1 7.48 MVA

JervisW gravatar imageJervisW (Oct 4 '12)

yes thats right :) Actually, I have little wider output, including bus names as well (have to have another function - def GetBusName(busnr)) and make report like that: 6704-6886-1 name1-name2 5.23 MVA

rimux gravatar imagerimux (Oct 4 '12)

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

Stats

Asked: Sep 8 '12

Seen: 566 times

Last updated: Oct 03 '12