Ask Your Question
0

adding load

asked 2023-05-11 23:36:11 -0500

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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2023-05-12 02:35:05 -0500

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.

edit flag offensive delete link more

Comments

thanks a lot

erika gravatar imageerika ( 2023-05-14 12:28:51 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2023-05-11 23:36:11 -0500

Seen: 170 times

Last updated: May 12 '23