InstituteforDiseaseModeling / covasim

COVID-19 Agent-based Simulator (Covasim): a model for exploring coronavirus dynamics and interventions
https://covasim.org
MIT License
250 stars 223 forks source link

Logging out information about time evolution of individual agents #293

Closed ingmarschuster closed 3 years ago

ingmarschuster commented 3 years ago

This PR adds the logging of the time evolution of agent-level status and contacts. This can be useful for developing testing strategies that make best use of capacity. Possibly you want to add a flag that switches logging on or off?

cliffckerr commented 3 years ago

Thanks for this PR @ingmarschuster and apologies for the slow reply! I think this would be better as an analyzer actually -- have a look at the new analyzers tutorial as part of Covasim 2.0 if you want to see some examples of how to implement these. I also thought that copying the full state arrays at each time point might require a lot of memory (this is why it's not stored by default). You might also want to have a look at the cv.snapshot() analyzer which does something similar to this, if I'm not mistaken.

cliffckerr commented 3 years ago

Closing since functionality should already be contained in the cv.snapshot() analyzer.