Understanding State Variables in GoldSim

Within a GoldSim model (actually, any dynamic model), there are fundamentally two types of outputs:

This second type of output is referred to as a state variable The output of an element in GoldSim whose value is computed based on the historical value of the element’s inputs (as opposed to only being a function of the current value of the element’s inputs). State variables have well-defined initial conditions. Feedback loops can only be created if they contain at least one state variable. in GoldSim. State variables are typically the key system variables that you are interested in predicting. Together, the state variables define the predicted state of the system at any time in the future. Examples of state variables include the volume of water in a pond, the amount of money in an account, the status (on/off/failed) of a piece of equipment, and the number of times a certain event has occurred.

All state variables have, by definition, an initial value (e.g., for Integrators, Reservoirs and Pools, the initial value is explicitly specified). This allows the outputs to be computed when there are no historical input values available (e.g., at the start of simulation).

All state variables have “memory”; that is, their value at time t is a function of their value at time t - ∆t. Furthermore, state variables can change during a simulation in two different ways:

Some state variables may change due to just one of these mechanisms, while others may potentially change due to both. For example, Status elements An event element that allows you to monitor the status of something that is changed instantaneously (i.e., is triggered) by events. can only change by the second mechanism; Reservoirs and Pools can change due to both.

The most common state variables are the primary outputs of stocks (Integrators, Reservoirs and Pools). A number of other elements, however, also have outputs which are state variables, and these are summarized in the table below.

Element State Variable Output(s)
Integrator Primary Output
Pool Primary Output; Is_Full
Reservoir Primary Output; Is_Full
Stochastic Primary Output; Probability_Density; Cumulative_Probability
Script Primary Output
Extrema Primary Output
Status Primary Output
Decision Last_Decision
Milestone Completion_Status; Date; ETime
Timed Event Generator EventCount
Triggered Event Generator EventCount
Discrete Change EventCount
Information Delay Primary Output
Material Delay Primary Output; Amount_in_Transit
Event Delay EventCount; Num_in_Transit; Mean_Time; Current_Service_Time
Discrete Change Delay EventCount; Num_in_Transit; Num_in_Queue
Conditional Container Activity_Status; Completion_Status
Previous Value Primary Output
Time Series Primary Output
History Generator Primary Output

The icons for state variables are indicated in browsers (e.g., output ports) by showing a vertical line to the left of the output triangle:

In this example, Reservoir1 (the primary output) and Is_Full are state variables.

Note: In addition to the elements listed above, a number of elements in GoldSim’s extension modules also have outputs that are state variables.