epiverse-trace / epiverse-trace.github.io

Technical blog of the Epiverse-TRACE project, where we share opinions and investigations in R package development, or scientific software development more generally
https://epiverse-trace.github.io/
3 stars 3 forks source link

Considerations for performant and developer-friendly epidemic modelling #134

Closed pratikunterwegs closed 3 months ago

pratikunterwegs commented 8 months ago

This is a proposal for a future post based on our experience with {epidemics}, but touching on general considerations for similar packages for mechanistic epidemic scenario modelling using compartmental ODE models. I aim to cover:

  1. What features are required or requested in scenario modelling (e.g. age structure, changes to initial conditions [NPIs, PIs, population changes], time-dependence): in brief, ideally with examples;
  2. Technical requirements to implement model features (e.g. Eigen for age structure, key-value pairs for interventions on model parameters);
  3. Which combinations of R and compiled code are available to implement ODE solving (e.g. deSolve + C, deSolve + C++, C++ only Boost), focusing on support for model features;
  4. Ease of use/learning, reliability, and sustainability of the R/compiled code combinations;
  5. Choices made in {epidemics} (brief), and circumstances favouring different choices.
  6. Conclusion, with a brief consideration of other ODE modelling frameworks.

I'm not aiming to cover considerations around other kinds of epidemic models such as stochastic discrete time models, branching process models, or network models.

Happy to collaborate with @TimTaylor on this since he worked on implementing some {epidemics} features in C. Since this is likely to be a long post, I'm also happy to split or combine this into multiple posts.

adamkucharski commented 6 months ago

It would be worth seeing if some of this is covered in the odin documentation – they also refer to other vignettes (like compiledCode). Point (1) could be a lengthy review on its own – we gave a brief overview of key issues for inputs (in context of COVID) here: https://www.nature.com/articles/s43588-020-00014-7

pratikunterwegs commented 6 months ago

Thanks, will take a look. They also use {cpp11} which might be worth a comparison as well.