-
Notifications
You must be signed in to change notification settings - Fork 19
1279 minor additions to how infections work #1320
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
base: main
Are you sure you want to change the base?
Conversation
cpp/models/abm/infection.cpp
Outdated
| get_forward_transition(rng, age, params, current_state, current_time, latest_protection); | ||
| if (init && current_state != InfectionState::Susceptible) { // random init within first time period | ||
| ScalarType p = uniform_dist(rng); | ||
| start_of_init_state -= transition.duration.multiply(1 - p); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we fix the uniform distribution here or provide the possibility to insert any distribution (also a constant distribution for the case you exactly know how long somebody has been infected)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, I added a distribution parameter that let's the user decide how the initial progression in any infection state is. Notice that it still depends on the "time until next state" parameters.
Also, there is currently no good way to perform a parameter contraint check on distributions, so I haven't added anything there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter got removed. Instead, a second constructor of Infection is now available that let's you pass a distribution with a relative time already spent in the initial state.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1320 +/- ##
==========================================
- Coverage 97.30% 97.24% -0.07%
==========================================
Files 187 187
Lines 16027 16054 +27
==========================================
+ Hits 15595 15611 +16
- Misses 432 443 +11 ☔ View full report in Codecov by Sentry. 🚀 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)
Closes #1279
Closes #1247