pub struct CheckpointControl<'a> {
pub resume: Option<&'a Checkpoint>,
pub every: Option<f64>,
pub on_checkpoint: Option<&'a mut CheckpointSink<'a>>,
pub final_snapshot: bool,
}Expand description
How a run interacts with checkpoints — see simulate_transient_with_blocks_checkpointed.
Fields§
§resume: Option<&'a Checkpoint>Continue from this snapshot instead of from x_initial/ic=/rest. t_final is still
absolute simulated time; a checkpoint at or past it yields an empty run.
every: Option<f64>Hand a fresh snapshot to on_checkpoint every time this much simulated time has passed
since the last one (the first interval counts from the run’s start). None: only the
final snapshot is returned, none are handed out mid-run.
on_checkpoint: Option<&'a mut CheckpointSink<'a>>Receives each mid-run snapshot (see every). Typically writes it to a file.
final_snapshot: boolReturn the run’s final state as a snapshot. Off by default so a run that never asked for
a checkpoint (every pre-existing caller) is unaffected by an escape-hatch block whose
state cannot be snapshotted – see DaeError::CheckpointUnsupportedBlock.