Simulation Snapshot
Immutable point-in-time snapshot of model state at a simulation lifecycle boundary.
Snapshots carry the existing KSLDatabase DTO classes directly, preserving element_id_fk relational integrity across all database tables. They are emitted by SimulationLifecycleBridge and consumed by InMemorySnapshotCollector and SnapshotBatchWriter.
Subscribers are expected to attach before simulation starts. Dynamic mid-run subscription is not supported.
Inheritors
Types
Link copied to clipboard
data class ExperimentCompleted(val simulationRun: SimulationRunTableData, val acrossRepStats: List<AcrossRepStatTableData>, val histograms: List<HistogramTableData>, val frequencies: List<FrequencyTableData>, val timeSeries: List<TimeSeriesResponseTableData>, val experiment: ExperimentTableData = ExperimentTableData()) : SimulationSnapshot
Emitted once after all replications of an experiment complete successfully.
Link copied to clipboard
data class ExperimentFailed(val errorMessage: String, val partialSimulationRun: SimulationRunTableData, val completedRepCount: Int) : SimulationSnapshot
Emitted if the experiment terminates due to an unhandled exception.
Link copied to clipboard
data class ExperimentStarted(val experiment: ExperimentTableData, val simulationRun: SimulationRunTableData, val modelElements: List<ModelElementTableData>, val controls: List<ControlTableData>, val rvParameters: List<RvParameterTableData>) : SimulationSnapshot
Emitted once before the first replication of an experiment.
Link copied to clipboard
data class ReplicationCompleted(val repId: Int, val withinRepStats: List<WithinRepStatTableData>, val withinRepCounterStats: List<WithinRepCounterStatTableData>, val batchStats: List<BatchStatTableData>) : SimulationSnapshot
Emitted once after each replication completes successfully.