IntegerFrequencyResponse

class IntegerFrequencyResponse(parent: ModelElement, name: String, lowerLimit: Int = Int.MIN_VALUE, upperLimit: Int = Int.MAX_VALUE, myIntegerFrequency: IntegerFrequency = IntegerFrequency( name = "${name}_Frequency", lowerLimit = lowerLimit, upperLimit = upperLimit )) : ModelElement, IntegerFrequencyIfc

This class tabulates the frequency associated with the integers presented to it based on the attached variable. Every value presented is interpreted as an integer For every value presented a count is maintained. There could be space/time performance issues if the number of different values presented is large. Use lowerLimit and upperLimit to limit the values that can be observed. Values lower than the lower limit are counted as underflow and values greater than the upper limit are counted as overflow.

The frequency tabulates all within replication observations regardless of replication. That is, the frequency is based on every observation for every replication. It observes observations that may have been within a warmup period even if the modeler specifies a warmup period.

This class can be useful for tabulating a discrete histogram over the values (integers) presented.

Author

rossetti

Parameters

parent

the parent of this model element

lowerLimit

the defined lower limit of the integers, values less than this are not tabulated

upperLimit

the defined upper limit of the integers, values less than this are not tabulated

name

a name for the instance

Constructors

Link copied to clipboard
constructor(parent: ModelElement, name: String, intRange: IntRange = Int.MIN_VALUE..Int.MAX_VALUE)

This class tabulates the frequency associated with the integers presented to it based on the attached variable. Every value presented is interpreted as an integer For every value presented a count is maintained. There could be space/time performance issues if the number of different values presented is large. Use intRange to limit the values within the specified range that can be observed. Values lower than the lower limit are counted as underflow and values greater than the upper limit are counted as overflow.

constructor(parent: ModelElement, name: String, lowerLimit: Int = Int.MIN_VALUE, upperLimit: Int = Int.MAX_VALUE, myIntegerFrequency: IntegerFrequency = IntegerFrequency( name = "${name}_Frequency", lowerLimit = lowerLimit, upperLimit = upperLimit ))

Properties

Link copied to clipboard

A flag to control whether the model element reacts to after experiment actions.

Link copied to clipboard

A flag to control whether the model element reacts to after replication actions.

Link copied to clipboard

A flag to control whether the model element reacts to before experiment actions.

Link copied to clipboard

A flag to control whether the model element reacts to before replication actions.

Link copied to clipboard
open override val closedRange: ClosedRange<Int>

Returns a closed range over the observed integer values

Link copied to clipboard
Link copied to clipboard

Indicates the current status of the model element for observers of ModelElement.Status

Link copied to clipboard
open override val frequencies: IntArray

Returns an array of size numberOfCells containing the frequencies for each value observed. The 0th element is the frequency for the value stored at element 0 of the array returned by the values property

Link copied to clipboard
open override val id: Int
Link copied to clipboard

A flag to control whether the model element reacts to initialization actions

Link copied to clipboard
open override var label: String?
Link copied to clipboard

the left traversal count for pre-order traversal of the model element tree

Link copied to clipboard
open override val lowerLimit: Int

The lower limit that defines values that will not be observed, but counted as underflow.

Link copied to clipboard
open override val max: Int

The largest integer observed

Link copied to clipboard
open override val min: Int

The smallest integer observed

Link copied to clipboard

the model that contains this element

Link copied to clipboard

Returns a string representation of the model element and its child model elements. Useful for realizing the model element hierarchy.

Link copied to clipboard

A flag to control whether the model element participates in monte carlo actions.

Link copied to clipboard
override val name: String
Link copied to clipboard

Gets the number of model elements contained by this model elements.

Link copied to clipboard
open override val numberOfValues: Int

Returns the number of cells tabulated This is also the total number of different integers observed

Link copied to clipboard
open override val overFlowCount: Int

The number of observations that fell past the last bin's upper limit

Link copied to clipboard

Indicates the previous status of the model element for observers of ModelElement.Status This allows the transition to be noted by observers

Link copied to clipboard
open override val proportions: DoubleArray

Returns an array of size numberOfCells containing the proportion by value. The 0th element is the proportion for the value stored at element 0 of the array returned by the values property, etc.

Link copied to clipboard
open override val range: Int

The range of integer values observed (max - min)

Link copied to clipboard

A flag to control whether the model element reacts to end replication actions.

Link copied to clipboard

the right traversal count for pre-order traversal of the model element tree

Link copied to clipboard

The spatial model associated with this model element. By default, each model element uses its parent model element's spatial model unless changed via this property. This changes the spatial model for this model element and no others.

Link copied to clipboard

The current simulation time

Link copied to clipboard

The time interval between TimedUpdate events. The default is zero, indicating no timed update

Link copied to clipboard

Specifies whether this model element participates in time update event specified by its parent

Link copied to clipboard

Specifies the havingPriority of this model element's timed update event.

Link copied to clipboard
open override val totalCount: Double

The total count associated with the values The total number of values observed

Link copied to clipboard
open override val underFlowCount: Int

The number of observations that fell below the first bin's lower limit

Link copied to clipboard
open override val upperLimit: Int

The upper limit that defines values that will not be observed, but counted as overflow.

Link copied to clipboard
var value: Int
Link copied to clipboard

Returns Map holding the values and cumulative proportions as arrays with keys "values" and "cumulativeProportions"

Link copied to clipboard
open override val valueFrequencies: Map<String, IntArray>

Returns Map holding the values and frequencies as arrays with keys "values" and "frequencies"

Link copied to clipboard
open override val valueProportions: Map<String, DoubleArray>

Returns Map holding the values and proportions as arrays with keys "values" and "proportions"

Link copied to clipboard
open override val values: IntArray

Returns an array of size numberOfCells containing the observed values increasing by value. The 0th element of the array contains the smallest value observed, 1st element the next bigger value, etc.

Link copied to clipboard

Indicates whether the warm-up action occurred sometime during the simulation for this model element. False indicates that the warm-up action has not occurred

Link copied to clipboard

Specifies if this model element will be warmed up when the warmup action occurs for its parent. The warm-up flag indicates whether this model element will be warmed up when its parent warm up event/action occurs. The default value for all model elements is true. A value of true implies that the model element allows its parent's warm up event to call the warm-up action. A value of false implies that the model element does not allow its parent's warm up event to call the warm-up action. False does not necessarily mean that the model element will not be warmed up. It may, through the use of the lengthOfWarmUp property, have its own warm up event and action.

Link copied to clipboard

Specifies the priority of this model element's warm up event.

Functions

Link copied to clipboard
open override fun assignCellLabels(labels: Map<Int, String>)

Assigns a string label to each observed integer value. If the integer values in the labels map is not one of the observed values then no assignment occurs and the default label is used. This should be done after collection because cells are created during the collection process.

Link copied to clipboard

Cancels the timed update event for this model element.

Link copied to clipboard

Cancels the warm-up event for this model element.

Link copied to clipboard
open override fun cellList(): List<IntegerFrequency.Cell>

Returns a copy of the cells in a list ordered by the value of each cell, 0th element is cell with the smallest value (integer) observed, etc

Link copied to clipboard
open override fun cells(): List<IntegerFrequency.Cell>

Returns a sorted list containing the cells

Link copied to clipboard

Returns a copy of the cells in a list ordered by the count of each cell, 0th element is cell with the largest count, etc

Link copied to clipboard

Checks if this model element or any model element directly above this model element in the hierarchy of model elements all the way until the top Model participates in the warm-up action.

Link copied to clipboard
fun collect(value: Double)
fun collect(value: Int)
Link copied to clipboard
open override fun createDEmpiricalCDF(): DEmpiricalCDF
Link copied to clipboard
open override fun cumulativeFrequency(i: Int): Double

Returns the cumulative frequency up to an including i

Link copied to clipboard
open override fun cumulativeProportion(i: Int): Double

Returns the cumulative proportion up to an including i

Link copied to clipboard
fun day(): Double

Returns the value of a 1-day time interval in terms of the base time unit

Link copied to clipboard

Find the first parent that has its own warm up event this guarantees that all elements below the found model element do not have their own warm-up event. A model element that has its own warm up event also opts out of the warm-up action. If the returned parent is the Model, then all are controlled by the model (unless they opt out). Elements can opt out and not have their own warm-up event. Thus, they have no warm up at all.

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

Text output for the frequency without the summary statistics.

Link copied to clipboard
open override fun frequencies(x: IntArray): DoubleArray

Interprets the elements of x[] as values and returns an array representing the frequency for each value

Link copied to clipboard
open override fun frequency(x: Int): Double

Returns the current frequency for the provided integer

Link copied to clipboard
open override fun frequencyData(): List<FrequencyData>

Returns the data associated with the tabulation.

Link copied to clipboard
open override fun frequencyPlot(proportions: Boolean): IntegerFrequencyPlot

Creates a plot for the integer frequencies. The parameter, proportions indicates whether proportions (true) or frequencies (false) will be shown on the plot. The default is false.

Link copied to clipboard

Fills up the supplied StringBuilder carrying a string representation of the model element and its child model elements Useful for realizing the model element hierarchy.

Link copied to clipboard

This method returns the planned time for the warm-up for this model element.

Link copied to clipboard
fun hour(): Double

Returns the value of a 1-hour time interval in terms of the base time unit

Link copied to clipboard

Fills a StringBuilder carrying the model element names in the order that they will be initialized

Link copied to clipboard

Checks if a warm-up event is scheduled for any model element directly above this model element in the hierarchy of model elements all the way until the top Model.

Link copied to clipboard

Checks if current status is the supplied status

Link copied to clipboard

Checks if a timed update event has been scheduled for this model element

Link copied to clipboard

Checks if a warm-up event has been scheduled for this model element

Link copied to clipboard

Returns the value of a 1 millisecond time interval in terms of the base time unit

Link copied to clipboard
fun minute(): Double

Returns the value of a 1-minute time interval in terms of the base time unit. For example, if the time unit is set to hours, then minute() should return 0.0166 (TIME_UNIT_MINUTE/TIME_UNIT_HOUR)

Link copied to clipboard
open override fun proportion(x: Int): Double

Gets the proportion of the observations that are equal to the supplied integer

Link copied to clipboard
fun second(): Double

Returns the value of a 1-second time interval in terms of the base time unit

Link copied to clipboard

Sets the after experiment option of all model elements (children) contained by this model element.

Sets the after replication flag of all model elements (children) contained by this model element.

Sets the before experiment option of all model elements (children) contained by this model element.

Sets the before replication flag of all model elements (children) contained by this model element.

Link copied to clipboard

Sets the initialization option of all model elements (children) contained by this model element.

Link copied to clipboard

Sets the monte carlo option flag of all model elements (children) contained by this model element.

Sets the end replication option flag of all model elements (children) contained by this model element. Determines whether the replicationEnded() method will be called

Link copied to clipboard

Sets the timed update option flag of all model elements (children) contained by this model element.

Link copied to clipboard

Sets the warm-up option flag of all model elements (children) contained by this model element.

Link copied to clipboard

Converts the integer frequency data into a dataframe representation

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

Link copied to clipboard
fun week(): Double

Returns the value of a 1-week time interval in terms of the base time unit