LevelResponse

class LevelResponse @JvmOverloads constructor(variable: Variable, theLevel: Double, stats: Boolean = true, theName: String? = null) : ModelElement(source)

Collects statistics on whether a specific level associated with a variable is maintained. Basic statistics collected include:

  • StateFrequency above and below the level

  • time spent above and below the level

  • the distance above and below the level

  • the time-weighted deviation above and below the level

  • the time-weighted deviation from the level

  • the maximum deviation above and below the level

  • the percentage of time above and below the level

  • the total time above and below the level

  • the total absolute deviation from the level

  • the proportion of the deviation above and below the level

  • the relative positive and negative deviation from the level

Extra statistics collected if the statistics option is true:

  • the average time spent above and below the level

  • the maximum time spent above and below the level

  • the probability transitions from above to below, above to above, below to above, and below to below

  • the number of transitions from above to below, above to above, below to above, and below to below

Parameters

variable

the response to observe

theLevel

the level to associate with the response

stats

whether detailed state change statistics are collected

theName

the name of the response

Constructors

Link copied to clipboard
constructor(variable: Variable, theLevel: Double, stats: Boolean = true, theName: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

true if detailed state change statistics are collected

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Causes the cancellation of the observation interval events

Link copied to clipboard
Link copied to clipboard
fun scheduleObservationInterval(startTime: Double, duration: Double)

Causes an observation interval to be specified. An observation interval is an interval of time over which the response statistics will be collected. This method will cause events to be scheduled (at the start of the simulation) that represent the interval.