Experiment Orchestrator
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:
one RunEvent.DesignPointCompleted per design point (in commit order)
a terminal RunEvent.RunCompleted (or RunEvent.RunFailed)
The resolved RunResult is RunResult.BatchCompleted carrying one snapshot per successfully completed design point.
Functions
Submits the designed experiment for asynchronous execution.