Skip to content
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

511 Compute inflow and outflow of models #574

Merged
merged 120 commits into from
Nov 14, 2023

Conversation

HenrZu
Copy link
Contributor

@HenrZu HenrZu commented Feb 13, 2023

  • implementation of flows between the different infection states
  • remove totalinfection compartment (can be computed afterwards using the flows)

Merge Request - GuideLine Checklist

Guideline to check code before resolve WIP and approval, respectively.
As many checkboxes as possible should be ticked.

Checks by code author:

Always to be checked:

If functions were changed or functionality was added:

  • Tests for new functionality has been added
  • A local test was succesful

If new functionality was added:

  • There is appropriate documentation of your work. (use doxygen style comments)

If new third party software is used:

  • Did you pay attention to its license? Please remember to add it to the wiki after successful merging.

If new mathematical methods or epidemiological terms are used:

  • Are new methods referenced? Did you provide further documentation? Has the glossary been updated?

The following questions are addressed in the documentation if need be:

  • Developers (what did you do?, how can it be maintained?)

  • For users (how to use your work?)

  • For admins (how to install and configure your work?)

  • For documentation: Please write or update the Readme in the current working directory!

Checks by code reviewer(s):

  • Is the code clean of development artifacts e.g., unnecessary comments, prints, ...
  • The ticket goals for each associated issue are reached or problems are clearly addressed (i.e., a new issue was introduced).
  • There are appropriate unit tests and they pass.
  • The git history is clean and linearized for the merge request. All reviewers should squash commits and write a simple and meaningful commit message.
  • Coverage report for new code is acceptable.

closes #511
closes #317

@HenrZu HenrZu marked this pull request as ready for review March 6, 2023 13:52
@reneSchm reneSchm requested a review from dabele November 6, 2023 11:24
cpp/memilio/compartments/flow_model.h Outdated Show resolved Hide resolved
cpp/memilio/compartments/flow_model.h Show resolved Hide resolved
cpp/memilio/compartments/flow_model.h Outdated Show resolved Hide resolved
cpp/memilio/compartments/flow_model.h Outdated Show resolved Hide resolved
cpp/memilio/compartments/flow_model.h Outdated Show resolved Hide resolved
cpp/memilio/utils/multi_index_range.h Outdated Show resolved Hide resolved
cpp/memilio/utils/multi_index_range.h Outdated Show resolved Hide resolved
cpp/memilio/utils/multi_index_range.h Outdated Show resolved Hide resolved
cpp/memilio/utils/multi_index_range.h Outdated Show resolved Hide resolved
cpp/models/ode_seir/model.h Show resolved Hide resolved
@HenrZu HenrZu requested a review from dabele November 13, 2023 13:15
@HenrZu HenrZu merged commit e664729 into main Nov 14, 2023
55 checks passed
@HenrZu HenrZu deleted the 511--Compute-inflow-and-outflow-of-models branch November 14, 2023 10:18
@HenrZu
Copy link
Contributor Author

HenrZu commented Nov 14, 2023

Thank you @dabele and @mknaranja for reviewing 🥳

mknaranja added a commit that referenced this pull request Nov 14, 2023
- Compute and Integrate Flows between the Compartments of the ODE model
  - Backwards compatibility with old design (see FlowModel::get_derivatives)
- New FlowModel extending the existing Compartmentalmodel
  - New FlowSimulation extending current Simulation which also calculates flows
  - Converted all ODE models (except ode_sir) to use the FlowModel/FlowSimulation
- Adding Plot table feature for the time series
- Some Performance/Design gains for the Integrator/Simulation
- Removed TotalInfections compartment. This can now easily be computed using the flows
- Added a TypeList with metaprogramming utilities:
  - type_at_index
  - index_of_type
  - is_type_in_list
- Added function extend_index and reduce_index
- And some benchmarks ... :)

Co-authored-by: reneSchm <49305466+reneSchm@users.noreply.github.com>
Co-authored-by: Martin J. Kühn <62713180+mknaranja@users.noreply.github.com>
Co-authored-by: dabele <daniel.abele@dlr.de>
@HenrZu HenrZu mentioned this pull request Jun 13, 2024
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.

Compute inflow and outflow of models Remove TotalInfections state in recent SECIRVVS model
6 participants