Response Interval
This class represents an interval of time over which statistical collection should be performed. An interval is specified by providing an interval start time and a duration. The duration must be finite and greater than zero.
Simulation responses in the form of instances of ResponseVariable, TimeWeighted, and Counter can be added to the interval for observation. New responses are created and associated with each of the supplied responses. The new responses collect observations associated with the supplied responses only during the specified interval. In the case of response variables or time weighted variables, the average response during the interval is observed. In the case of counters, the total count during the interval is observed.
If the interval is not associated with a ResponseSchedule, the interval may be repeated. In which case, the statistics are collected across the intervals. A repeated interval starts immediately after the previous duration. Note that for ResponseVariables that are observed, if there are no observations during the interval, then the average response during the interval is undefined (and thus not observed). Therefore, interval statistics for ResponseVariables are conditional on the occurrence of at least one observation. This is most relevant when the interval is repeated because intervals with no observations are not tabulated.
An interval that is still collecting when the warm-up event occurs is discarded: it observes nothing at all, neither an average for its responses, nor a total for its counters, nor its empty-interval indicator. The warm-up resets the very quantities that were captured when the interval started, so no figure computed by differencing them describes the interval, and an interval names a window that the reported value is supposed to belong to. A counter in this situation formerly reported a negative count. A warm-up falling exactly on an interval boundary straddles nothing and discards nothing. The discard is reported once per experiment through a warning, because the warm-up time and the interval schedule are both fixed and the situation therefore recurs identically in every replication.
This is deliberately the opposite of what TimeSeriesResponse does, because the two are built for opposite contexts. An interval names a window in a study that discards a warm-up period, whereas a time series is only slicing time and reports every period it slices.
Author
rossetti
Constructors
Properties
Indicates if the interval has been scheduled
The repeat flag controls whether the interval will repeat after its duration has elapsed. The default is false.
Intervals may be repeated. The represents the time that the interval last ended in time;
Intervals may be repeated. The represents the time that the interval last started in time;
Functions
Adds a Counter to the interval for data collection over the interval
Adds a ResponseVariable to the interval for data collection over the interval. By default, interval empty statistics are not collected.
This method should be overridden by subclasses that need actions performed after each replication. It is called after replicationEnded() has been called.
This method should be overridden by subclasses that need logic to be performed prior to an experiment. The beforeExperiment method allows model elements to be set up prior to the first replication within an experiment. It is called once before any replications occur.
Cancels the scheduling of the interval. Any statistical collection will not occur.
This method should be overridden by subclasses that need actions performed to initialize prior to a replication. It is called once before each replication occurs if the model element wants initialization. It is called after beforeReplication() is called