v0<- | R Documentation |
Update the initial continuous state v0 in each node
v0(model) <- value
## S4 replacement method for signature 'SimInf_model'
v0(model) <- value
model |
The model to update the initial continuous state
|
value |
the initial continuous state in each node. Must be a
|
## Create an 'SISe' model with no infected individuals and no
## infectious pressure (phi = 0, epsilon = 0).
model <- SISe(u0 = data.frame(S = 100, I = 0), tspan = 1:100,
phi = 0, upsilon = 0.02, gamma = 0.1, alpha = 1,
epsilon = 0, beta_t1 = 0.15, beta_t2 = 0.15,
beta_t3 = 0.15, beta_t4 = 0.15, end_t1 = 91,
end_t2 = 182, end_t3 = 273, end_t4 = 365)
## Run the 'SISe' model and plot the result.
set.seed(22)
result <- run(model)
plot(result)
## Update the infectious pressure 'phi' in 'v0' and run
## the model again.
v0(model) <- data.frame(phi = 1)
result <- run(model)
plot(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.