ScenarioSpec

@Serializable
data class ScenarioSpec(val name: String, val modelReference: ModelReference, val runOverrides: ExperimentRunOverrides? = null, val controlOverrides: ModelControlsExport = ModelControlsExport(modelName = ""), val rvOverrides: List<RVParameterOverride> = emptyList(), val modelConfiguration: Map<String, String>? = null, val skipOnRun: Boolean = false, val enableReplicationCSV: Boolean = false, val enableExperimentCSV: Boolean = false)(source)

Serialisable specification for a single scenario in a scenarios document.

Each scenario is self-contained: it carries its own modelReference (which model from which bundle), its own partial overrides relative to that model's defaults, and its own name. There is no inheritance from a document-level "parent" — RunConfiguration is a thin container that holds bundle references and the list of scenarios; it does not own defaults that scenarios fall back to.

Override semantics are uniform across all four override surfaces:

  • runOverrides — partial run-parameter overrides; null means "use the model's ExperimentRunDefaults for every field." Non-null overlays only the fields the user set.

  • controlOverrides — control-key → value overrides for the model's declared controls (numeric / string / JSON); an empty export means no overrides.

  • rvOverrides — per-RV-parameter overrides; an empty list means no overrides.

  • modelConfiguration — optional Map<String, String> forwarded to the bundle author's ModelBuilderIfc.build(...); null means no map is supplied (distinct from an empty map, which is supplied but contains nothing).

ksl.app.orchestrator.ScenarioOrchestrator.buildScenario resolves this spec at submit time by:

  1. Resolving modelReference against the document's bundle registry (built from RunConfiguration.bundleRefs).

  2. Computing the runtime ksl.controls.experiments.ExperimentRunParameters as model.extractRunParameters() + runOverrides.applyTo(...), with experimentName set to name.

  3. Applying controlOverrides, then rvOverrides.

  4. Honoring skipOnRun (excluded from the runnable set at submit time when true).

Constructors

Link copied to clipboard
constructor(name: String, modelReference: ModelReference, runOverrides: ExperimentRunOverrides? = null, controlOverrides: ModelControlsExport = ModelControlsExport(modelName = ""), rvOverrides: List<RVParameterOverride> = emptyList(), modelConfiguration: Map<String, String>? = null, skipOnRun: Boolean = false, enableReplicationCSV: Boolean = false, enableExperimentCSV: Boolean = false)

Properties

Link copied to clipboard

control overrides for this scenario; an empty export (the default) leaves model control values unchanged.

Link copied to clipboard

when true, the orchestrator turns on Model.autoExperimentCSVReports for this scenario so across-replication summary statistics are written to the scenario's output directory. Independent of any document-level CSV setting and of enableReplicationCSV. Default false.

Link copied to clipboard

when true, the orchestrator turns on Model.autoReplicationCSVReports for this scenario so per-replication response data is written to the scenario's output directory. Independent of any document-level CSV setting and of enableExperimentCSV. Default false.

Link copied to clipboard

optional model-construction map forwarded to ModelBuilderIfc.build; null (the default) supplies no map.

Link copied to clipboard

which model the scenario runs; the bundled (bundleId, modelId) form is the typical choice (ModelReference.ByBundleAndModelId) when authoring through the GUI; legacy references (ByProviderId / ByJar) are still accepted for programmatic constructions.

Link copied to clipboard

user-given scenario name; unique within the enclosing RunConfiguration.scenarios. Used as the experiment name for the run.

Link copied to clipboard

per-field run-parameter overrides; null when the scenario inherits every model default.

Link copied to clipboard

RV parameter overrides; an empty list (the default) leaves model RV parameters unchanged.

Link copied to clipboard

when true, the orchestrator excludes this scenario from the runnable set even if it is otherwise valid; useful for staging which scenarios to run.