Simulation with AnyLogic/System Dynamics/Step 4. Adding adoption flow
Step 4. Adding Adoption Flow
We have successfully created two stocks representing population pools. It is time to create flows of our model now. Our model has just one flow - a flow of adoption, which increases the adopter population, while decreasing the potential adopter population.
- We will add a flow using AnyLogic flow tool. Flow tool creates flow variable and sets up stocks so their values are changed with the specified flow value automatically.
- To create flow, double-click PotentialAdopters variable and then click Adopters variable.
- AnyLogic creates new flow variable and makes it an outflow for PotentialAdopters and an inflow for Adopters. Arrows appeared on the stock and flow diagram denote flow influence on population pools.
- Select the flow in the graphical editor and change its name from default flowAuxVar to AdoptionRate. When finished, please press Ctrl+Enter to rename flow names mentioned in formulas of stocks also.
- You can have a look at stock properties now. AnyLogic automatically adjusts formulas for stocks. The value of inflows i.e. flows that increase stock value, are added and the value of outflows, i.e. flows that decrease stock are subtracted from the current value of the stock. In our case we should have the following formulas defined:
We will define the formula calculating the value of the flow a little bit later.