mrc-ide/malariasimulation

Min_wait error in set_mass_pev()

Closed this issue · 1 comments

I get this error when min_wait is set to anything other than 0 for set_mass_pev().

Error in variables$vaccinated_timestep$get_index_of(a = max(timestep -  : 
  attempt to apply non-function

Example code below that produces the error:

params <- get_parameters(overrides = list(
  human_population = 1000,
  individual_mosquitoes = FALSE
))

params <- params |>
  set_mass_pev(
    profile = rtss_profile,
    coverages = c(0.9, 0.9),
    timesteps = 365 * (2:3) + 1,
    min_age = 5 * 365,
    max_age = 15 * 365,
    min_wait = 180,
    booster_profile = list(rtss_profile, rtss_profile),
    booster_timestep = c(190, 190),
    booster_coverage = c(0.8, 0.8)
  )

sim <- run_simulation(timesteps = 365 *  7, parameters = params)

This problem was fixed for set_pev_epi() here: b4093eb.

Resolved by #240