Search code examples
anylogic

How can I have an custom simulation speed adjuster in Anylogic?


I am working on a model in Anylogic, where I need to create a custom simulation speed adjuster.

How can I have a custom simulation speed adjuster like the image below,

enter image description here


Solution

  • Add a button with code such as below: enter image description here

    the first line ensures you are not in the "max speed" mode, the second lets you choose whatever speed scale you like.

    And the help has all other API calls to help you further: https://anylogic.help/anylogic/running/controlling-model-execution.html#controlling-the-model-execution-from-code