First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
I would suggest to go through a list of branches and disconnect them one by one. After disconnection of the branch, check if there are no islands - if you will get an island this means that branch is radial. e.g.:
List=[]
for b in branches:
ierr, status = psspy.brnint(bus1,bus2,id,"STATUS")
if ierr==0 and status==1: #branch is on
ierr = psspy.branch_chng(bus1,bus2,id,[0,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
if ierr==0:
ierr, n = psspy.tree(1,0)
if ierr==0 and n>0: #island detected
# b is radial branch...
else:
List.append(b) #branch is not radial
ierr = psspy.branch_chng(bus1,bus2,ckt,[1,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
#List will contain only non-radial branches (and only with status=on)
2 | No.2 Revision |
I would suggest to go through a list of branches and disconnect them one by one. After disconnection of the branch, check if there are no islands - if you will get an island this means that branch is radial. e.g.:
List=[]
for b in branches:
ierr, status = psspy.brnint(bus1,bus2,id,"STATUS")
if ierr==0 and status==1: #branch is on
ierr = psspy.branch_chng(bus1,bus2,id,[0,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
if ierr==0:
ierr, n = psspy.tree(1,0)
if ierr==0 and n>0: #island detected
# b is radial branch...
pass
else:
List.append(b) #branch is not radial
ierr = psspy.branch_chng(bus1,bus2,ckt,[1,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
#List will contain only non-radial branches (and only with status=on)
3 | No.3 Revision |
I would suggest to go through a list of branches and disconnect them one by one. After disconnection of the branch, check if there are no islands - if you will get an island this means that branch is radial. e.g.:
branches=[[100,101,'1'],[200,201,'1']]
List=[]
for b in branches:
ierr, status = psspy.brnint(bus1,bus2,id,"STATUS")
psspy.brnint(b[0], b[1], b[2], "STATUS")
if ierr==0 and status==1: #branch is on
ierr = psspy.branch_chng(bus1,bus2,id,[0,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
psspy.branch_chng(b[0], b[1], b[2], [0,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
if ierr==0:
ierr, n = psspy.tree(1,0)
if ierr==0 and n>0: #island detected
# b is radial branch...
pass
else:
List.append(b) #branch is not radial
ierr = psspy.branch_chng(bus1,bus2,ckt,[1,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
#List will contain only non-radial branches (and only with status=on)
4 | No.4 Revision |
I would suggest to go through a list of branches and disconnect them one by one. After disconnection of the branch, check if there are no islands - if you will get an island this means that branch is radial. e.g.:
branches=[[100,101,'1'],[200,201,'1']]
import psspy
branches=[[5401,5457,'1'],[5401,5461,'1']]
psspy.progress_output(6,"",[0,0])
List=[]
for b in branches:
ierr, status = psspy.brnint(b[0], b[1], b[2], "STATUS")
if ierr==0 and status==1: #branch is on
ierr = psspy.branch_chng(b[0], b[1], b[2], [0,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
[0,_i,_i,_i,_i,_i], [_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
if ierr==0:
ierr, n = psspy.tree(1,0)
if ierr==0 and n>0: #island detected
# b is radial branch...
pass
print 'branch',b[0], b[1], b[2],'is radial'
ierr, n = psspy.tree(2,-1)
else:
#branch is not radial
print 'branch',b[0], b[1], b[2],'is not radial'
List.append(b) #branch is not radial
ierr = psspy.branch_chng(bus1,bus2,ckt,[1,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f]) psspy.branch_chng(b[0], b[1], b[2],
[1,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
#List will contain only non-radial branches (and only with status=on)
psspy.progress_output(1,"",[0,0])
print 'Non-radial branches:',List
5 | No.5 Revision |
I would suggest to go through a list of branches and disconnect them one by one. After disconnection of the branch, check if there are no islands - if you will get an island this means that branch is radial. e.g.:
import psspy
branches=[[5401,5457,'1'],[5401,5461,'1']]
branches=[[101,102,'1'], [201,202,'1']]
psspy.progress_output(6,"",[0,0])
List=[]
for b in branches:
ierr, status = psspy.brnint(b[0], b[1], b[2], "STATUS")
if ierr==0 and status==1: #branch is on
ierr = psspy.branch_chng(b[0], b[1], b[2],
[0,_i,_i,_i,_i,_i], [_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
if ierr==0:
ierr, n = psspy.tree(1,0)
if ierr==0 and n>0: #island detected
# b is radial branch...
print 'branch',b[0], b[1], b[2],'is radial'
ierr, n = psspy.tree(2,-1)
else:
#branch is not radial
print 'branch',b[0], b[1], b[2],'is not radial'
List.append(b)
ierr = psspy.branch_chng(b[0], b[1], b[2],
[1,_i,_i,_i,_i,_i],[_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f,_f])
#List will contain only non-radial branches (and only with status=on)
psspy.progress_output(1,"",[0,0])
print 'Non-radial branches:',List