Set up graph file to run simulations upon

disnet_sim_setup(g, r0 = 1.44, latent_period = 2.62,
  inf_period = 3.38, tau = 3, r_beta = 0.5, p_a = 1/3,
  seed_nd = NA, seed_no = 1, vacc = FALSE,
  output_dir = getOption("disnetOutputDir", NA), vacc_eff = c(80, 90),
  vacc_cov = c(80, 100), vacc_nd = "890", ...)

Arguments

g

The network object created after commuting rates were calculated

r0

Reproduction number

latent_period

Period between infection and becoming infectious

inf_period

Duration of infectious period

tau

Return rate (from commuting)

r_beta

Reduction in infectiousness due to being aymptomatic inf

p_a

Probability of asymptomatic infection

seed_nd

The node which you want to seed/initiate infection in

seed_no

The number of infected people you want to start inf with

vacc

Whether a vaccination campaign is underway or not

output_dir

Directory to store intermediate simulation data in.

vacc_eff

Vaccination efficacy

vacc_cov

Vaccination coverage

vacc_nd

Node you want to vaccinate in

Details

1. Reads in an `igraph` object (with commuting proportions previously calculated)

2. Calculates and attaches "Effective Population" to graph

3. Vaccinates target nodes with vaccination proportion: vaccination proportions = vaccination coverage * vaccination efficacy The proportion of a node that is vaccinated is removed from the Susceptible compartment and added to the Recovered compartment

3. Seeds a node with specified number of infectious individuals (taking them out from the Susceptibles and adding to Infectious compartment

4. Creates the FOI structure/scaffold used to quickly calculate FOI (FOI = Force of Infection, acting on an individual in a node)

Examples

f = system.file("sample_data/network", "g10.RDS", package = "SEEDNet") g = readRDS(f) g_comm = disnet_commuting(g)
#> [1] "working on node: 20" #> [1] "working on node: 128" #> [1] "working on node: 358" #> [1] "working on node: 416" #> [1] "working on node: 781" #> [1] "working on node: 874" #> [1] "working on node: 890" #> [1] "working on node: 958" #> [1] "working on node: 995"
nodes = igraph::vcount(g_comm) set.seed(890) seed_nd = igraph::vertex_attr(g_comm, "name", sample(1:nodes, 1)) for_sim = disnet_sim_setup(g_comm, seed_nd = seed_nd, output_dir = NA)