-
Notifications
You must be signed in to change notification settings - Fork 1
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
Allow setting maximum as well as minimum outbreak size #93
Conversation
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.
Hi Josh,
Thank you for these changes, I think they're great, I've tested it and it works well, and I no longer had the problem of the simulation getting stuck or running for a really long time when setting a maximum number of cases for the outbreak.
That's why I've suggested to make the default smaller, e.g., 5K or 10K instead of 100K, to make the user experience better and minimise the risk that this will happen
Let me know what you think
Thank you!
Closing and reopening this PR to trigger the CI workflows after a CI commit. |
This PR addresses a comment raised in #89 to allow a maximum outbreak size to be set. The
min_outbreak_size
argument has been changed tooutbreak_size
and instead of being a singlenumeric
, it now accepts anumeric
vector with two elements, the minimum outbreak size and maximum outbreak size.The minimum outbreak size is used identically to the previous
min_outbreak_size
implementation, erroring if the maximum number of iterations is reached without producing an outbreak of sufficient size. The maximum outbreak size is used to limited the number of cases in the line list and terminating the simulation early (i.e. while there are still infectious individuals that could continue transmission) and returning the data with a warning. The warning states how many cases and contacts are being returned so the user is aware of the data and why it might not match expectations given the parameterisation specified.The Get started (
simulist.Rmd
), visualisation (vis-linelist.Rmd
) and age-structured populations (age-struct-pop.Rmd
) vignettes are updated to use the new argument and provide explanation on its use.The tests that specified the
min_outbreak_size
argument have been updated and new tests for the returning early warning are also added forsim_linelist()
and.sim_network_bp()
.Function documentation has also been updated.