UCL / TLOmodel

Epidemiology modelling framework for the Thanzi la Onse project
https://www.tlomodel.org/
MIT License
13 stars 5 forks source link

Simulation rate decreasing as simulations progress #689

Open matt-graham opened 2 years ago

matt-graham commented 2 years ago

On profiling runs, consistently I am seeing substantially quicker simulation rates (in terms of simulated days per second wall clock time) at the beginning of simulations compared to the end. On runs of the scale_run.py script for 5 years with a 50k initial population, the simulation rate over the first month is around 0.5 - 1 simulated days per second, but has slowed down to less than 0.1 simulated day per second by the final month. Previously we had issues with the HSI event queue growing unboundedly as described (and fixed) in #332. It may be worth checking both the main and HSI event queues to check if something similar is happening again.

tamuri commented 2 years ago

Another cause might be the growing size of population dataframe- deceased individuals are not removed.