Commit 76e489ce authored by Adam Reichold's avatar Adam Reichold
Browse files

Garbage collect flower contaminators before writing world state to disk.

parent 45fda315
Pipeline #83526 passed with stage
in 5 minutes and 43 seconds
......@@ -62,6 +62,17 @@ pub fn sample(params: Params, duration: Tick, interval: Tick) {;
if model.params.trace_temporal_network {
let tick =;
for flower_patch in &mut * {
for flower_contaminators in &mut *flower_patch.flower_contaminators {
.retain(|(_contaminator, decontaminates_at)| *decontaminates_at > tick);
format!("world_{:03}_{:02}.bin", snapshot, model.grid.rank),
&mut buffer,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment