Traditional SD frameworks offer the following way of laying out large models. The model is partitioned into pieces called sectors, each focusing on a particular aspect, for example: Housing, Business, Tax, Labor. The diagram for each sector is drawn apart from others, and the variables that are used in multiple diagrams are multiplied as well, so that there are no graphical links between sectors. For each such variable there is one "original" instance in one of the sectors and “shadow” copies in the other sectors.
In AnyLogic you can partition the model into components in object-oriented way by using agents exposing the “input” and “output” dynamic variables as a part of their interface. However, the traditional “sector” method is still available. For that, AnyLogic supports view areas and shadow variables. In the figure below the population model is partitioned into Housing sector and Population sector. The “interface” between the sectors includes two variables:
- The stock Houses from the Housing sector is used in the Population sector
- The variable HouseholdsToHousesRatio from the Population sector is used in the Housing sector.
Correspondingly, the Housing sector has a shadow copy of HouseholdsToHousesRatio, and vice versa. You can distinguish the shadow from the original by the angle brackets around its name: <householdstohousesratio>.
To create a shadow variable
- Drag the Shadow element from the System Dynamics palette on the canvas.
- Select the “original” variable from the list of all available variables in the displayed New shadow dialog window.
How can we improve this article?