Looping Containers
In some models, you may want to carry out an iterative calculation at each timestep A discrete interval of time used in dynamic simulations.. This might be useful, for example, if you have a coupled system of nonlinear equations that must be solved every timestep by iterating.
You can define a Container An element that acts like a "box" or a "folder" into which other elements can be placed. It can be used to create hierarchical models. as a looping Container by selecting the Looping Capability feature in the Container dialog.
Note: When you specify a Container as having Looping Capability, you cannot also define an Internal Clock for the Container (these two options are mutually exclusive).
Warning: When you specify a Container as a looping Container, the Treat as SubSystem feature is also automatically selected (and cannot be deselected unless you first turn off Looping Capability). That is, a looping Container, by definition, is treated as a Subsystem. Because a looping Container is treated as a SubSystem A specialized Container that is completely “self-contained”. SubSystems can take on some useful features and properties (e.g., conditionality, having an internal clock, and being able to loop), but also have some limitations (with regard to how they can be incorporated into feedback loops)., this puts certain limitations on how these Containers can be used.
When you specify a Container as a looping Container, a Looping tab is added to the Container dialog, and the fields in this tab are used to control how the Container carries out its loops: