Concurrent Simulation Runner
Coroutine-aware runner for one simulation model and one SimulationRun.
This class intentionally does not manage lists of scenarios or design points. Higher-level concurrent components launch their own child coroutines and use one ConcurrentSimulationRunner per fresh Model. Keeping this class single-run focused lets it share SimulationRunner's setup/result semantics while adding only the cooperative cancellation behavior needed by concurrent workflows.
Functions
Link copied to clipboard
suspend fun simulate(simulationRun: SimulationRun, onReplicationStarted: suspend (Int, Int) -> Unit? = null, onReplicationEnded: suspend (Int, Int) -> Unit? = null): SimulationRun
Runs simulationRun using the public replication-step API on Model.
suspend fun simulate(modelIdentifier: String = model.modelIdentifier, inputs: Map<String, Double> = mapOf(), stringInputs: Map<String, String> = mapOf(), jsonInputs: Map<String, String> = mapOf(), experimentRunParameters: ExperimentRunParameters = model.extractRunParameters()): SimulationRun
Builds a SimulationRun and executes it cooperatively.