main_simulation: main simulation loop

Description Usage Arguments Value

View source: R/simulation.R

Description

main simulation loop

Usage

1
2
main_simulation(tmax, tdiv, vax_alloc_period, LD, S0, E0, I0, R0, SV0, EV0,
  IV0, RV0, params, cum_vax_pool_func, vax_allocation_func)

Arguments

tmax

number of days for which to run simulation

tdiv

number of timesteps per day

vax_alloc_period

allocate vaccines every this number of timesteps

LD

force of infection matrix: multiply by the I vector to get force of infection. a square matrix of side length maxIndex = n_countries * n_ages * n_riskgroups

S0

numeric vector of length max_Index: initial number of unvaccinated susceptibles in each location, age, risk group

E0

numeric vector of length max_Index: initial number of unvaccinated exposed

I0

numeric vector of length max_Index: initial number of unvaccinated infectious

R0

numeric vector of length max_Index: initial number of unvaccinated removed

SV0

numeric vector of length max_Index: initial number of vaccinated susceptibles

EV0

numeric vector of length max_Index: initial number of vaccinated exposed

IV0

numeric vector of length max_Index: initial number of vaccinated infectious

RV0

numeric vector of length max_Index: initial number of vaccinated removed

params

list of model parameters

cum_vax_pool_func

a function of time which gives the numebr of vaccines ever produced at that time

vax_allocation_func

a function of the current state of the simulation which gives the number of vaccines to allocate to each location, age, risk group

Value

list containing the elements: beta: infectivity parameter S: matrix containing the number of unvaccinated susceptibles in each location, age, risk group at each timestep. nrow(S) = n_groups = n_countres * n_ages * n_riskgroups ncol(S) = tend = tmax * tdiv E: same as Smat but for unvaccinated exposed I: same as Smat but for unvaccinated infectious R: same as Smat but for unvaccinated removed SV: same as Smat but for vaccinated susceptible EV: same as Smat but for vaccinated exposed IV: same as Smat but for vaccinated infectious RV: same as Smat but for vaccinated removed vax_pool: numeric vector containing number of vaccines available at each timestep.


jameshay218/vaxedemic documentation built on Dec. 10, 2018, 8:11 p.m.