InputMap

Two InputMaps are considered equal if their (name, value) pairs are the same. This class prevents the keys and values from changing. This prevents an input map associated with a solution from being changed. InputMap instances are the keys for solution caches. Thus, we cannot change the key of the solution cache. The user cannot construct an input map that is infeasible with respect to the input variable ranges.

Parameters

map

the map containing the (name, value) pairs associated with inputs for the evaluation process. These names and values must be valid with respect to the problem. The name must be a valid name for the problem, and the value must be within the input variable's defined range of possible values.

Properties

Link copied to clipboard
open override val entries: Set<Map.Entry<String, Double>>
Link copied to clipboard
Link copied to clipboard
open override val keys: Set<String>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val size: Int
Link copied to clipboard
open override val values: Collection<Double>

Functions

Link copied to clipboard

A copy of the input map as a mutable map

Link copied to clipboard

Computes the box plot summaries for the data within the map

Link copied to clipboard
fun changeInputVariable(inputName: String, value: Double): InputMap

Creates a new instance of an InputMap that is a copy of the current instance but with the value associated with the specified inputName changed to the provided value

Link copied to clipboard

Computes the confidence intervals for the data in the map

Link copied to clipboard
open override fun containsKey(key: String): Boolean
Link copied to clipboard
open override fun containsValue(value: Double): Boolean
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open operator override fun get(key: String): Double?
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard

Interprets the supplied map as inputs for the problem definition and returns true if the values are within functional constraints. False will be returned if at least one functional constraint is infeasible.

Link copied to clipboard
open override fun isInputFeasible(): Boolean

The supplied input is considered input-feasible if it is feasible with respect to the defined input parameter ranges, the linear constraints, and the functional constraints.

Link copied to clipboard
open override fun isInputRangeFeasible(): Boolean

Interprets the supplied map as inputs for the problem definition and returns true if the values are within the ranges defined for the variables. False will be returned if at least one input variable is not within its defined range.

Link copied to clipboard
open override fun isLinearConstraintFeasible(): Boolean

Interprets the supplied map as inputs for the problem definition and returns true if the values are within linear constraints. False will be returned if at least one linear constraint is infeasible.

Link copied to clipboard

The map of arrays is considered rectangular if all arrays in the map have the same number of elements (same size).

Link copied to clipboard
fun perturbedBy(stepSize: Double, rnStream: RNStreamIfc = KSLRandom.defaultRNStream()): InputMap

Perturbs the current input values by the supplied step size. Each input is randomly increased or decreased by the step size. The likelihood of increasing or decreasing the value is equally likely.

Link copied to clipboard
fun randomizeInputVariable(rnStream: RNStreamIfc = KSLRandom.defaultRNStream(), name: String = problemDefinition.randomInputName(rnStream)): InputMap

Randomly generates a new value for the named input variable and returns a new input map. Randomization is uniformly distributed over the range of the input variable with no memory of its current value.

Link copied to clipboard
fun <K, V : Comparable<V>> Map<K, V>.sortMapByValue(): Map<K, V>
Link copied to clipboard
Link copied to clipboard

Computes the statistical summaries for the data within the map

Link copied to clipboard

Converts the data map to a 2-D array. The values of the map are extracted

Link copied to clipboard
fun Map<String, DoubleArray>.toDataFrame(): AnyFrame

Converts the data stored in each array to columns within a DataFrame, with the column names as the key from the map and the columns holding the data. Each array must have the same size.

Link copied to clipboard
Link copied to clipboard

Converts the inner DoubleArray to List

Link copied to clipboard
fun Map<String, DoubleArray>.toObservationData(tableName: String = "tblObservations", context: String? = null, subject: String? = null): List<ObservationDataDb>

Converts the data map to a long format view of the observations.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun validateInputVariable(inputName: String, value: Double): Boolean

Checks if the supplied value is a valid input value for the supplied input name.