Ask Your Question
0

Automatically Change All Rates

asked Oct 28 '15

mcj04001 gravatar image

Is there a way to change all of the "rates" in a user defined zone automatically using a script? I am looking for a way to perform this task without defining each branch or 2 winding device individually.

For example, every instance that Rate A is equal to 20, for a branch in Zone 1, I want the python script to change that value to 30. Similarly for 2 winding devices, every time Rate A is 20, change Rate A to 25, etc.

I am currently using PSSE 33.

Thanks!

1 answer

Sort by » oldest newest most voted
0

answered Nov 5 '15

SqFKYo gravatar image

updated Nov 5 '15

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?

link

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

1 follower

Stats

Asked: Oct 28 '15

Seen: 6,463 times

Last updated: Nov 05 '15