ExperimentOrchestrator

Orchestrates a designed-experiment run from a pre-built DesignedExperimentIfc — either a ParallelDesignedExperiment (concurrent) or a DesignedExperiment (sequential). Branches on the concrete type to call the right simulateAll entry point.

Low-level API note: application and UI code should prefer KSLAppSession, which owns scope lifecycle, validation, warning emission, and dispatch across all supported run modes. This orchestrator remains public so lower-level tests and advanced integrations can exercise designed-experiment execution directly.

Capturing per-design-point snapshots via the onDesignPointComplete callback works for both variants — ParallelDesignedExperiment exposes the callback natively; DesignedExperiment was retrofitted to attach an InMemorySnapshotCollector per point so the same shape holds for both execution modes.

The returned RunHandle emits:

The resolved RunResult is RunResult.BatchCompleted carrying one snapshot per successfully completed design point.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun submit(experiment: DesignedExperimentIfc, numRepsPerDesignPoint: Int? = null, scope: CoroutineScope = CoroutineScope(SimulationDispatcher.default + SupervisorJob()), preRunWarnings: List<RunWarningType> = emptyList()): RunHandle

Submits the designed experiment for asynchronous execution.