ConcurrentScenarioRunner

constructor(name: String, scenarioList: List<Scenario> = emptyList(), pathToOutputDirectory: Path = KSL.createSubDirectory(sanitizeForFilesystem(name) + "_OutputDir"), kslDb: KSLDatabase = KSLDatabase("${sanitizeForFilesystem(name)}.db", pathToOutputDirectory), useScenarioOutputDirs: Boolean = true)(source)

Parameters

name

Runner name; also used as the default database file stem and output directory name.

scenarioList

Initial list of scenarios to register.

pathToOutputDirectory

Root directory under which per-scenario output sub-directories are created.

kslDb

Shared database that receives all scenario results.

useScenarioOutputDirs

When true (the default, preserving the original behaviour), every scenario gets its own subdirectory under pathToOutputDirectory named <scenarioName>_OutputDir; each subdir contains that scenario's kslOutput.txt and any per- scenario CSV / plot artifacts the model writes. When false, every per-scenario model writes directly into pathToOutputDirectory and the diagnostic log uses a scenario- distinguished filename (kslOutput_<scenarioName>.txt) so concurrent writers don't clash and re-runs overwrite cleanly. Parallel to ParallelDesignedExperiment.useDesignPointOutputDirs — same substrate-level knob shape for the per-item-subdir question that the two runners share.