vignettes/X-xde-workhorse.Rmd
X-xde-workhorse.Rmd
suppressMessages(library(knitr))
suppressMessages(library(ramp.xds))
#suppressMessages(library(ramp.library))
library(deSolve)
library(ramp.library)
#devtools::load_all()
Warning: workhorse
is in
development.
In the following, we present a stage of infection (SoI) model for malaria infection that recognizes an important difference between the two major phases of an infection: the acute phase characterized by geometrically increasing parasite numbers; and the chronic phase characterized by fluctuating parasite densities. The model explicitly considers superinfection, which moves individuals from an infected state into a parallel set of states.
Uninfected individuals are either susceptible to infection or chemoprotected and not susceptible to infection.
Some recently treated, chemoprotected individuals remain infectious The remainder are chemoprotected and not infectious,
There are four chronic infection stages: and .
There are five acute infection stages: four () that correspond to an acute-phase infection concurrently infected with parasites in the chronic phase; and one () that corresponds to carrying an acute phase infection but being otherwise uninfected.
All acutely infected individuals transition into
The variables are thus:
Chemoprotected states are and
Acute stages of infection:
Chronic stages of infection:
These are:
- the rate of recovery from infection
- treatment rate
- rate at which immunity is acquired
- rate at which chemoprophylaxis is administered to uninfected individuals
- rate at which chemoprophylaxis is administered to individuals in acute phase of infection
- rate at which individuals in acute phase move into chronic stage of infection
- rate at which individuals in chronic stages of infection obtain chemoprophylaxis
- the peak of infection
- rate at which individuals move through the different chronic stages of infection
- rate of loss of immunity
Active acute-phase infections become apparent after days, and:
Uninfected
Chemoprotected
We are assuming that treatment as a result of an acute infection could leave a person infectious:
Infected
Where is on the order of and
At peak:
Past peak, for :
Immune Tracking
#devtools::load_all()
wh <- xds_setup(dlay = 'dde',
Xname = "workhorse",
HPop=1000,
Lname = "trivial",
Lopts = list(
Lambda = 3000,
season = function(t){1+sin(2*pi*t/365)}
)
)
wh <- xde_solve(wh, Tmax = 5*365, dt=10)
wh1 = wh
wh1$Xpar[[1]]$zeta_1 = 0.02
wh1 <- xde_solve(wh1, Tmax = 5*365, dt=10)
xds_plot_X(wh)
xds_plot_X(wh1, llty=2, add=FALSE)
time = wh$outputs$time
with(wh$outputs$orbits$XH[[1]],{
A = A0+A1+A2+A3+A4
I = I1+I2+I3+I4
plot(time, U + P + G, type = "l", ylim = range(0, H), col = "darkblue")
lines(time, A+I, col = "darkred")
lines(time, A, col = "purple")
lines(time, I-I1, col = "orange")
lines(time, P+G, col = "darkgreen")
})
with(wh1$outputs$orbits$XH[[1]],{
A = A0+A1+A2+A3+A4
I = I1+I2+I3+I4
lines(time, U + P + G, col = "darkblue", lty=2)
lines(time, A+I, col = "darkred", lty=2)
lines(time, A, col = "purple", lty=2)
lines(time, I-I1, col = "orange", lty=2)
lines(time, P+G, col = "darkgreen", lty=2)
})