-
Notifications
You must be signed in to change notification settings - Fork 19
1386 implement influenza model #1387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1387 +/- ##
========================================
Coverage 97.28% 97.29%
========================================
Files 175 177 +2
Lines 15306 15422 +116
========================================
+ Hits 14891 15005 +114
- Misses 415 417 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good! :) Most of my comments are regarding naming of variables/parameters where I made some suggestions.
| #include "memilio/utils/logging.h" | ||
|
|
||
| /** | ||
| * @brief set_initial_population sets the initial population of the model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description of the parameters is missing
| auto& parameters = model.parameters; | ||
|
|
||
| FP cont_freq = 10.0; | ||
| FP fact = FP(1) / FP(num_groups); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this factor for?
| Please cite the original study if you use this model: | ||
|
|
||
| > Weidemann, F., Remschmidt, C., Buda, S. et al. *Is the impact of childhood influenza vaccination less than expected: a transmission modelling study.* **BMC Infect Dis** 17, 258 (2017). | ||
| > https://doi.org/10.1186/s12879-017-2344-6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you link the read the docs documentation and the example here?
| #include "ode_seirv/parameters.h" | ||
|
|
||
| GCC_CLANG_DIAGNOSTIC(push) | ||
| GCC_CLANG_DIAGNOSTIC(ignored "-Wshadow") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this warning appear?
| // Contact matrices | ||
| const auto cm_h_expr = | ||
| params.template get<ContactPatternsHealthy<FP>>().get_cont_freq_mat().get_matrix_at(SimulationTime<FP>(t)); | ||
| const auto cm_s_expr = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you use cm_h_expr and cm_s_expr anywhere else or just below? If not, I would define H and S directly.
| const double lambda = (I + IV) / N; // expected force of infection | ||
| const double f_SE = S * lambda; | ||
| const double f_SV_EV = SV * lambda; | ||
| const double f_E_I = E; // gamma * E |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since gamma=1 this is correct but I would find it easier to understand if you wrote f_E_I = gamma*E here and below
| auto idx_EI = | ||
| model.template get_flat_flow_index<mio::oseirv::InfectionState::Exposed, mio::oseirv::InfectionState::Infected>( | ||
| mio::AgeGroup(0)); | ||
| auto idx_EVI = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| auto idx_EVI = | |
| auto idx_EIV = |
More intuitive? Or EVIV? Same below.
| { | ||
| mio::oseirv::Model<double> model(2); | ||
| mio::ContactMatrixGroup<ScalarType>& cm_h = model.parameters.get<mio::oseirv::ContactPatternsHealthy<double>>(); | ||
| // Each group only contacts itself so that λ_i = I_i / N_i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Each group only contacts itself so that λ_i = I_i / N_i | |
| // Let each group have only contacts with itself and set other parameters so that λ_i = I_i / N_i |
| model.parameters.set<mio::oseirv::SeasonalityAmplitude<double>>(0.0); | ||
| model.parameters.set<mio::oseirv::OutsideFoI<double>>(0.0); | ||
|
|
||
| // Group 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would find a comment helpful that you in particular have no vaccinated individuals and thus only one layer
| } | ||
| } | ||
|
|
||
| TEST(TestOdeSeirv, flowSimulation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| TEST(TestOdeSeirv, flowSimulation) | |
| TEST(TestOdeSeirv, flowSimulationEuler) |
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
If need be, add additional information and what the reviewer should look out for in particular:
Merge Request - Guideline Checklist
Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.
Checks by code author
Checks by code reviewer(s)