First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Use bsys command to set a bus subsystem. Then use that subsystem to iterate through all the to- and from points of all branches and set them to new values.
Something like this: psspy.bsys(sid=0, numarea=1, areas=[zonenumber]) ierr, (tobuses, frombuses) = psspy.abrnint(sid=0, string=['TONUMBER', 'FROMNUMBER'] branchids = psspy.abrnchar(sid=0, string='ID')[1][0] for tobus, frombus, branchid in zip(tobuses, frombuses, branchids): <change value="" for="" the="" branch="">
2 | No.2 Revision |
Use bsys command to set a bus subsystem. Then use that subsystem to iterate through all the to- and from points of all branches and set them to new values.
Something like this: psspy.bsys(sid=0, numarea=1, areas=[zonenumber]) ierr, (tobuses, frombuses) = psspy.abrnint(sid=0, string=['TONUMBER', 'FROMNUMBER'] branchids = psspy.abrnchar(sid=0, string='ID')[1][0] for tobus, frombus, branchid in zip(tobuses, frombuses, branchids): <change value="" for="" the="" branch="">
EDIT: How do edit to make it look like code?