AnyLogic
Expand
Font size

Phase 7. Configuring simulation

Model simulation has a set of specific settings. A group of model settings is called an experiment, and experiments are displayed at the bottom of the model branch in the workspace tree. You can create several experiments for the same model with alternative model settings. One experiment is created by default and named Simulation.

It is a simulation experiment, enabling model simulation with customized parameter values.

There are also other types of experiments (optimization, risk assessment, parameter variations experiment), used when the model parameters play a significant role and you need to analyze how they affect the model behavior, or when you want to find optimal parameters of your model.

If we start the model, it will work infinitely until we stop it. Since we want to observe only how the model behaves when the adoption process takes place, we need to stop the model when the system comes to equilibrium. The adoption process in this model lasts something over 8 years.

Set the model to stop at time 8

  1. Open the Projects view (click the view tab close to the  Palette view tab).
  2. In the Projects view, click the Simulation: Main experiment item.
  3. In the Model Time section of the experiment’s Properties, choose Stop at specified time from the Stop drop-down list. Type 8 in the Stop time field below. The model will stop after 8 model time units elapse.

Now we want to change one model setting.

As you remember, the model time units of our model are years.

While running the model, we will be examining how our variables change their values over time. We will not add any charts for that since AnyLogic automatically collects data history for dynamic variables and provides a simple tool for examining their values at model runtime — inspect windows. The only thing that we want to change is the update rate of these automatically collected datasets. By default new data samples of dynamic variables are added to these datasets every time unit, and we want to increase this update rate to 0.1 to get more detailed information on our variables.

Increase update rate of auto-created datasets collecting history of dynamic variables

  1. Double click  Main in the  Projects view.
  2. Go to the Advanced section of the agent type properties and scroll it down. Type 0.1 in the Recurrence time edit box. Now AnyLogic will update datasets collected for dynamic variables not every 1 model time unit, but ten times per time unit. And this will make charts displayed for dynamic variables in inspect windows more smooth.

How can we improve this article?