ResponseMap

@Serializable
data class ResponseMap(val modelIdentifier: String, val responseNames: Set<String>, map: MutableMap<String, EstimatedResponse> = mutableMapOf()) : Map<String, EstimatedResponse>

A response map holds replication data from evaluations of the simulation oracle. The key to the map is the response name, which should match a named response within the simulation model and within the problem definition. The associated list of doubles is the within replication average for each replication.

Parameters

map

the map containing the output values for each response

Constructors

Link copied to clipboard
constructor(modelIdentifier: String, responseNames: Set<String>, map: MutableMap<String, EstimatedResponse> = mutableMapOf())

Properties

Link copied to clipboard
Link copied to clipboard
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
Link copied to clipboard
open override val values: Collection<EstimatedResponse>
Link copied to clipboard

Functions

Link copied to clipboard
fun add(estimate: EstimatedResponse)

Adds the supplied estimated response. If the estimated response is not currently in the response map, then it is added. If it is already in the response map, the old value is replaced with the supplied value.

Link copied to clipboard

Computes the box plot summaries for the data within the map

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: EstimatedResponse): Boolean
Link copied to clipboard
open operator override fun get(key: String): EstimatedResponse?
Link copied to clipboard

Checks if all responses associated with the problem are currently in the map. True if all responses needed for the problem are in the map. False if at least one required response is missing from the map.

Link copied to clipboard
fun hasRequestedReplications(numReplications: Int): Boolean

Checks if all the responses and a sufficient number of replications are available in the response map. Once this is true, the response map can be converted into a solution.

Link copied to clipboard
open override fun isEmpty(): Boolean
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 merge(estimate: EstimatedResponse)

Adds or merges the supplied estimated response

Link copied to clipboard
fun mergeAll(responseMap: ResponseMap)

Adds or merges the supplied estimated responses within the response map into the response map

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.