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
just one flow - a flow of adoption, which increases
population, while decreasing the potential adopter
a flow from PotentialAdopters
- Double-click the Flow
element in the System
Dynamics palette so that its icon turns into .
- Right after that, go to the graphical editor, click the
stock where the flow flows out (PotentialAdopters)
click the stock where the flow flows in (Adopters).
- 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
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.
- Go to the properties of the flow and rename it from flow
- You can have a look at properties of the stocks now.
automatically adjusts formulas for stocks. The value of inflows i.e.
flows that increase stock
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
Step 2. Adding stocks
Step 4. Adding constants