ModelInputs

@Serializable
data class ModelInputs(val modelIdentifier: String, val numReplications: Int, val inputs: Map<String, Double> = emptyMap(), val responseNames: Set<String> = emptySet(), val requestTime: Instant = Clock.System.now())(source)

The data associated with a request for a simulation evaluation. A critical aspect of this implementation is how the equality of instances is determined.

Two instances of ModelInputs are considered equal if:

  1. the modelIdentifier properties are equal, and

  2. the responseNames properties are equal (contain all the same response names), and

  3. the inputs properties are equal (contain the same (key, value) pairs)

Note 1: Two instances are still equal if their number of replications are different. Note 2: The inputs property may be empty. This indicates that the current values for the model's inputs will be used. Note 3: The responseNames property may be empty. If empty, then all responses from the simulation are requested to be returned as a result of the evaluation. Note 4: If inputs and responseNames are both empty, equality is determined solely by the modelIdentifier.

Parameters

modelIdentifier

the model identifier associated with the simulation model that will be executed

numReplications

the number of replications to run the model. Must be greater than 0. This value will override a specification for the number of replications supplied by any experimental run parameters.

inputs

The input variable and its value for parameterizing the run of the simulation. If empty, the current values for the inputs will be used for the simulation.

responseNames

the names of the response variables requested from the simulation results. If no response names are provided, then all responses from the simulation will be returned. The default is all responses from the model.

requestTime

the instant that the request was constructed

Constructors

Link copied to clipboard
constructor(modelIdentifier: String, numReplications: Int, inputs: Map<String, Double> = emptyMap(), responseNames: Set<String> = emptySet(), requestTime: Instant = Clock.System.now())

Properties

Link copied to clipboard
Link copied to clipboard

The values of the input parameters as an array. The order of the array is based on the order of the input variables in the map of input variables.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val requestTime: Instant
Link copied to clipboard

Functions

Link copied to clipboard

Returns true if the names of the inputs and the names of the responses are the same. If both inputs are empty, this is considered equal. If both response names are empty, this is considered equal. For the not empty cases, the contents must match.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Equals is based on modelIdentifier, inputs, and response names all being the same.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun instance(numReplications: Int): ModelInputs

Creates a duplicate instance of the object with the specified number of replications.

Link copied to clipboard
fun names(): Set<String>

Returns the names of the inputs and the responses as a set.