A model for a chronic virus infection with a simple immune response

simulate_chronicvirusir_ode(
  U = 1e+05,
  I = 0,
  V = 10,
  F = 1,
  T = 1,
  n = 10000,
  dU = 0.1,
  dI = 1,
  dV = 4,
  b = 1e-06,
  p = 100,
  g = 1,
  rF = 0.001,
  dF = 1,
  kF = 0.01,
  rT = 0.001,
  dT = 1,
  kT = 0.01,
  tstart = 0,
  tfinal = 200,
  dt = 0.1
)

Arguments

U

: starting value for Uninfected cells : numeric

I

: starting value for Infected cells : numeric

V

: starting value for Virus : numeric

F

: starting value for Innate Response : numeric

T

: starting value for Adaptive Response : 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

rF

: rate of innate response induction : numeric

dF

: rate of innate response decay : numeric

kF

: strength of innate response action : numeric

rT

: rate of adaptive response induction : numeric

dT

: rate of adaptive response decay : numeric

kT

: strength of adaptive response action : numeric

tstart

: Start time of simulation : numeric

tfinal

: Final time of simulation : numeric

dt

: Time step : 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.

Details

The model includes uninfected and infected target cells, virus, and the innate and adaptive immune response. The processes that are modeled are cell birth and death, infection, virus production, infected cell and virus death. Immune response dynamics and action are also modeled. See the DSAIRM documentation for model details.

This code was generated by the modelbuilder R package. The model is implemented as a set of ordinary differential equations using the deSolve package. The following R packages need to be loaded for the function to work: deSolve.

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.

Model Author

Andreas Handel

Model creation date

2022-05-09

Code Author

generated by the modelbuilder R package

Code creation date

2022-05-09

Examples

# To run the simulation with default parameters:
result <- simulate_chronicvirusir_ode()
# To choose values other than the standard one, specify them like this:
result <- simulate_chronicvirusir_ode(U = 2e+05,I = 0,V = 2,F = 2,T = 2)
# You can display or further process the result, like this:
plot(result$ts[,'time'],result$ts[,'U'],xlab='Time',ylab='Numbers',type='l')

print(paste('Max number of U: ',max(result$ts[,'U'])))
#> [1] "Max number of U:  2e+05"