GoldSim provides a special function that can be useful in discrete event modeling: the "Occurs" function. The Occurs function accepts a single argument which must be a discrete event signal.
The Occurs function returns a condition (True or False). If the argument (the discrete event signal) has occurred during the current update, the value is True, otherwise it is False.
This can be useful in situations where you need to reference whether or not two events have occurred simultaneously. For example, suppose that there are two events in your simulation (Event1 and Event2), and you want to trigger a response if and only if Event1 occurs and Event2 does not (i.e., you do not want to trigger the response if both events occur simultaneously). A good way to do this is to use the Occurs function in the Required Condition field for each element.
The Trigger dialog that captures this behavior would look like this:
Note: If you try to plot an Expression defined using the occurs operator, the Expression will always show False (unless the event occurs exactly at a scheduled update point), since by default, GoldSim only records results at the scheduled plot points, and not at the unscheduled timesteps inserted by events (which are the only points at which the Expression would be evaluate to True). Note, however, that GoldSim provides an option to include unscheduled updates in time history displays (under a specified set of conditions) in the Advanced Time settings..
Learn more about: