sis_simulation: Run a Susceptible -> Infective - Susceptible (SIS) simulation

Description Usage Arguments Value Examples

Description

sis_simulation is a generic function that takes a graph represented either by an adjacency matrix (of class simnetr_matrix) or an adjacency list (of class simnetr_list) and simulates an SIS simulation for a given rate of infection, rate of recovery and duration.

Usage

1
sis_simulation(graph, tau, gam, max_time, i0)

Arguments

graph

The representation of the network.

tau

Per link infection rate.

gam

Per node recovery rate.

max_time

Maximum simulation runtime.

i0

Initial number of infective individuals

Value

list containing timeseries of events and the corresponding timeseries of number of infectious individual.

Examples

1
2
graph <- erdos_matrix_r(N = 1000, avk = 7)
ts <- sis_simulation(graph, tau = 0.5, gam = 1, max_time = 5, i0 = 50, N = 1000)

tjtnew/simnetR documentation built on May 12, 2019, 4:20 p.m.