memilio
memilio copied to clipboard
1039 Add functions for the Person to choose whether to comply to mask,test and isolation
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
- Add a file for different NPI types
- The compliance levels are presented as a member vector in the Person class.
- Add functions to set and get compliance levels in the Person class.
- Add different functions to check wether a Person is complying to these NPIs.
If need be, add additional information and what the reviewer should look out for in particular:
- See World::migration for apply_mask_intervention()
- See TestingStrategy::run_strategy for apply_test_intervention()
- See Person::get_tested for apply_isolation_intervention()
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
- [X] Every addressed issue is linked (use the "Closes #ISSUE" keyword below)
- [X] New code adheres to coding guidelines
- [X] No large data files have been added (files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.)
- [x] Tests are added for new functionality and a local test run was successful (with and without OpenMP)
- [X] Appropriate documentation for new functionality has been added (Doxygen in the code and Markdown files if necessary)
- [x] Proper attention to licenses, especially no new third-party software with conflicting license has been added
- [x] (For ABM development) Checked benchmark results and ran and posted a local test above from before and after development to ensure performance is monitored.
Run on (8 X 24.121 MHz CPU s) CPU Caches: L1 Data 64 KiB (x8) L1 Instruction 128 KiB (x8) L2 Unified 4096 KiB (x2) Load Average: 2.98, 4.30, 4.88
- Main branch
Benchmark Time CPU Iterations
abm_benchmark/abm_benchmark_50k 2247 ms 2242 ms 1 abm_benchmark/abm_benchmark_100k 4691 ms 4619 ms 1 abm_benchmark/abm_benchmark_200k 8577 ms 8299 ms 1
- 1039 branch
Benchmark Time CPU Iterations
abm_benchmark/abm_benchmark_50k 2044 ms 2040 ms 1 abm_benchmark/abm_benchmark_100k 4169 ms 4098 ms 1 abm_benchmark/abm_benchmark_200k 8243 ms 8168 ms 1
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 #1039 Closes #503