Uh oh!
There was an error while loading. Please reload this page.
1210 abm paper logger - #1507
Conversation
…rove function structure, and add new plotting capabilities for location types.
… documentation, and improve function argument handling for better usability
…st cases for loading H5 results and plotting functions
…th comparison plots
…arguments for better flexibility
…from-paper-to-memilio-plot
…into 1210-abm-paper-logger
There was a problem hiding this comment.
Pull request overview
This PR adds a new ABM (Agent-Based Model) logger for tracking new infections per location type per age group (LogInfectionPerLocationTypePerAgeGroup), integrates it into ResultSimulation via a new history_detailed history and get_result_detailed() method, updates the abm_parameter_study.cpp example to save both standard and detailed results, and introduces a new Python plotting module (plotAbmInfectionStates.py) with tests for visualizing the results.
Changes:
- Added
LogInfectionPerLocationTypePerAgeGroup(and unusedLogInfectionStatePerAgeGroup) logger structs incommon_abm_loggers.h - Added
m_t_prevtracking toSimulationclass and integrated the new detailed logger intoResultSimulation - Updated
abm_parameter_study.cppexample to collect and save both aggregated and detailed results in separate subdirectories - Added new Python plotting module
plotAbmInfectionStates.pywith functions to visualize infection states and infection-by-location-type data, plus unit tests
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
cpp/models/abm/simulation.h | Adds m_t_prev member and get_prev_time() to track previous simulation time step, needed by new logger |
cpp/models/abm/common_abm_loggers.h | Introduces two new logger structs for per-age-group data; one is unused |
cpp/models/abm/result_simulation.h | Adds history_detailed and get_result_detailed() using the new logger; changes get_result() return type |
cpp/examples/abm_parameter_study.cpp | Updated example to run 10 simulations over 10 days and save both standard and detailed results |
pycode/memilio-plot/memilio/plot/plotAbmInfectionStates.py | New Python module for loading and plotting ABM infection state and location-type results |
pycode/memilio-plot/tests/test_plot_plotAbmInfectionStates.py | Unit tests for the new Python plotting module |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #1507 +/- ##
==========================================
- Coverage 97.48% 97.46% -0.03%
==========================================
Files 190 190 Lines 16030 16060 +30 ==========================================
+ Hits 15627 15653 +26 - Misses 403 407 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Changes and Information
Please briefly list the changes (main added features, changed items, or corrected bugs) made:
If need be, add additional information and what the reviewer should look out for in particular:
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
Checks by code reviewer(s)