A modular form is a stylized way of writing down a
dynamical systems that emphasizes the structure of the underlying
process. The modular structure of ramp.xds
can be understood through the use of these forms. The forms we describe
here rewrite models so that they closely resemble their implementation
in ramp.xds
, which makes it possible to relate written
equations and computed code.
A Standard Form
A mathematical framework for building modular models of malaria
dynamics and control (and other mosquito-borne pathogens) was described
in Spatial Dynamics of Malaria Transmission, and that
framework has been implemented in ramp.xds.
There is no standard form for writing down systems of differential equations, but many forms are used, depending on context. For comparison, we writing down a system of equations that does not emphasize the modularity, or not a modular form.
To illustrate the modular form, we start with the Ross-Macdonald-style model in Box 1.
Box 1: A Ross-Macdonald Model
Let the dependent variable
denote the density of infected humans, and the parameter the density of all humansLet the dependent variable
denote the density of infected mosquitoes, and the parameter the density of all mosquitoesLet
denote the fraction of bites by infective mosquitoes that infect a human, and let denote the rate that infections clearLet
denote the fraction of blood meals on infectious humans infect a mosquito, and let denote the mosquito death rateLet
denote the overall blood feeding rate, and the human fractionLet
denote the EIP.
In this set of equations, we ignore the delay for sporogony, but we
count the mortality, so infections occur at the rate
…in Modular Form
We illustrate by writing a Ross-Macdonald model in its modular form
(Figure 1). In the modular form, we identify the terms in one equation
that depend on the other variable. First, we focus on the equation
describing human infection dynamics. We note that it depends on a term
involving the variable
and now we can rewrite the equation
Next, we isolate the equation describing mosquito infection dynamics, we note that it depends on a term that we will call the net infectiousness (NI).
The term
We note that
Since we also want to make this model extensible, we want to draw
attention to the term
We assume that exposure is Poisson distributed:
We emphasize that this is the same set

Computation
To solve these equations, we need to write functions that compute the
derivatives. We are using the R package deSolve.
A properly
formed derivative function implementing the
Full Modularity
For a longer discussion of modularity, see the vignette modularity