# Lesson 14 - Unit 13 Summary

When tangible things move through or change within a system, the dynamics can be conceptualized in two different ways: continuously or discretely. Things that move continuously can be thought of as flowing.  An example of this is the movement of water.  Other things move or happen discretely (e.g., such that they must be tracked individually).  Examples of this include financial transactions or the movement of people through a security checkpoint.

Most real-world systems are best described using a combination of continuous and discrete dynamics (i.e., hybrid systems). For example, just because something is considered to flow (like water), it does not mean that all of the dynamics for that system can be treated as being continuous.  For example, if water is flowing from one pond to another (via a pump), and the pump suddenly breaks down, that is a “discrete event”, and must be treated in an appropriate manner.

This Unit focused on GoldSim’s capabilities for representing discrete dynamics.

In particular, the key points that we covered were as follows:

• In GoldSim, a discrete event is something that occurs instantaneously (as opposed to continuously or gradually) in time. It represents a “spike”, a discontinuity, an “on/off” switch, or a discrete change of state for the system. Of course, “instantaneous” and “continuous” are relative terms. That is, whether something is treated as instantaneous or continuous is a function of the time scale of interest, and hence you must differentiate between the two based on the context of your model.
• GoldSim allows you to represent “instantaneous” changes to a model by providing a mechanism for your model to generate and respond to events. This is accomplished by 1) providing the ability to generate events in a number of different ways, and 2) allowing such events to instantaneously trigger various elements to take a particular action (e.g., instantaneously change its value).
• If events do not fall exactly on a scheduled update (timestep) of the model, they can cause an unscheduled update of the model in between the scheduled updates.
• The Timed Event element provides a mechanism to generate an event that occurs based on a specified rate of occurrence (which can be assumed to be either regular or random).
• Events are propagated through a model via a special category of outputs called discrete signals. Discrete signals transmit information discretely, rather than continuously. A discrete signal is not a number; it is a signal that is sent between elements (at a specific instant in simulated time) indicating that something (e.g., an earthquake, a bank deposit, an equipment failure) has occurred precisely at that instant, to which the element needs to respond.
• Some elements in GoldSim have the ability to take a particular action in response to an event. Specifically, some elements can be triggered to respond to an event. When you trigger an element, you are telling it that a discrete event has occurred that you want the element to respond to.
• Elements that can be triggered each respond in a different way (appropriate to that element). Those elements that can be triggered, however, are all triggered in the same way. That is, these elements all share a common Triggering dialog, which controls how they are triggered.  The Triggering dialog is always accessed via a button in the dialog for each element.
• The Triggered Event element provides a mechanism to generated events that can subsequently be used to trigger multiple elements.
• The Discrete Change element can be used to generate a discrete change signal. A discrete change signal does not just carry information indicating that something has occurred; it also carries information indicating what has occurred (i.e., how much, and what is to be done with it – the instruction). Certain elements (e.g., Reservoirs) accept discrete change signals for certain outputs, and this allows you to cause a discrete change to a quantity in your models.
• Triggering dialogs have advanced options that allow you to create Required Conditions and Precedence Conditions for the triggering events. Combined with the multiple types of triggers (e.g., On Changed, On True, On Event, etc.), these provide great flexibility, enabling you to represent very complex triggering logic.
• In many models, the state of the system changes discretely (suddenly) during a simulation in a binary manner. Status elements and Milestone elements can be used to track the state of a system that responds to discrete signals.
• One of the most powerful applications for the Status element is to model a common type of active feedback control: managing to a target using a dead band.
• When building a model that involves outflows from a stock that have active or passive feedback control as the stock approaches a bound, it is critical for you have a very good understanding of how the real system actually works such that you represent realistic control systems in your model. In many systems, in order to be realistically represented, different outflows would likely need to be treated in different ways as the bound is approached: some would need to be turned on and off using a dead band, others would need to gradually be changed, and others would need to be prioritized (and hence reduced perhaps) once the bound is reached (and outflow is constrained).
• Event Delay elements can be used to delay discrete signals and model a “process”, where a “process” is something that operates on a discrete item or instance, and takes a specified amount of time to do so.  If signals are arriving faster than they can be processed, a queue forms. Hence, one of the key measures of a process is the size of the queue formed behind it.  Once a queue forms, the time to be processed (after arriving at the processor) is of interest. An Event Delay computes queue size and processing times.
• Random Choice and Decision elements can be used to route or redirect discrete signals.
• An Interrupt element can be used to interrupt and pause a simulation (in response to an event), which can be useful for debugging and testing complex models.

Like other Units in GoldSim, the information presented here is not exhaustive; it simply covers the most important aspects of discrete event modeling. Once you understand the basics, you can learn about additional details and advanced features in GoldSim Help.