Closed athowes closed 3 months ago
This PR closes #72.
Features added:
- Small changes to
roxygen2
documentation ofset_uvc
andgenerate_far_uvc_switches
- Added
generate_setting_far_uvc_switches
helper function which allowsgenerate_far_uvc_switches
to be reduced from 183 lines to 10- Altered
get_setting_sizes
(returns list of setting sizes) toget_setting_size
(returns settting size[s] for a single setting e.g. households)- Added
coverage_target == "individuals"
options for random and targetted coverage at a specified proportion of individualsRemaining uncertainties / things to add:
- Haven't added unit tests for this
- With the individuals as coverage target, the far UVC covered number is always going to be greater than or equal to the specified. For something like households this isn't a big deal (households are small), but for schools and workplaces this is relevant. Not sure what we can do about it...
Get started reviewing this code via:
library(helios) parameters_list <- helios::get_parameters() variables_list <- create_variables(parameters_list) parameters <- variables_list$parameters_list variables_list <- variables_list$variables_list parameters <- set_uvc( parameters_list = parameters, setting = "household", coverage = 0.7, coverage_target = "individuals", coverage_type = "random", efficacy = 0.6, timestep = 100 ) x <- generate_far_uvc_switches(parameters, variables_list) # Check this is geq to coverage times population sum(x$setting_sizes$household * x$uvc_household) # Also test the get_setting_size function get_setting_size(variables_list, setting = "school") get_setting_size(variables_list, setting = "workplace") get_setting_size(variables_list, setting = "household")
I had a thought that if we are concerned about overshooting the number of people covered (which I'm not convinced I am) we could:
Probably more faff than it's worth, and where random targeting is implemented could be further improved by searching for/including a setting with the ideal size, but a possible solution if we want it.
This PR closes #72.
Features added:
roxygen2
documentation ofset_uvc
andgenerate_far_uvc_switches
generate_setting_far_uvc_switches
helper function which allowsgenerate_far_uvc_switches
to be reduced from 183 lines to 10get_setting_sizes
(returns list of setting sizes) toget_setting_size
(returns settting size[s] for a single setting e.g. households)coverage_target == "individuals"
options for random and targetted coverage at a specified proportion of individualsRemaining uncertainties / things to add:
Get started reviewing this code via: