A discrete event is something that occurs instantaneously (as opposed to continuously or gradually) in time. It represents a “spike”, a discontinuity, or a discrete change of state for the system.
The flow of water out of a hole in a bucket is a continuous process (as long as water remains in the bucket). Puncturing the bucket to create the hole is a discrete event. Stopping the flow from the bucket (by plugging the hole or by the bucket becoming empty) is also a discrete event. Similarly, through continuous compounding of interest, the money in a bank account continuously increases, but the account can also increase and decrease instantaneously due to discrete events (i.e., deposits and withdrawals).
Of course, “instantaneous” and “gradual” are relative terms. That is, whether something is treated as instantaneous or gradual is a function of the time scale of interest, and hence you must differentiate between the two based on the context of your model. Typically, the differentiation will be obvious. For example, if the time scale of interest is 10 years, something happening over the span of a day can be considered to be “instantaneous”. If the time scale of interest is several days, however, something happening over the span of a day would in most cases need to be treated in a continuous manner.
GoldSim handles “instantaneous” changes to a model by providing a mechanism for a model to generate and respond to discrete events. This is accomplished by providing the ability to instantaneously trigger an element to take a particular action (e.g., instantaneously change its value) in response to an event. Hence, in GoldSim, an event is specifically defined as an instantaneous occurrence that subsequently triggers a particular action.
In GoldSim, an event can be generated in one of four ways:
• The event occurs when a specified condition (e.g., X > Y) becomes true or false;
• The event occurs when a specified output in the model changes;
• The event occurs at a specified calendar or elapsed time; or
• The event occurs based on a specified rate of occurrence, which can be treated as regular or random ("occur exactly once a week" or "occur, on average, once a week").
In addition, some elements can respond to an event generated via one of the mechanisms above, and generate a new event.
Note: Depending on how the event was generated, it may not fall exactly on a “scheduled update” (i.e., a timestep that was defined in the Time tab of the Simulation Settings dialog). That is, an event could actually occur between scheduled updates of the model. Such events can trigger an “unscheduled update” of the model.
A variety of GoldSim elements can be triggered by an event, with each element responding to the event (taking a particular action) in a different manner. For example, the action taken by a Stochastic element when it is triggered by an event is to resample itself. The action taken by a Status element when it is triggered by an event is to instantaneously change its value (from True to False or from False to True).
The manner in which events are specified to occur is discussed in detail in “Understanding Event Triggering” and “Generating Discrete Event Signals”. The elements that can respond to events, and the manner in which they do so, are discussed in “Responding to Events”.
Learn more about:
Propagating Discrete Signals Between Elements
Understanding Timestepping in GoldSim
Understanding Event Triggering