Scenario

constructor(modelBuilder: ModelBuilderIfc, name: String, inputs: Map<String, Double> = emptyMap(), stringInputs: Map<String, String> = emptyMap(), jsonInputs: Map<String, String> = emptyMap(), runParameters: ExperimentRunParameters, modelConfiguration: Map<String, String>? = null, modelConstructionMode: ScenarioModelConstructionMode = ScenarioModelConstructionMode.MODEL_BUILDER)(source)

Parameters

modelBuilder

Factory that creates the Model instance for each run.

name

The scenario name. Must be unique within the set of scenarios executed by a runner. Also used as the experiment name.

inputs

Numeric control and RV-parameter overrides (key → Double).

stringInputs

String control overrides (key → String).

jsonInputs

JSON control overrides (key → JSON String).

runParameters

Full experimental run configuration for this scenario.

modelConfiguration

Optional model configuration map forwarded to ModelBuilderIfc.build before each run.


constructor(model: Model, name: String, inputs: Map<String, Double> = emptyMap(), stringInputs: Map<String, String> = emptyMap(), jsonInputs: Map<String, String> = emptyMap(), runParameters: ExperimentRunParameters = model.extractRunParameters(), modelConfiguration: Map<String, String>? = null)(source)

Backward-compatible constructor. The supplied model is wrapped so that each simulate call operates on the same instance.

Sequential use only. Do not submit scenarios constructed this way to ConcurrentScenarioRunner.

Input keys are validated against model at construction time.

Parameters

model

The model to be simulated.

name

The scenario name.

inputs

Numeric control and RV-parameter overrides.

stringInputs

String control overrides.

jsonInputs

JSON control overrides.

runParameters

Full run configuration. Defaults to a snapshot of model's current run parameters captured at construction time.

modelConfiguration

Optional model configuration map.


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

Convenience constructor for the common case where only the three scalar run-parameter values need to differ from model's current settings.

Sequential use only. Do not submit scenarios constructed this way to ConcurrentScenarioRunner.

Parameters

model

The model to be simulated.

name

The scenario name.

inputs

Numeric control and RV-parameter overrides.

numberReplications

Replications for this scenario.

lengthOfReplication

Replication length for this scenario.

lengthOfReplicationWarmUp

Warm-up length for this scenario.

modelConfiguration

Optional model configuration map.


constructor(modelBuilder: ModelBuilderIfc, name: String, inputs: Map<String, Double> = emptyMap(), numberReplications: Int, lengthOfReplication: Double, lengthOfReplicationWarmUp: Double = 0.0, modelConfiguration: Map<String, String>? = null)(source)

Convenience constructor for use with a ModelBuilderIfc. The builder is invoked once at construction time to extract default run parameters; the returned model is then discarded. The three scalar values override the defaults.

Scenarios constructed this way are safe for both ScenarioRunner and ConcurrentScenarioRunner.

Parameters

modelBuilder

Factory that creates the model for each run.

name

The scenario name.

inputs

Numeric control and RV-parameter overrides.

numberReplications

Replications for this scenario.

lengthOfReplication

Replication length.

lengthOfReplicationWarmUp

Warm-up length.

modelConfiguration

Optional model configuration map.