mrc-ide / helios

Simulating far UVC for pathogen control
https://mrc-ide.github.io/helios/
Other
5 stars 0 forks source link

Add joint allocation and size of locations #122

Closed athowes closed 3 months ago

athowes commented 3 months ago

Test using:

# Loading library
library(helios)

parameters_list <- get_parameters(archetype = "sars_cov_2")
variables_list <- create_variables(parameters_list)

parameters <- variables_list$parameters_list
variables_list <- variables_list$variables_list

parameters <- set_uvc(parameters_list = parameters, setting = "joint", coverage = 0.5, coverage_target = "individuals", coverage_type = "random", efficacy = 0.5, timestep = 10)

x <- generate_far_uvc_switches(parameters, variables_list)

size_covered <- list(
  "workplace" = sum(x$setting_sizes$workplace * x$size_per_individual_workplace * x$uvc_workplace),
  "school" = sum(x$setting_sizes$school * x$size_per_individual_school * x$uvc_school),
  "household" = sum(x$setting_sizes$household * x$size_per_individual_household * x$uvc_household),
  "leisure" = sum(x$setting_sizes$leisure * x$size_per_individual_leisure * x$uvc_leisure)
)

total_size <- sum(x$setting_sizes$workplace * x$size_per_individual_workplace) +
  sum(x$setting_sizes$school * x$size_per_individual_school) +
  sum(x$setting_sizes$household * x$size_per_individual_household) +
  sum(x$setting_sizes$leisure * x$size_per_individual_leisure)

total_size * x$far_uvc_joint_coverage

sum(unlist(size_covered))
cwhittaker1000 commented 3 months ago

Further updates adding a few small bits and fleshing out the decision tree for joint vs separate -> individuals vs square footage -> random vs targeted in a bit more detail. Outstanding I think is getting targeted assignment based on the most risky settings.