Propagating Discrete Signals Between Elements

In some cases, an event will occur (e.g., X becoming greater than Y) which triggers a particular action in a single element (e.g., change the output of a Status element to True). In such a case, the event is internal to that element, and it does not directly impact other elements. In other cases, however, an event may impact multiple elements, or one element may respond to an event by triggering other elements to take a particular action. In these cases, it is necessary for discrete signals to propagate between elements.

If you think carefully about this, you will realize that this is very different from how information is typically passed between elements in GoldSim. In most situations, information is transferred between elements (via links) continuously in time. For example, if Expression element X is defined as being equal to A + B, the values of A and B are continuously sent to X  (i.e., the information is  "broadcast" through the link throughout the simulation). Conceptually, at any given time in the simulation, X is receiving a signal from A and B.

In order to propagate events (and their consequences) between elements in a model, however, it is necessary to send information between elements intermittently as a "spike" or discrete "packet" of information. To facilitate this, GoldSim allows certain elements to emit and receive (i.e., produce as outputs and/or accept as inputs) a discrete signal. Discrete signals are a special category of outputs that emit information discretely, rather than continuously.

When you view an element that can emit or receive a discrete signal in the browser, the symbols for the inputs and outputs that represent discrete signals are identified as red triangles (as opposed to blue, green or gray for other output types).

   Note: Element inputs and outputs are only shown in the browser if you choose to Show Element Subitems (accessed via the browser context menu by right-clicking in the browser).

In this example, the “Trigger1” input only accepts (receives) discrete signals.  The output “”DiscreteChange1” produces (emits) discrete signals.

Within GoldSim, there are actually two types of discrete signals that can be passed from one element to another: discrete event signals and discrete change signals.

A discrete event signal is a discrete signal indicating that something (e.g., an earthquake, a monthly bank deposit, a traffic accident) has occurred. It does not describe the consequence of that occurrence; it simply emits a signal between elements indicating that an event has occurred.

A discrete change signal, on the other hand, emits information regarding the response to an event. In particular, a discrete change signal contains two pieces of information: a value (e.g., 10 dollars) and an instruction (e.g., Add). A discrete change signal can only be generated in response to an event. It can only be received by a few select elements (e.g., Reservoirs, some Financial Module elements) which understand how to process it.

Only certain elements in GoldSim can emit (as outputs) or receive (as inputs) discrete signals. These elements and the manner in which they can interact with discrete signals are summarized in the tables below.

Elements that Emit and Receive Discrete Event Signals

Element

Emits Discrete Event Signals

Receives Discrete Event Signals

Timed Event

x

 

Triggered Event

x

x

Event Delay

x

x

Decision

x

x

Random Choice

x

x

Previous Value

x

x

Stochastic

 

x

Status

 

x

Milestone

 

x

Discrete Change

 

x

Extrema

 

x

Interrupt

 

x

In addition to being triggered by discrete event signals, the elements indicated in the right-hand column can also be triggered by discrete change signals (which are treated as discrete event signals when entered into a field that accepts discrete event signals).

   Note: An additional type of element, a conditional Container, can also emit and receive discrete event signals.

Elements That Emit and Receive Discrete Change Signals

Element

Emits Discrete Change Signals

Receives Discrete Change Signals

Discrete Change

x

-

Discrete Change Delay

x

x

Integrator

-

x

Reservoir

x

x

Pool

x

x

Time Series

x

-

Splitter

x

x

Allocator

x

x

Previous Value

x

x

   Note: Some elements in the various GoldSim extension modules can also emit and receive discrete signals.  The elements listed above only include those found in the basic GoldSim framework.

The manner in which each of these elements can be used to simulate the occurrence and consequences of discrete events is discussed in detail in the topics below.

An example model which demonstrates the basic types of discrete event configurations (DiscreteEvents.gsm) can be found in the General Examples/Events folder in your GoldSim directory (accessed by selecting File | Open Example... from the main menu).  The folder also includes more detailed examples that utilize discrete event logic.

Related Topics…

Learn more about: