Simulation with AnyLogic/System Dynamics/Step 5. Adding constants

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

Step 5. Adding Constants

Now we will define constants of our model. In AnyLogic you define a constant by creating a parameter.

Step 1. Creating a new model1.gif Define a constant representing total population

  1. Drag the Parameter Step 3. Adding Adoption from Advertisement1.gif element from the System Dynamics page of the Palette view onto the diagram of active object class.
  2. On the General page of the Properties view, set up the parameter properties.
  3. Change the name of the constant. Type TotalPopulation in the Name edit box.
  4. In the Default Value edit box, type 100000. This will be the total population in our model.
    Adding constants 1.png

The rate, with which potential adopters come into contact with adopters, is assumed to be constant. So, we will define a constant to represent contact rate.

Step 1. Creating a new model1.gif Define the ContactRate constant

  1. Define the constant in the same way. Enter the Name: ContactRate.
  2. Assume a contact rate of 100 per person per year. In the Default Value, type 100.
    Adding constants 2.png

In this model the volume of advertising and the probability that a potential adopter will adopt as the result of exposure to a given amount of advertising are assumed to be constant each period. So, we will add a constant to model the advertising effectiveness — the fractional adoption rate from advertising.

Step 1. Creating a new model1.gif Define a constant representing advertising effectiveness

  1. Define a constant in the similar way. Name it AdEffectiveness.
  2. Set the value to 0.011.
    Adding constants 3.png

Define one more constant to specify the adoption fraction — the proportion of contacts that are sufficiently persuasive to induce the potential adopter to purchase the product.

Step 1. Creating a new model1.gif Define the AdoptionFraction constant

  1. Name the constant AdoptionFraction.
  2. Set the value to 0.015.
    Adding constants 4.png