mrc-ide / helios

Simulating far UVC for pathogen control
https://mrc-ide.github.io/helios/
Other
5 stars 0 forks source link

generate and store some initial/default variables #35

Open cwhittaker1000 opened 7 months ago

cwhittaker1000 commented 7 months ago

It takes quite a while to generate the variables (esp. the household variable) for large populations. It will also take an age to run the model to endemic equilibrium.

In both cases, it'd be great to run these once, save the outputs and give users the options just to use those saved results as initial inputs/variables in the model.

tbreweric commented 7 months ago

The former would be easy, the latter perhaps a bit trickier currently as when we run simulation_loop() we won't be able to access the things we would need (variables, perhaps events) to re-establish the model state at the last time point. Someone in Rich's group is currently working on (and I think may have a working version of) this kind of pause-restart functionality for malariasimulation so we may be able to find some inspiration there is we need to.

Another option, albeit one I think would probably require too much time investment, would be to see if there is an analytical solution to our system which could be used to write a function that could initialise the model at equilibrium (or close enough). Remarkably, the malaria model does have one (and has a set_equilibrium() function used for calibration), so it may not be beyond imagination that our system does too? Again though, a potentially massive time sink that may best be avoided for something simpler.

cwhittaker1000 commented 7 months ago

Good points @tbreweric - is this the pause-restart functionality you're talking about? https://mrc-ide.github.io/individual/articles/Checkpoint.html I've used it recently for some Yellow Fever work and it seemed to work well!

tbreweric commented 7 months ago

It's not, but this looks very promising!

athowes commented 7 months ago
cwhittaker1000 commented 3 months ago

Addressed (in part) by this: https://github.com/mrc-ide/helios/pull/114 - this doesn't capture the exact spread across the exact social graph (which will vary across all different stochastic simulations), but that'll tend to average out by the time we hit endemic equilibrium anyway.