First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

adding load

asked May 12 '3

erika gravatar image

Hello, what is the best way to add same amount of load to all the buses in the system simultaneously? I am planning to use abusint api to extract all the bus number first and then use a loop. But in the loop I will have to set the id of the load. For example some buses have already 2 loads, then the new id will be 3. But if some buses have 3 loads, new id will be 4. So how to do it in a generalized way avoiding this conflict?

1 answer

Sort by » oldest newest most voted
0

answered May 12 '3

perolofl gravatar image

Use an inner loop for an integer 1 - 99.

Convert the value to string id.

Check if load id already exists with e.g. psspy.lodint(ibus, id, 'STATUS').

Break loop if load id does not exist.

link

Comments

thanks a lot

erika gravatar imageerika (May 14 '3)

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: May 12 '3

Seen: 182 times

Last updated: May 12 '23