Starting and Stopping Simulations
Create a new simulation
Start the simulation
Request that the simulation be started. If successful, the simulation will transition from INACTIVE → REQUESTING → PROVISIONING → PREPARE_BOOT → BOOTING → ACTIVE.
Shut down the simulation
Request that the simulation be shut down. Unless you specifically pass create_checkpoint=False, Air will default to saving a new checkpoint while shutting down. If successful, the simulation will transition from ACTIVE → PREPARE_SHUTDOWN → SHUTTING_DOWN → SAVING → INACTIVE.
Shut down the simulation without a checkpoint
Pass create_checkpoint=False when you request shutdown to not create a new checkpoint. The simulation will then transition from ACTIVE -> PREPARE_PURGE -> PURGING -> INACTIVE.
Checkpoints
When a shutdown creates a checkpoint, Air persists the simulation state so you can restore later. Use sim.checkpoints to list, update metadata, rebuild the simulation from a snapshot, or delete a checkpoint you no longer need.
List checkpoints
Iterate sim.checkpoints.list(). You can optionally filter, e.g. state='COMPLETE'.
You can optionally filter, e.g. state='COMPLETE'.
Update a checkpoint
Rename a checkpoint or toggle favorite with update() on the checkpoint object.
favorite tells Air to prefer keeping this checkpoint if it ever has to automatically delete older ones to stay within your org’s checkpoint limit.
Rebuild the simulation
With the simulation ACTIVE, rebuild() tears down and recreate its nodes. Wait until ACTIVE again so the rebuild finishes.
Rebuild from a specific checkpoint
If you pass a checkpoint into rebuild(), Air rebuilds the nodes and restores them from that checkpoint’s saved state.