multisim: Simulate multiple trajectories

View source: R/multisim.R

multisimR Documentation

Simulate multiple trajectories

Description

The function multisim run the model multiple times, save the results in a list of class 'mwss'. Results are trajectories simulated by SimInf package. Epidemiological and immunity states of each ward are save at each time steps. When run in shiny, a progress bar is also displayed during simulations.

Usage

multisim(model, nSim, ward_names)

Arguments

model

SimInf model generated by the function mwss

nSim

Number of simulations

ward_names

String vector with ward names/id in the same order than the one used in the function mwss to build the model

Value

List of data.table of class 'mwss'. Additional ISO, SA,ScreenP, ScreenH, TestSympP and TestSympH classes are added depending on the prevention, surveillance and control measures implemented in the model.

Examples

data("toydata")
list2env(toydata,envir=.GlobalEnv)
gdata <- build_gdata()
model <- mwss(ward_names, pop_size_P, pop_size_H, nVisits, LS, gdata, tSim = 30)
results <- multisim(model, 5, ward_names)


MESuRS-Lab/mwss documentation built on Sept. 12, 2023, 12:08 a.m.