Invalid and Ambiguous Causality
Sequences
When creating complex models, determining the appropriate causality sequence The specific order in which GoldSim updates (computes) elements every timestep. can sometimes become difficult. In particular, two problems can sometimes occur:
- GoldSim may not be
able to create a valid sequence at all. This is the result of the system
having circular (recursive) logic without 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. involved. If you tried
to build such a model, GoldSim would be unable to create a valid causality
sequence, and would display an error, warning you that the system is recursive.
GoldSim can still represent such systems, but in order to do so, it is necessary
for you to explicitly add a state variable to the system. Depending on the
system, there are generally two ways to address this issue:
- In some cases, the system does in fact represent a feedback loop A looping system in which the variables in the loop represent a closed chain of cause and effect. Note that the terms “feedback” and “cause and effect” intentionally imply that the relationship between the variables is dynamic and the system changes over time (although systems with feedback loops can also reach a dynamic equilibrium). Feedback loops contain at least one state variable., but due to the lack of a state variable, you are unable to “close” the loop. These systems can usually be addressed by adding a state variable in the form of a Material Delay A delay element that delays flows of materials (e.g., masses, volumes, items)..
- In other cases, the system does not represent a feedback loop, but instead represents a coupled process (that may not be dynamic at all). These systems can be solved by using Previous Value elements to close the recursive loop A system with circular logic that does not contain any state variables..
- In rare cases, GoldSim can sequence the system, but there may be more than one valid way to sequence the system, and these produce different results. This can occur, for example, if state variables that are impacted by an event (e.g., a discrete change) affect another element. Should the downstream element be updated before or after the state variable is modified? From the point of view of GoldSim, both sequences for the downstream element may be equally valid, but depending on the application, you may specifically require one instead of the other. In these cases, you can explicitly force a particular causality sequence to ensure that the model accurately represents your system.