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

1117 reduce use of get support max method in ide model to reduce run time #1129

Merged

Conversation

annawendler
Copy link
Member

@annawendler annawendler commented Sep 26, 2024

Changes and Information

  • Store support_max for all TransitionDistributions in a vector
  • Compute derivative and cotribution of survival functions to force of infection terms once at the beginning of the simulation and store them instead of recomputing these in every time step to decrease run time

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 for new functionality has been added (Doxygen in the code and Markdown files if necessary)
  • 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 #1117

@annawendler annawendler self-assigned this Sep 26, 2024
@annawendler annawendler linked an issue Sep 26, 2024 that may be closed by this pull request
2 tasks
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.59%. Comparing base (a1028b5) to head (b245a36).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1129      +/-   ##
==========================================
+ Coverage   96.44%   96.59%   +0.14%     
==========================================
  Files         135      137       +2     
  Lines       11285    11057     -228     
==========================================
- Hits        10884    10680     -204     
+ Misses        401      377      -24     
Flag Coverage Δ
96.59% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@lenaploetzke lenaploetzke left a comment

Choose a reason for hiding this comment

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

Thank you for the nice work and the very impressive run time improvement!
I have some comments, especially, we should consider making the setters private member functions somehow. Maybe we can discuss this.

cpp/models/ide_secir/model.cpp Outdated Show resolved Hide resolved
cpp/models/ide_secir/model.h Show resolved Hide resolved
cpp/models/ide_secir/model.h Outdated Show resolved Hide resolved
cpp/models/ide_secir/model.h Outdated Show resolved Hide resolved
cpp/models/ide_secir/model.h Outdated Show resolved Hide resolved
cpp/models/ide_secir/model.cpp Outdated Show resolved Hide resolved
cpp/models/ide_secir/model.cpp Outdated Show resolved Hide resolved
cpp/models/ide_secir/model.cpp Outdated Show resolved Hide resolved
cpp/models/ide_secir/model.cpp Outdated Show resolved Hide resolved
cpp/models/ide_secir/parameters_io.cpp Outdated Show resolved Hide resolved
Copy link
Member

@lenaploetzke lenaploetzke left a comment

Choose a reason for hiding this comment

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

Looks very good now, just a few typos and the header :)

cpp/models/ide_secir/model.h Outdated Show resolved Hide resolved
cpp/models/ide_secir/model.h Outdated Show resolved Hide resolved
cpp/models/ide_secir/model.cpp Outdated Show resolved Hide resolved
cpp/models/ide_secir/model.cpp Outdated Show resolved Hide resolved
Copy link
Member

@lenaploetzke lenaploetzke left a comment

Choose a reason for hiding this comment

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

Nice PR! :)

@annawendler annawendler merged commit 0962eb0 into main Oct 1, 2024
58 checks passed
@annawendler annawendler deleted the 1117-reduce-use-of-get_support_max-method-in-ide-model branch October 1, 2024 10:29
@lenaploetzke lenaploetzke mentioned this pull request Oct 7, 2024
2 tasks
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.

Reduce use of methods of StateAgeFunction in IDE model to reduce run time
2 participants