Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to change the Speed of moveTo block on run time in AnyLogic

I am using the processing modeling library’s "moveTo" block for moving the AVG. Now I want to change the speed, so in the "moveTo" block property called speed, I put a variable, and I am changing the value of the variable on runtime using an editBox, but the speed doesn’t change.

enter image description here

How do I resolve the issue?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Whenever you change that variable, you also must actively change the agent speed yourself using setSpeed(mySpeedVariable)

Agent speed is a static property, so an agent does not constantly check for that variable to change. It is up to you to tell the agent that. (else models would be painfully slow if all agents would constantly check)

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading