Scenario

constructor(modelCreator: () -> Model, name: String, inputs: Map<String, Double> = emptyMap())

Uses the supplied model creation function to creat the model. The specification of model run parameters relies on the created model to correctly specify its running parameter.

Parameters

modelCreator

a function that will create the model (supply and instance of the model)

name

The name of the scenario. It should be unique within the context of a set of scenario being executed by a ScenarioRunner.

inputs

The map of inputs (based on control names) to apply to the model.


constructor(model: Model, name: String, inputs: Map<String, Double> = emptyMap(), numberReplications: Int = model.numberOfReplications, lengthOfReplication: Double = model.lengthOfReplication, lengthOfReplicationWarmUp: Double = model.lengthOfReplicationWarmUp)

Parameters

model

The model to be simulated

name

The name of the scenario. It should be unique within the context of a set of scenario being executed by a ScenarioRunner.

inputs

The map of inputs (based on control names) to apply to the model.

numberReplications

the number of replications for the scenario. By default, this is the current setting of the model.

lengthOfReplication

the length of each replication for the scenario. By default, this is the current setting of the model.

lengthOfReplicationWarmUp

the length of the warmup period for each replication for the scenario. By default, this is the current setting of the model.