-
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
| 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.
cpp/models/abm/parameters.h
Outdated
|
|
||
| struct InfectivityDistributions { | ||
| using Type = CustomIndexArray<InfectivityDistributionsParameters, VirusVariant, AgeGroup>; | ||
| struct ViralShedDistribution { |
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 this is no distribution any more, the name should problably be changed
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.
I renamed to Parameters and the internal Type to Tuple.
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