All discrete event modeling involves triggering of one form or another. When you trigger an element, you are telling it that a discrete event has occurred that you want the element to respond to.
Various elements respond to a trigger in different ways. They are, however, all triggered in the same way. That is, these elements all share a common Triggering dialog, which controls how they are triggered. All Triggering dialogs are accessed via a Trigger… button that will look similar to this:
Note: Depending on the element, the label for the trigger button will not always be “Trigger…”.
Note: Holding your cursor over the trigger button displays a tool-tip summarizing the current trigger settings.
The Triggering dialog for every element looks like this:
To define a trigger for the element, you simply press the Add button to add a row to the list of triggering events:
By default, the Type of event added will be “On Event”. If you click on the small button in the Type column, a drop-list will be presented allowing you to edit the event type:
There are eight types of events that can be added:
On Event: The Trigger Definition must be a discrete event signal from another element. The element is triggered whenever the signal is received.
On Changed: The Trigger Definition can be any continuous output (it cannot be an expression or a discrete signal). The element is triggered whenever the value of Trigger Definition changes.
On True: The Trigger Definition can be any condition output or conditional expression. The element is triggered whenever the Trigger Definition becomes True.
On False: The Trigger Definition can be any condition output or conditional expression. The element is triggered whenever the Trigger Definition becomes False.
At Stock Test: The Trigger Definition must be a conditional expression of of the form “A>B”, “A>= B”, “A<B”, “A<=B”, or “A=B” where A is the primary output of a Reservoir, a Pool or a Fund (from the Financial Module). The element is triggered whenever the Trigger Definition becomes True. As discussed below, this triggering event interrupts the clock and adds an unscheduled update.
At Date: The Trigger Definition must be a date or date and time, enclosed in quotations. (Alternatively, the date can also be expressed as the amount of time since 30 December 1899). The element is triggered whenever the simulated date reaches the specified date. As discussed below, this triggering event interrupts the clock and adds an unscheduled update.
At ETime: The Trigger Definition must be an elapsed time. The element is triggered whenever the simulated elapsed time reaches the specified elapsed time. As discussed below, this triggering event interrupts the clock and adds an unscheduled update.
Auto Trigger (only available for some elements): An Auto Trigger requires no user-defined Trigger Definition and its behavior is defined by its context (i.e., the type of element). Auto Triggers react to the activation or deactivation of their parent Container.
Note: At Stock Test, At Date and At ETime triggers interrupt the clock and insert an unscheduled update when they occur (whereas On True, On False and On Changed triggers do not create an unscheduled update). To understand the implications of this, consider an example in which your scheduled updates were every 10 days. There are two different ways you could try to trigger an event when the value of Reservoir A became greater than the value B. You could create an At Stock Test trigger of A > B, or you could create an On True trigger of A > B. If we assume that A > B actually became true at 15 days, these two triggers would behave very differently. The At Stock Test trigger would catch this point exactly, and insert an unscheduled update at 15 days. In the absence of any other unscheduled updates, however, the On True trigger would not be evaluated and implemented until 20 days. Similarly, if you wished to trigger an event at a specific elapsed time (e.g., 17 days), you could try to do so in two different ways. You could trigger the event using an At ETime trigger of 17 days, or you could create an On True trigger with ETime >=17days. Again, these two triggers would behave very differently. The At ETime trigger would catch this point exactly, and insert an unscheduled update at 17 days. In the absence of any other unscheduled updates, however, the On True trigger would not be evaluated and implemented until 20 days.
The More button provides access to advanced triggering options.
Learn more about: