Skip to content

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

Open
annawendler wants to merge 9 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 9 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.46%. Comparing base (8851d5b) to head (94b636a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1556      +/-   ##
==========================================
- Coverage   97.47%   97.46%   -0.02%     
==========================================
  Files         190      190              
  Lines       15966    16030      +64     
==========================================
+ Hits        15563    15623      +60     
- Misses        403      407       +4     

☔ 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 thread docs/source/cpp/models/glsecir.rst Outdated
Comment thread docs/source/cpp/models/glsecir.rst
Comment thread cpp/tests/test_lct_secir.cpp Outdated
Comment thread cpp/tests/test_lct_secir_2_diseases.cpp Outdated
Comment thread cpp/tests/test_glct_secir.cpp Outdated
@annawendler annawendler requested a review from kilianvolmer May 28, 2026 07:04
Copy link
Copy Markdown
Contributor

@kilianvolmer kilianvolmer left a comment

Choose a reason for hiding this comment

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

Thanks for adding this feature! I found one broken link in the documentation and I think improving one code comment would be good.
Apart from that I am fine with the code, but I think the LCT examples should be updated and I am wondering if it would be nicer to set a value different from 0 in the GLCT example so that actually something happens on this transition.

};

/**
* @brief The percentage of dead patients per hospitalized patients for each group in the SECIR model.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we have DeathPerSevere a and b? Could you please specify in the comments what the difference is?

The model equations are given below. For a simpler description let :math:`\mathcal{Z}=\{E,I_{NS},I_{Sy},I_{Sev},I_{Cr}\}` be the set of the compartments that can be divided into subcompartments.

.. image:: https://github.com/SciCompMod/memilio/assets/70579874/e1da5e1d-e719-4c16-9f14-45374be7c353
.. image:: http://martinkuehn.eu/research/images/glct_equations.png
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
.. image:: http://martinkuehn.eu/research/images/glct_equations.png
.. image:: http://martinkuehn.eu/research/images/glct.png

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

3 participants