Activating a Container

You control when a conditional Container activates via the Activation… button on the Conditionality tab, which provides access to a standard Trigger dialog.

By default, the Activation is set to “Never”. This means that the Container will never activate.

   Note: You can tell if an activation trigger has been defined from the appearance of the Trigger… button.  If a trigger is defined, the rectangle next to the lightning bolt is bright green; otherwise it is dark green.  And like all Trigger… buttons, it displays a tool-tip.  If there is no trigger defined, the tool-tip will display “Never activates”.

You can explicitly control when a conditional Container activates by defining one or more triggers (e.g., “Activate when Time > 10 days”).

Whenever a conditional Container is activated, an Activation_Event output is released.

   Note: You can record all activation and deactivation times in the model’s Run Log.  This logging can be activated via the General tab of the Options dialog (accessed via Model|Options from the main menu).

If you wish the Container to activate when its parent Container activates, set the Activation trigger to Auto Activate.  Note that if a conditional Container is set to Auto Activate and it is not within a conditional Container, it activates when the Model (root) Container activates (i.e., at the start of the realization).

Several important points should be noted regarding activation of Containers:

   Even if the Container is activated via a trigger, it can only activate if its parent Container is active. If its parent Container is inactive, activation triggers will be ignored (and discarded).

   A Container can be activated multiple times during a realization. Of course, in order for a Container to be reactivated, it must first be deactivated. Activation triggers that occur while the Container is active are ignored (they are not “stored” or saved).

   If an inactive Container is activated at exactly the same time as some child elements are triggered, the triggers to the children are not ignored (they are applied immediately upon activation of the Container).

One common use of conditional Containers is to use the activation of a Container to simultaneously trigger multiple elements within the Container.

For example, if you wished to trigger a number of Discrete Change elements and/or resample a number of Stochastics, you could do so by placing them inside a conditional Container and specifying (in their Trigger dialogs) that they are automatically triggered (Auto Resample for Stochastics and Auto Trigger for Discrete Changes).  When the Container was triggered to activate, the Stochastics would automatically be resampled, and the Discrete Changes would automatically be triggered.

   Note: You cannot reference the locally available properties Duration or Num_Activations in an Activation trigger.  Arguments to an Activation trigger must come from outside of the Container.

Related Topics…

Learn more about: