1547 (LCT) implement possibility of death from hospitalization without intensive care#1556
Conversation
| * Throughout this RKI-based initialization, we assume that individuals can only die from InfectedCritical and not from | ||
| * InfectedSevere, i.e. this initialization routine assumes that the probability from transitioning from InfectedSevere | ||
| * to Dead is 0. | ||
| * |
There was a problem hiding this comment.
When thinking about the initialization again with regard to the LCT model, I noticed that the new transition doesn't actually affect the initialization based on RKI data which is why I removed this comment here for the IDE-SECIR model again.
…-hospitalization-without-intensive-care
…-hospitalization-without-intensive-care
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1556 +/- ##
==========================================
- Coverage 97.47% 97.47% -0.01%
==========================================
Files 190 190
Lines 15966 16030 +64
==========================================
+ Hits 15563 15625 +62
- Misses 403 405 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds the ability for individuals to die directly from the hospitalized/severe compartment (i.e., without passing through intensive care/critical) in the LCT-SECIR, LCT-SECIR (two diseases), and GLCT-SECIR model variants, including corresponding parameterization and tests.
Changes:
- Introduce
DeathsPerSevere(and_a/_bvariants) and update LCT-SECIR / LCT-SECIR-2D models to split Severe outflow into Critical/Recovered/Dead. - Extend GLCT-SECIR with an additional InfectedSevere “strain” and a new
TransitionMatrixInfectedSevereToDead, updating model equations and constraints. - Update tests, examples, and model documentation to reflect the new Severe→Dead transition (with some documentation inconsistencies remaining).
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/source/cpp/models/lsecir.rst | Documents new DeathsPerSevere parameter for LCT-SECIR. |
| docs/source/cpp/models/lsecir2d.rst | Documents new severe-death parameters for two-disease LCT-SECIR. |
| docs/source/cpp/models/glsecir.rst | Updates GLCT-SECIR docs for additional Severe→Dead transition (currently inconsistent in example/notation). |
| cpp/models/lct_secir/parameters.h | Adds DeathsPerSevere parameter and constraints. |
| cpp/models/lct_secir/model.h | Implements Severe→Dead flow split and fixes Dead accumulation from multiple sources. |
| cpp/models/lct_secir/infection_state.h | Adds InfectedSevereToDead transition enum entry. |
| cpp/models/lct_secir_2_diseases/parameters.h | Adds DeathsPerSevere_a/b parameters and constraints. |
| cpp/models/lct_secir_2_diseases/model.h | Implements Severe→Dead flow split for both diseases/paths. |
| cpp/models/glct_secir/parameters.h | Adds TransitionMatrixInfectedSevereToDead and updates dimension/validity checks. |
| cpp/models/glct_secir/model.h | Adds Severe→Dead strain dynamics and contributes Severe deaths into Dead compartment. |
| cpp/examples/glct_secir.cpp | Updates example configuration to include the new Severe→Dead strain and matrix. |
| cpp/tests/test_lct_secir.cpp | Extends parameter constraint tests and adds Severe→Dead flow test. |
| cpp/tests/test_lct_secir_2_diseases.cpp | Extends parameter constraint tests and adds Severe→Dead flow test (two diseases). |
| cpp/tests/test_lct_parameters_io.cpp | Ensures I/O-related tests set DeathsPerSevere explicitly. |
| cpp/tests/test_glct_secir.cpp | Updates GLCT tests to the new Severe-strain layout and adds Severe→Dead flow test. |
| cpp/models/ide_secir/parameters_io.h | Removes outdated documentation comment about Severe→Dead being impossible. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| \mathbf{I_{\text{NS}}}(t) = \begin{bmatrix} | ||
| \mathbf{I_{\text{NS}}^{\text{Sy}}}(t) \\ | ||
| \mathbf{I_{\text{NS}}^{\text{D}}}(t) \\ | ||
| \mathbf{I_{\text{NS}}^{\text{R}}}(t) |
| const ScalarType recoveredPerInfectedNoSymptoms = 0.09; | ||
| const ScalarType severePerInfectedSymptoms = 0.2; | ||
| const ScalarType criticalPerSevere = 0.25; | ||
| const ScalarType deathsPerSevere = 0.; | ||
| const ScalarType deathsPerCritical = 0.3; |
| // params.get<mio::lsecir::TimeInfectedSevere<ScalarType>>()[0] = 5.0; | ||
| // params.get<mio::lsecir::TimeInfectedCritical<ScalarType>>()[0] = 5.0; |
| params.get<mio::lsecir2d::DeathsPerSevere_b<ScalarType>>()[0] = 0.1; | ||
|
|
||
| // Define initial population distribution in infection states, one entry per subcompartment. | ||
| // We start with 1000 individuals in each InfectedSevere compartment, no indiviuals in other compartments. |
| (size_t)(LctState::get_num_subcompartments<InfectionState::InfectedCritical>() / 2.), 7.1); | ||
|
|
||
| // Define initial population distribution in infection states, one entry per subcompartment. | ||
| // We start with 1000 individuals in the first subcompartment of the InfectedSymtpoms compartment which refers to |
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
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)
Closes #1547