Variable
Simulation models may use many variables that define the state of the component/system being modeled. Within the context of stochastic simulation the values of the variables may change during the execution of a replication (i.e., the generation of a sample path). It is important to ensure that each replication starts in the same state (i.e., with the same initial conditions). Thus, if variable values change during the replication, the value of the variable must be returned to its initial value prior to the execution of the next replication. The purpose of this class is to facilitate the specification of the initial value and the resetting to the initial value prior to the experiments and the future replications. Additionally, the value of a variable might need to be constrained to a legally specified range or interval. Because of the random nature of simulation, model logic might attempt to set the value of a variable outside its legal set of values. This class allows the specification of a valid interval for the variable. If the user attempts to set the value outside this interval, then an exception will be thrown. This facilitates validation of the model.
Author
rossetti@uark.edu
Parameters
the parent (containing) model element for this variable
the initial value, defaults to 0.0
the validity interval, defaults to NEGATIVE_INFINITY, POSITIVE_INFINITY
The name of the variable will be auto-defined if null.
Inheritors
Constructors
Properties
Sets the initial value of the variable. Only relevant prior to each replication. Changing during a replication has no effect until the next replication.
The previous value, before the current value changed