Simulation with AnyLogic/Agent-Based Modeling

Bass Diffusion. Agent Based Model

edit

AnyLogic supports different modeling techniques. This tutorial covers the agent-based modeling approach, successfully applied in a wide range of fields such as ecology, sociology, economics, traffic simulation, and many others. Agent-based modeling is used to model markets (agent is a potential customer), competition and supply chains (agent is a company), population (agent is a family, a citizen, or a voter), etc. Agent-based models allow getting an insight into the general behavior of the system assuming the behavior of its elements, without having any global knowledge about the system.

AnyLogic is the only simulation tool, which allows creating flexible models with agents, interacting with each other and their environment. AnyLogic supports all known ways of specifying the agent behavior – statecharts, synchronous and asynchronous event scheduling.

This tutorial will briefly take you through the process of constructing a simulation model using AnyLogic. It is intended to introduce you to AnyLogic interface and many of its main features. We will create a simple illustrative example—the product life cycle model, used for forecasting sales of new products. The first steps will take you through the process of construction of the classic Bass diffusion model. The model describes a product diffusion process. Potential adopters of a product are influenced into buying the product by advertising and by word of mouth from adopters – those who have already purchased the new product. Adoption of a new product driven by word of mouth is likewise an epidemic. Potential adopters come into contact with adopters through social interactions. A fraction of these contacts results in the purchase of the new product. The advertising causes a constant fraction of the potential adopter population to adopt each time period.

Then we will expand our model by considering some details and introducing you to some advanced features of AnyLogic useful in agent-based modeling.

Note that there are several reference files available for this model representing the milestones of the editing. You can use reference files if you experience any difficulties creating a model and you would like to compare your model with the reference file. You can use Welcome Page to open those examples. Welcome Page appears automatically when you open AnyLogic. It can be opened whenever you like from AnyLogic menu: Help|Welcome.

You can also run this model online.

  1.   Step 1. Creating a new model
  2.   Step 2. Creating agents
  3.   Step 3. Adding Adoption from Advertisement
  4.   Step 4. Counting the product adopters
  5.   Step 5. Adding charts
  6.   Step 6. Configuring simulation
  7.   Step 7. Running the model
  8.   Step 8. Adding adoption from word of mouth
  9.   Step 9. Adding the Product Consumption Logic
  10.   Step 10. Adding agent animations
  11.   Step 11. Making people contacts distance-based