Learn R Programming

DSAIRM (version 0.5.0)

simulate_basicvirus_ode: Basic Virus model - ODE

Description

A basic virus infection model with 3 compartments, implemented as ODEs. The model tracks uninfected and infected target cells and free virus. The processes modeled are infection, virus production, uninfected cell birth and death, infected cell and virus death.

Usage

simulate_basicvirus_ode(U = 1e+05, I = 0, V = 1, n = 0, dU = 0,
  dI = 1, dV = 2, b = 2e-05, p = 5, g = 1, tstart = 0,
  tfinal = 30, dt = 0.1)

Arguments

U

: Starting value for uninfected cells : numeric

I

: Starting value for infected cells : numeric

V

: Starting value for virus : numeric

n

: Rate of new uninfected cell replenishment : numeric

dU

: Rate at which uninfected cells die : numeric

dI

: Rate at which infected cells die : numeric

dV

: Rate at which virus is cleared : numeric

b

: Rate at which virus infects cells : numeric

p

: Rate at which infected cells produce virus : numeric

g

: Possible conversion factor for virus units : numeric

tstart

: Start time of simulation : numeric

tfinal

: Final time of simulation : numeric

dt

: Times for which result is returned : numeric

Value

The function returns the output as a list. The time-series from the simulation is returned as a dataframe saved as list element ts. The ts dataframe has one column per compartment/variable. The first column is time.

Notes

The parameter dt only determines for which times the solution is returned, it is not the internal time step. The latter is set automatically by the ODE solver.

Warning

This function does not perform any error checking. So if you try to do something nonsensical (e.g. have negative values for parameters), the code will likely abort with an error message.

Details

The model is implemented as a set of ordinary differential equations (ODE) using the deSolve package. This code is part of the DSAIRM R package. For additional model details, see the corresponding app in the DSAIRM package.

Examples

Run this code
# NOT RUN {
# To run the simulation with default parameters:
result <- simulate_basicvirus_ode()
# }

Run the code above in your browser using DataLab