I have an agent-based model built by AnyLogic. I can run it correctly with an experiment screen where I configure parameters and then click a button to start simulation in the desktop version. However, it skips the experiment screen and directly runs the simulation when I upload it to the AnyLogic Cloud.
How can I start a simulation WITH the experiment screen in AnyLogic Cloud?
I tried to setup the run configuration here:
Run configuration for AnyLogic Cloud
Also, I tried to use commands like: pauseSimulation()
, runSimulation()
, and getEngine().stop()
, in Java actions on Simulation page and Agent actions on Main page.
A new and better solution is found to the question.
You can create an event
which occurs only once at the very first beginning of the simulation (i.e., time = 0). This event carries out a function called: pauseSimulation();
.
Now, the model should pause at the beginning.
Next, move the welcome page (experiment screen) that you created from the Simulation
domain to the Main
. You need to further specify a function in the same event
to navigate to the view area
of your welcome page. For example, areaName.navigateTo();
.
Finally, select Skip experiment screen and run the model
in the Properties of Simulation domain. Your model should now start with your welcome page. Remember to create a button on the welcome page to runSimulation();
.