Specifying a Precedence Condition for a Trigger

In some cases, it may be convenient to “hold” or delay the triggering of an element until a particular precedence requirement is met. If the triggering event occurs after the precedence requirement is met, the element is immediately triggered. If the triggering event occurs before the precedence requirement is met, the element is triggered as soon as the precedence requirement is met.

To facilitate these kind of triggers, GoldSim allows you to specify a Precedence Condition for a triggering event.

You add a Precedence Condition by pressing the More button on the Trigger dialog to expand it, and then selecting the Then wait for Precedence Condition checkbox. When you do so, the Precedence Condition field becomes available.  The field accepts any condition output or conditional expression.

The triggering of the element is “held” until the specified Precedence Condition is met (the Condition becomes True), and then the element is triggered.  Hence, unless the Precedence Condition is met at the time that the triggering event occurs, the element will be triggered (if it is triggered at all) after the actual triggering event has occurred.

For example, suppose that you were simulating a project, and you wanted to trigger a particular task to start. Before you can start the task, however, you must first ensure that 1) you received the necessary permission (e.g., a building permit); and 2) you had sufficient money to carry out the task.

To simulate this, you could model the permit process as a triggering event (i.e., obtaining a permit is a triggering event), while the Precedence Condition could be modeled as a simple condition related to the amount of money available. Your Triggering dialog might look like this:

   Note: If you define multiple triggering events that occur at different times, and you have specified a Precedence Condition, it is possible that both events could occur (at different times), and then upon the Condition becoming true, both would be simultaneously released.  In such a case, if For simultaneous events, act once is checked, only one event would be released.

     Note: As a general rule, you should not specify both a Precedence Condtiona and a Required Condition. If you do specify both a Precedence Condition and a Required Condition, events are evaluated as follows: If the Precedence Conditions is True when the triggering event occurs, the Required Condition is evaluated immediately. If the Precedence Condition is False when the triggering event occurs, the Required Condition is not evaluated until the Precedence Condition become True.

Related Topics…