The idea of developing modular software to simulate the dynamics and control of mosquito-borne pathogens originated sometime around 2009 at the Emerging Pathogens Institute, University of Florida. It took much longer than anticipated to finish. Some concepts have appeared in various publications. Some of the algorithms trivial back to other software packages that were never launched, but that someday might yet be completed (e.g., MASH). In retrospect, a key challenge was blood feeding, but it was not the only one.
ramp.xde
In this document, we let exDE
A major change was implemented in the way ramp.xde
handles delay differential equations. New algorithms
were added to Ross-Macdonald models that compute mosquito survival and
dispersal through an incubation period varying in length.
Inits – initial values are now
handled separately, with new functions get_inits()
and the
S3
families of functions get_inits_L()
and
get_inits_MYZ()
and get_inits_X().
A new
function update_inits()
resets the initial values to the
last value simulated.
Indexing – indices for
variables are now collected in pars$ix
Setup – Several new functions have been added to set up basic models.
Solving – The S3
function
xds_solve()
was added to solve differential equations of
various classes.
Outputs – The S3
function
parse_deout()
was added to parse the output of
deSolve
and return the orbits in a set of named lists.
These lists are attached to pars$outputs$orbits.
New
functions were also written to compute the dynamical terms that connect
the major components.
Demography – Functionality has been added to handle human demographic changes, including births, deaths, migration, and aging.
Hosts – This version handles multiple vertebrate host or vector species.
Forcing – The models have been reconfigured to model malaria as a changing baseline that has been modified by vector control.
exDE
In modular computation with delay differential equations, it is often necessary to compute the value of a term at some lagged values. For example, in the Ross-Macdonald model:
the values of the variables at time
can be retrieved using lagvalue,
but the term
is computed outside of dMYZdt
and passed as an argument. To
handle this in Version 1.0, the function that computed
dispatched on the type of dMYZdt
so that it would pass two
values:
Handling delays in general posed a far greater challenge in models with exogenous forcing. Consider, for example, models where blood feeding depends on resource availability, and resources vary with time: we would need to compute the blood feeding parameters in relation to blood host availability and vector control (with effect sizes ):
and The software design challenge was daunting, and it would have become difficult to manage if this dispatching had fully propagated.
The decision to internalize computation of lagged values was consistent with the overall plug-and-play design principle, and it would almost certainly lower the burden for developers wanting to add new models.
ramp.xde
A change was made to internalize compuation of lagged values
for terms. For terms that depend on variables or processes
outside of a dynamical component and whose value must be known at some
lagged value in the past, generically denoted
,
we create a new variable
,
and such that
We add this variable to the the derivatives function, and index the new
dummy variable
as if it were a model variable. The value of
can be computed using deSolve::lagderiv
For an example, see the implementation in the function
dMYZdt.RM
exDE
In version 1.0, the initial values were stored with the parameters in
pars$MYZpar
or pars$Lpar
or
pars$Xpar
ramp.xde
In version 2.0, initial values are found in
pars$MYZinits
or pars$Linits
or
pars$Xinits
get_inits()
returns a vector of initial
valuespars
MYZinits
is a list()
MYZinits[[1]]
has initial values for the
species
MYZinits[[2]]
has initial values for the
species
… up to the
species where
nVectors
Linits
is a list()
Linits[[1]]
has initial values for the
species
Linits[[2]]
has initial values for the
species
… up to the
species where
nVectors
Xinits
is a list()
Xinits[[1]]
has initial values for the
species
Xinits[[2]]
has initial values for the
species
… up to the
species where
nHosts
exDE
In version 1.0, the indices were attached to pars
MYZ_ix
for the
species
L_ix
for the
species
X_ix
for the
species
ramp.xde
In version 2.0, indices are stored as named lists under
pars$ix
MYZ_ix
is a list()
MYZ[[1]]
has indices for the
species
MYZ[[2]]
has indices for the
species
… up to the
species where
nVectors
L_ix
is a list()
L[[1]]
has indices for the
species
L[[2]]
has indices for the
species
… up to the
species where
nVectors
X_ix
is a list()
X[[1]]
has indices for the
species
X[[2]]
has indices for the
species
… up to the
species where
nHosts
ramp.xde
Version 2.0 adds a new class
of functions, called xde_setup
that streamline model setup
for all models. As we added new features to handle malaria control and
exogenous forcing, the burden of managing
Easy setup relies on several new functions:
make_parameters_xde
(in utils.R
) creates a
new list that sets up an empty model.Parameters
setup_MYZpar
sets up and returns a
MYZpar
object.
setup_Lpar
sets up and returns a Lpar
object
setup_Xpar
sets up and returns a Xpar
object
Initial Values
setup_MYZinits
sets up and returns a
MYZinits
object
setup_Linits
sets up and returns a
Linits
object
setup_Xinits
sets up and returns a
Xinits
object
Version 2.0 parses outputs and includes functions for basic plotting.
parse_deout
and related functions parse the output
of deSolve()
and attach the values of the variables by name
to a list called pars$outputs
for ordinary solving, the outputs are attached to
pars$outputs$orbits
for steady states, the outputs are attached to
pars$outputs$stable_orbits
Models with multiple vector species or multiple host species are now handled.
There are two new structural parameters:
nVectors
is the number of vector species;
nHosts
is the number of vertebrate host
species;
Parameters - Mutiple-species required making
changes to the way MYZpar
and Lpar
and
Xpar
were configured
Transmission - Mutiple-species required making
changes to the way beta
and kappa
and
EIR
and FoI
were handled.
Egg Laying - Mutiple-species required making changes to the way egg-laying was handled.
exDE
In version 1.0, the default object had one vertebrate host and one vector species
pars
MYZpar
for the
species
Lpar
for the
species
Xpar
for the
species
ramp.xde
In version 2.0, the default object has changed the location of major objects:
pars
MYZpar
is a list()
MYZpar[[1]]
is the
species
MYZpar[[2]]
is the
species
… up to the
species where
nVectors
Lpar
is a list()
Lpar[[1]]
is the
species
Lpar[[2]]
is the
species
… up to the
species where
nVectors
Xpar
is a list()
Xpar[[1]]
is the
species
Xpar[[2]]
is the
species
… up to the
species where
nHosts
ramp.xds
ramp.xds
was designed to replace exDE
and MicroMoB, which were originally designed by Sean L. Wu and Professor
David L. Smith. David L Smith developed the prototypes. Sean L. Wu wrote
the first versions of the R-packages. Development of exDE continued. The
name exDE was changed to ramp.xds where development continued. A stable
version of exDE was restored. Functionality for discrete time systems
was added to ramp.xds in the spring of 2024. A name change to ramp.xds
is planned.