diff --git a/docs/documentation/building_a_simulation/Simulation-Definition-File.md b/docs/documentation/building_a_simulation/Simulation-Definition-File.md index cdbed4b8d..b8b9fb839 100644 --- a/docs/documentation/building_a_simulation/Simulation-Definition-File.md +++ b/docs/documentation/building_a_simulation/Simulation-Definition-File.md @@ -254,7 +254,7 @@ requires a job class. SELF-SCHEDULINGjobs in the scheduled job loop that must schedule themselves when to run CYCLICjobs in the scheduled job loop that run cyclically according to their specified cycle time FREEZEjobs that are run during the freeze execution mode -CHECKPOINTjobs that are run when a checkpoint is dumpded or loaded +CHECKPOINTjobs that are run when a checkpoint is dumped or loaded Table SD_1 Trick-Provided Job Classes diff --git a/docs/documentation/running_a_simulation/Input-File.md b/docs/documentation/running_a_simulation/Input-File.md index 1153cbe25..9888b85c3 100644 --- a/docs/documentation/running_a_simulation/Input-File.md +++ b/docs/documentation/running_a_simulation/Input-File.md @@ -450,19 +450,31 @@ trick.freeze(trick.exec_get_sim_time() + 5.0) ## Checkpoint the Simulation -To checkpoint a simulation call `trick.checkpoint([])`. `trick.checkpoint()` called with no -arguments will checkpoint immediately. An optional checkpoint time may be provided to checkpoint some time -in the future. +`trick.checkpoint()` called with no arguments will checkpoint immediately. To checkpoint a simulation call `trick.checkpoint()`. +An optional checkpoint time may be provided to checkpoint some time in the future. When you supply a name, you can save the checkpoint to a specific file. For example, `trick.checkpoint()` creates a checkpoint in a file with the given name immediately. `trick.checkpoint(, )` saves a checkpoint in +the described file at the given time. ```python # Checkpoints immediately trick.checkpoint() +# Checkpoints immediately, saving to 'checkpoint_save' +trick.checkpoint("checkpoint_save") + # Checkpoints at an absolute time trick.checkpoint(100.0) +# Checkpoints at an absolute time, saving to 'late_checkpoint' +trick.checkpoint(100.0, "late_checkpoint") + # Checkpoints 5 seconds relative from the current sim_time trick.checkpoint(trick.exec_get_sim_time() + 5.0) + +# Checkpoints to 'checkpoint.txt' immediately +trick.checkpoint("checkpoint.txt") + +# Checkpoints to 'checkpoint2.txt' at an absolute time +trick.checkpoint(50.0, "checkpoint.txt") ``` ## Stopping the Simulation diff --git a/docs/documentation/simulation_capabilities/Checkpoints.md b/docs/documentation/simulation_capabilities/Checkpoints.md index 0f9aedb3f..eaa2e9fcd 100644 --- a/docs/documentation/simulation_capabilities/Checkpoints.md +++ b/docs/documentation/simulation_capabilities/Checkpoints.md @@ -13,8 +13,12 @@ trick.checkpoint_post_init(True|False) trick.checkpoint_end(True|False) # Save a checkpoint at a time in the future trick.checkpoint(