Simulation with AnyLogic/System Dynamics/Step 9. Running the model

From Wikibooks, open books for an open world
< Simulation with AnyLogic‎ | System Dynamics
Jump to: navigation, search

Step 9. Running the Model

Build your project by clicking the Build Model Step 7. Running the model.gif toolbar button. If there are some errors in your model, the building fails and the Problems view appears listing all the errors found in your model. Click All button in the upper right corner of the view to show all errors in the model and then double-click an error in the list to open the location of the error and fix it.

Step 7. Running the model1.png
Problems view

After the model is successfully built, you can start it. Running the simulation, you automatically bring the current model up to date.

Step 1. Creating a new model1.gif Start the model

  1. Click the Run Step 7. Running the model2.gif toolbar button and choose the experiment you want to run from the drop-down list. Your simulation experiment is called Bass Diffusion/Simulation.
    Step 9. Running the model 1.png
    In the case this model is the only one opened in the workspace at the moment you will be prompted to run this particular experiment. Later on this button will start the previously run experiment. To run any other experiment, right-click the experiment in the Project view and choose Run from the context menu.
  2. Having started the model, you will see the presentation window. It displays the presentation designed for your simulation experiment. AnyLogic automatically places the show-bench title and the button enabling running your model and switching to the presentation designed for the Main class.
    Step 9. Running the model 2.png
  3. You can see animated stock-and-flow diagram. Elements of the diagram match the system dynamics notation. The actual values of variables are displayed as well.
  4. You can adjust the execution speed to your needs using Slow down and Speed up toolbar buttons.
    Step 9. Running the model 3.png

AnyLogic supports various tools for collecting, displaying, and analyzing data during model execution. The simpliest way to examine current state and history of a parameter or a variable during model simulation is to use inspect window. We want to inspect our variables AdoptionFromAd and AdoptionFromWOM to view the contribution of different adoption sources.

Step 1. Creating a new model1.gif Inspect adoption sources

  1. Click the AdoptionFromAd variable in the presentation. The yellow popup box will be shown. If needed, move it by dragging the toolbar of the window and resize it to the desired size by dragging the lower right corner of the window..
  2. By default the window is in inspect mode - it displays the current value of the variable. You can switch it to the plot mode by clicking the "rectangle" button in the upper right corner of the window. Now it shows the time plot showing the trend for AdoptionFromAd variable.
  3. In the same way, open inspect window for AdoptionFromWOM and switch it to the plot mode.
    Step 9. Running the model 4.png

"Inspect" charts change scales automatically to embrace the plots, displaying the variables changing from the beginning to the end of simulation. We can easily see that when an innovation is introduced and the adopter population is zero, the only source of adoption will be advertising. The advertising effect is largest at the start of the diffusion process and steadily diminishes as the pool of potential adopters is depleted.