ResponseInterval

class ResponseInterval @JvmOverloads constructor(parent: ModelElement, theDuration: Double, label: String?, aResponseSchedule: ResponseSchedule? = null) : ModelElement(source)

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.

Author

rossetti

Constructors

Link copied to clipboard
constructor(parent: ModelElement, theDuration: Double, label: String?, aResponseSchedule: ResponseSchedule? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Indicates if the interval has been scheduled

Link copied to clipboard

The repeat flag controls whether the interval will repeat after its duration has elapsed. The default is false.

Link copied to clipboard

Specifies when the interval is to start. If negative, then the interval will not be started, must not be infinite

Link copied to clipboard

Intervals may be repeated. The represents the time that the interval last ended in time;

Link copied to clipboard

Intervals may be repeated. The represents the time that the interval last started in time;

Functions

Link copied to clipboard

Adds a Counter to the interval for data collection over the interval

Link copied to clipboard
fun addResponseToInterval(theResponse: Response, intervalEmptyStatOption: Boolean = false): Response
fun addResponseToInterval(theResponse: ResponseCIfc, intervalEmptyStatOption: Boolean = false): Response

Adds a ResponseVariable to the interval for data collection over the interval. By default, interval empty statistics are not collected.

Link copied to clipboard
Link copied to clipboard

Cancels the scheduling of the interval. Any statistical collection will not occur.

Link copied to clipboard
open override fun toString(): String

Includes the model name, the id, the model element name, the parent name, and parent id