System Dynamics element.
is a copy of a system dynamics variable (it can be either flow, stock, or dynamic variable).
Shadows are typically used in the following cases:
- Your stock-and-flow diagram is rather complex and consists of several logically dedicated parts - subdiagrams, each one containing a number of tightly interrelated variables. There are few variables used in several subdiagrams, so that links to
these variables are drawn across the whole canvas and thus make the diagram ugly looking (see the
below). You can create shadows for those variables in one subdiagram while leave original variables in another subdiagram. In this case you can draw links to the closest elements and thus improve the diagram appearance (see the
Figure 1. Ugly links between variables of two subdiagrams. No shadows are used
Figure 2. Shadows make diagrams pretty looking
- You create a hierarchical model with subdiagrams moved to separate agent types and need to expose variables that are shared by these subdiagrams to object interfaces. This requires adding these variables to
icon of agent class. To get compact icon, variables should be placed all together somewhere aside. But moving variables aside the stock and flow diagram pulls all the links as well as the
variables and thus makes the diagram appearance worse. However, you can create shadows for these variables and place them in the stock and flow diagram while move the original variables aside in the icon area - this will keep your diagram pretty
looking, see the
Figure 3. Shadows of
are added in the stock and flow diagram while the original variables exposed to the object's icon
Creating a shadow
AnyLogic supports two alternative ways of creating shadows.
To create a shadow in the required place of the diagram
- Drag the
element from the
palette onto the graphical diagram of agent.
- You will see the dialog box
appeared. Here you should choose the variable, the shadow of which you want to create. To select the variable, double-click it in the list.
To create a shadow of the particular variable at once
- Finally, you will see a shadow of the original variable appeared on the diagram, right in the place where you dragged the
- Right-click (Mac OS: Ctrl click) the variable and choose
from the popup menu.
- You will see a shadow of the original variable appeared aside. Now you can drag it to the place where you want to place the shadow.
Discerning shadows from original variables
There are several ways to discern shadows from the original variables:
- Names of shadows are put into < > symbols.
- The label
follows the variable type name in the top line of the
- By default shadows are displayed with grey icons, whereas original variables - with blue ones. However, changing the color of a variable once sets this new color for either the variable and all its shadows so they are no more distinguishable by
System Dynamics modeling