epiverse-trace / epidemics

A library of published compartmental epidemic models, and classes to represent demographic structure, non-pharmaceutical interventions, and vaccination regimes, to compose epidemic scenarios.
https://epiverse-trace.github.io/epidemics/
Other
8 stars 2 forks source link

Camp population changes for diphtheria model #158

Closed pratikunterwegs closed 6 months ago

pratikunterwegs commented 6 months ago

This PR:

  1. Fixes #154 for the diphtheria model by adding the population_change mechanic, which is passed as a named list of times and values of changes to each demographic group at those times. This functionality could be expanded to other models in future if needed.
    • Adds the population_changes C++ struct in the population namespace, with a member function to check for any current changes; also updates relevant header and source files for the diphtheria model;
    • Adds checks to the diphtheria model arguments checker to handle the case of no population changes (the default);
    • Updates the documentation for the diphtheria model;
    • Adds tests for the population change functionality; NOTE: this functionality WILL NOT SATISFY expectations of constant model population sizes.
  2. Fixes #157 by adding a basic vignette showing the population change functionality.
pratikunterwegs commented 6 months ago

Thanks for taking a look @adamkucharski - will accept your edits and merge shortly.

Also wondered: is the current lack of vaccination a technical obstacle in the model (i.e. not possible with current modular structure)? Or just omitted for simplicity?

For simplicity really, following the scenario described in the paper. It's definitely possible to add a vaccination compartment if necessary. We did hear at MSF Manson that they might be interested in modelling for vaccination advocacy in camps, so happy to work along those lines if you have any input.

Finally, I get a lot of non-essential CPP warnings when installing the package from branch. Do we suppress these for users in end package (as probably won't add much value for majority of users, and may make them wonder if something is wrong)?

We do not, admittedly, as the suppress warnings flag -w is apparently non-portable and throws up an R CMD check warning. Hopefully if users install from R-universe (and later, CRAN) they'll get a pre-compiled binary which won't have these.