Commit abac825
authored
datacollector: store separate snapshots of model data per step (#2129)
* datecollector: store separate snapshots of model data per step
- Ensure `DataCollector` stores unique copies of the data at each model step.
- Use `deepcopy` in `collect` method to avoid storing references that lead to each step holding the same data.
- Fixes the issue where PropertyLayer data was stored identically for all steps, preventing accurate visualization and analysis of model progression.
* datacollection: Add deepcopy comment1 parent a2d4afe commit abac825
1 file changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
200 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
201 | 204 | | |
202 | 205 | | |
203 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
204 | 209 | | |
205 | 210 | | |
206 | | - | |
207 | | - | |
208 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
209 | 214 | | |
210 | | - | |
| 215 | + | |
211 | 216 | | |
212 | 217 | | |
213 | 218 | | |
| |||
0 commit comments