search for: solve_sir_model

Displaying 3 results from an estimated 3 matches for "solve_sir_model".

2017 Jun 21
4
How to apply a system of ordinary differential equations to a cell grid?
...400, 600), 10, replace = TRUE), gamma = sample(c(25, 26, 27, 28), 10, replace = TRUE)) To study the disease dynamics, I also am developing a compartmental model based on a system of ordinary differential equations (ODEs). Here is an example to represent the system of ODEs: solve_sir_model <- function (times, parameters) { sir_model <- function (times, states, parameters) { with(as.list(c(states, parameters)), { dSdt <- -beta*S*I dIdt <- beta*S*I-gamma*I dRdt <- gamma*I dNdt <- dSdt + dIdt + dRdt return(list(c(dSdt, dIdt, dRdt...
2017 Jul 17
0
How to apply a system of ordinary differential equations to a cell grid?
...e variables rather than the rate of > change. This can be used for individual based models, for difference > equations, or in those cases where the integration is performed within > func). I have tested the method but I don't understand why it doesn't work with one time step: solve_sir_model <- function (times, parameters) { sir_model <- function (times, states, parameters) { with(as.list(c(states, parameters)), { dSdt <- -beta*S*I dIdt <- beta*S*I-gamma*I dRdt <- gamma*I dNdt <- dSdt + dIdt + dRdt re...
2017 Jun 21
0
How to apply a system of ordinary differential equations to a cell grid?
...TRUE), > gamma = sample(c(25, 26, 27, 28), 10, replace = TRUE)) > > To study the disease dynamics, I also am developing a compartmental model based on a system of ordinary differential equations (ODEs). Here is an example to represent the system of ODEs: > > solve_sir_model <- function (times, parameters) { > > sir_model <- function (times, states, parameters) { > > with(as.list(c(states, parameters)), { > > dSdt <- -beta*S*I > dIdt <- beta*S*I-gamma*I > dRdt <- gamma*I > dNdt <- dSdt + dIdt + dRd...