The Discrete Change element is triggered by an event, and responds by emitting a discrete change signal. The triggering event can be a discrete event signal or another type of event (e.g., a condition, such as X becoming greater than Y).
The discrete change signal output by the element can only be used by a number of elements. In particular, it can be delayed by a Discrete Change Delay element; and it can instantaneously impact the value of an Integrator, a Reservoir or a Pool. It can also act as an input to some elements in GoldSim's specialized modules (e.g., the Financial Module).
The dialog for a Discrete Change element looks like this:
You first specify when the element is to be triggered via the Trigger… button in the Discrete Change dialog. The Trigger… button provides access to a standard Trigger dialog.
Once the element is triggered, it emits a discrete change signal. A discrete change signal contains information regarding the response to an event and consisting of two pieces of information: a Value (e.g., 10 dollars) and an Instruction (e.g., Add).
The Value can be a number (e.g., 10 m3) or a link. The required order (scalar, vector or matrix) of the Value is specified in a dialog accessed via the Type… button. The required dimensions of the Value are specified in the Display Units field. By default, the Value is a dimensionless scalar.
The Instruction drop-list contains three choices: "Add", "Replace" and “Push”. This instructs the element(s) receiving the discrete change signal (e.g., an Integrator, a Reservoir or a Pool) how to act upon the value being received.
While Add and Replace have obvious implications for how they are handled by the receiving element (and are the most commonly used), a Push instruction is more complex (and used less often), and is intended specifically to facilitate modeling of aging chains.
Note: A discrete change signal can be used as an argument to an On Event triggering event (in the same manner that a discrete event signal can).
Discrete Change elements have two outputs: 1) the discrete change signal itself (the primary output); and 2) the EventCount (i.e., the cumulative number of discrete change signals that the element has emitted during the realization.
These outputs can be seen in the browser view of the element:
The discrete change signal output itself cannot be saved or viewed as a result.
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).
The example model DiscreteChange.gsm in the General Examples/Events folder of your GoldSim directory (accessed by selecting File | Open Example... from the main menu) contains an example of the use of Discrete Change elements.
Learn more about:
Understanding Event Triggering
Modeling Discrete Changes to an Integrator
Modeling Discrete Changes to a Reservoir
Modeling Discrete Changes to a Pool