Ask Your Question

Revision history [back]

click to hide/show revision 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="">

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?