First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
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") #see psse api (Application Program Interface) manual for all available psspy commands
if e==0: return mva else: return 0
branches=[ [6704,6886,"1"], [6740,6885,"1"] ]
lbranches=len(branches) for i in range(lbranches): 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)
2 | No.2 Revision |
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):
GetBranchMVA(bus1,bus2,id):
e, mva = psspy.brnmsc(bus1,bus2,id,"MVA")
if e==0:
e==0:
return mva
else:
else:
return 00
branches=[
[6704,6886,"1"],
[6740,6885,"1"]
]branches=[[6704,6886,"1"],[6740,6885,"1"]]
lbranches=len(branches)
l_branches=len(branches)
for i in range(lbranches):
mva=GetBranchMVA(branches[i][0],branches[i][1],branches[i][2])
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"
MVA"+"\n"
psspy.progress(s)
3 | No.3 Revision |
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 #see psse api (Application Program Interface) manual for all available psspy commands
else:
branches=[[6704,6886,"1"],[6740,6885,"1"]]
l_branches=len(branches)
mva=GetBranchMVA(branches[i][0],branches[i][1],branches[i][2])
psspy.progress(s)