Step 3. 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.

 Add a flow from PotentialAdopters to Adopters
  1. Double-click the Flow element in the System Dynamics palette so that its icon turns into .
  2. Right after that, go to the graphical editor, click the stock where the flow flows out (PotentialAdopters) and then click the stock where the flow flows in (Adopters).
  3. AnyLogic creates new flow and makes it an outflow for PotentialAdopters and an inflow for Adopters. The direction of the flow arrow indicates the flow influence on population pools. 

If the flow is drawn correctly, when you select it with a click, its end points should be indicated with little green circles. Otherwise, if there is a white circle on some its end, it means that this particular end point was not connected correctly. To establish the valid connection, please drag this end point onto the stock you want to connect.
  1. Go to the properties of the flow and rename it from  flow to AdoptionRate.
  2. You can have a look at properties of the stocks 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.


         Step 2. Adding stocks

          Step 4. Adding constants