Skip to content

1547 (LCT) implement possibility of death from hospitalization without intensive care#1556

Open
annawendler wants to merge 8 commits into
mainfrom
1547-lct-implement-possibility-of-death-from-hospitalization-without-intensive-care
Open

1547 (LCT) implement possibility of death from hospitalization without intensive care#1556
annawendler wants to merge 8 commits into
mainfrom
1547-lct-implement-possibility-of-death-from-hospitalization-without-intensive-care

Conversation

@annawendler
Copy link
Copy Markdown
Member

@annawendler annawendler commented May 8, 2026

Changes and Information

Please briefly list the changes (main added features, changed items, or corrected bugs) made:

  • Add transition from Hospitalized to Dead compartment for LCT-SECIR, LCT-SECIR with two diseases and GLCT-SECIR models

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

  • Every addressed issue is linked (use the "Closes #ISSUE" keyword below).
  • New code adheres to coding guidelines.
  • No large data files have been added (files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.).
  • Tests are added for new functionality and a local test run was successful (with and without OpenMP).
  • Appropriate documentation within the code (Doxygen) for new functionality has been added in the code.
  • Appropriate external documentation (ReadTheDocs) for new functionality has been added to the online documentation and checked in the preview.
  • Proper attention to licenses, especially no new third-party software with conflicting license has been added.
  • (For ABM development) Checked benchmark results and ran and posted a local test above from before and after development to ensure performance is monitored.

Checks by code reviewer(s)

  • Corresponding issue(s) is/are linked and addressed.
  • Code is clean of development artifacts (no deactivated or commented code lines, no debugging printouts, etc.).
  • Appropriate unit tests have been added, CI passes, code coverage and performance is acceptable (did not decrease).
  • No large data files added in the whole history of commits(files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.).
  • On merge, add 2-5 lines with the changes (main added features, changed items, or corrected bugs) to the merge-commit-message. This can be taken from the briefly-list-the-changes above (best case) or the separate commit messages (worst case).

Closes #1547

@annawendler annawendler self-assigned this May 8, 2026
* 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.
*
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.47%. Comparing base (8851d5b) to head (e031fd5).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/_b variants) 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.

Comment on lines +88 to +91
\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)
Comment on lines 161 to 165
const ScalarType recoveredPerInfectedNoSymptoms = 0.09;
const ScalarType severePerInfectedSymptoms = 0.2;
const ScalarType criticalPerSevere = 0.25;
const ScalarType deathsPerSevere = 0.;
const ScalarType deathsPerCritical = 0.3;
Comment on lines +815 to +816
// 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(LCT) Implement possibility of death from hospitalization without intensive care

2 participants