update_state: Update state

View source: R/update_state.R

update_stateR Documentation

Update state

Description

Update state

Usage

update_state(state, dt, compartments = c("susceptible", "exposed",
  "infected", "recovered"), movement_type = c("probability", "rate"),
  relative_movement = c(1, 1, 1, 1))

Arguments

state

state is a collection of patches and a matrix of rates of movement between patches.

dt

time for which state should be updated. It is the user's responsibility to make sure that this number is consistent with the units on rates. For instance, if the various rates are per week, dt is assumed to be dt weeks.

compartments

in case they are different from SEIR

movement_type

select whether the movement matrix input contains rates (with the caveat on appropriate units from above remaining valid) or probabilities.

relative_movement

vector specifying the relative movement in each infection compartment. By default all values are set to 1. We can state that movement in a given compartment should be reduced to 10 percent the normal level by replacing that vector element with 0.1.

Value

state updated

Author(s)

Sangeeta Bhatia


sangeetabhatia03/multipatchr documentation built on Aug. 13, 2024, 4:05 p.m.