# Clarification on save/load\_checkpoint() and populate\_from\_csv!()

**URL:** <https://discourse.julialang.org/t/clarification-on-save-load-checkpoint-and-populate-from-csv/129990>\
**Category:** Modelling & Simulations\
**Tags:** agents, agentsjl\
**Created:** [June 18, 2025, 1:32pm UTC](https://discourse.julialang.org/t/clarification-on-save-load-checkpoint-and-populate-from-csv/129990 "2025-06-18T13:32:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![elisadonati23](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elisadonati23/32/205472_2.png) [@elisadonati23](https://discourse.julialang.org/u/elisadonati23)\
**Post date:** [June 18, 2025, 1:32pm UTC](https://discourse.julialang.org/t/clarification-on-save-load-checkpoint-and-populate-from-csv/129990/1 "2025-06-18T13:32:23Z")

</div>

Dear all,

I’m working on a relatively large **agent-based model (ABM)** for fish populations, without explicit spatial structure, using Agents.jl. The model includes individual stochasticity in parameter values and uses multi-threading. To ensure reproducibility, all stochastic processes are driven using `rand(abmrng(model))` .

I’ve structured my simulation in two phases:

1. **Spin-up phase** : The model runs under **climatological (reference) environmental conditions**, allowing the population to reach a stable structure.
2. **Scenario phase** : Starting from the stable state, I want to apply **three different temporal environmental scenarios**.

Atm, the environmental timeseries (e.g. temperature ) are passed at initialization as vectors included in `model.properties`, so they cover both the spin-up period and the subsequent scenario period.

I would like to run the spin-up period once, save the model state at the end using `save_checkpoint(model)`, and then **reload it** using `load_checkpoint(...)` to apply the three different environmental scenarios _from the same population structure_.

However, from the documentation I understand that:

- `save_checkpoint()` and `load_checkpoint()` do not save or reload function references to step the simulation.
- It is not possible to change `model.properties`\*\* after reloading from a checkpoint. This means I cannot swap the environmental forcing vectors from spin-up only values to perturbation scenarios.

My questions:

1. Is it correct that `model.properties` cannot be modified after loading from a checkpoint?
2. After loading a checkpoint, how does the model know how to step?
3. Is it better to **save only the agent data** (adata) and use `populate_from_csv!`) after the spin-up to reinitialize a new model using the desired environmental vectors and the same agent population?
4. Since all random calls use `abmrng(model)`, I assume that running the spin-up again as part of the full timeseries vector (spin-up + scenario) would produce **identical results** to loading from the saved checkpoint. Is this assumption correct? or is multi-threading challenging this assumption?

Thank you in advace!  
Elisa
