Last modified on May 26, 2023
In addition to the web UI, AnyLogic Cloud offers multiple APIs that you can use to configure and run simulations programmatically within your analytical workflows, query experiment results, build fully customized web interfaces for your models, and do a lot of other things.
AnyLogic Cloud supports the following APIs:
You can adjust the look and feel of AnyLogic model animation embedded in custom web pages by using AnyLogic Java API.
The following methods of the ExperimentHost class enable and disable controls on the Control panel:
|void setRunControlEnabled(boolean runControlEnabled)||Enables or disables Run, Pause, and Stop buttons on the Control panel (not the Developer panel).|
|void setSpeedControlEnabled(boolean speedControlEnabled)||Enables or disables all controls related to simulation speed on the Control panel (not on the Developer panel).|
There are two types of API for working with AnyLogic Cloud: synchronous and asynchronous.
- In synchronous API, methods wait for underlying operations to complete (for example, for HTTP requests or for server-based simulation runs). The advantage of synchronous API is its ease of use: as the methods complete the required action and return the actual results, you can use straightforward control flow. The disadvantage is that such methods block the thread where they are called. Therefore, it is not good to use synchronous API where responsiveness is required or where multithreading is not available.
How can we improve this article?