fleet is a deterministic mean-field counterpart to the
malariasimulation
individual-based model (IBM) of Plasmodium falciparum and P. vivax malaria.
It takes an unmodified malariasimulation parameter list, is seeded at the
malariaEquilibrium (or malariaEquilibriumVivax) solution as the IBM is,
advances one day at a time in the IBM's order, and returns the IBM's output
table, so post-processing written for the IBM, including
postie, works unchanged.
The human model is the Griffin-style model, structured by age and biting
heterogeneity, and for P. vivax the White-style model with hypnozoite batches
and relapse; both are coupled to the compartmental mosquito model. fleet is
written in odin2 and
dust2. Compartments are per-capita
densities, so run time does not depend on population size: a 30-year
falciparum run takes about 2 s on one core. The intended uses are calibration,
parameter sweeps and scenario work for which the IBM is too slow. Use the IBM
when you need stochastic variation or individual heterogeneity beyond the mean
field.
fleet is a work in progress and is not validated for research, policy or
operational use. It is published so that the approach and its comparison with
malariasimulation can be examined, not so that its numbers can be relied on.
- The API is unstable. The signature of
run_simulation_ode()has changed once and may change again without deprecation. - Known discrepancies with the IBM are open. On the country site files
fleetruns above the IBM on falciparum clinical and severe incidence, and further above it on P. vivax sites; neither excess is explained. Treat severe incidence, and anything derived from it such as DALYs, as indicative only. - Nothing has been peer reviewed, and there is no versioned release.
The current verdict on each comparison is in
fleetcheck. For results that must be
defensible now, use malariasimulation.
fleet and several of its dependencies compile C++ at install time, so a C++
toolchain is needed: Rtools on Windows, the Xcode command line tools on macOS,
or r-base-dev or equivalent on Linux.
# install.packages("remotes")
remotes::install_github("pwinskill/fleet")This also installs the hard dependencies that are only on GitHub (dust2,
monty, malariaEquilibrium and malariaEquilibriumVivax), through Remotes
in DESCRIPTION. It installs nothing from Suggests. The examples need two
suggested packages, malariasimulation to build parameter lists and postie
to post-process the output:
remotes::install_github(c("mrc-ide/malariasimulation", "mrc-ide/postie"))library(fleet)
# Output age bands are set on the parameter list, as for the IBM. The defaults
# give 2-10 prevalence and no incidence.
bands <- list(min = c(0, 5, 15) * 365, max = c(5, 15, 100) * 365 - 1)
p <- malariasimulation::get_parameters(list(
clinical_incidence_rendering_min_ages = bands$min,
clinical_incidence_rendering_max_ages = bands$max,
severe_incidence_rendering_min_ages = bands$min,
severe_incidence_rendering_max_ages = bands$max))
# 10 years, one row per day, in malariasimulation's columns
out <- run_simulation_ode(timesteps = 3650, parameters = malariasimulation::set_equilibrium(p, init_EIR = 20))
# post-processed as for an IBM run
postie::get_prevalence(out, diagnostic = "lm")$lm_prevalence_2_10
postie::get_rates(out)[, c("time", "age_lower", "age_upper", "clinical", "severe", "dalys")]Interventions are added with the usual malariasimulation::set_*() functions
and read from the parameter list; run_simulation_ode() has no extra arguments
for them. A list from get_parameters(parasite = "vivax") runs the P. vivax
model.
The package exports three functions: run_simulation_ode() runs the model,
ode_tuning() holds the discretisation settings, and default_age_lower()
gives the default age grid. The ode in two of the names is kept for
compatibility; the model is a daily update, not an ODE.
- Get started: running
the model, reading the output with
postie, interventions, demography, seasonality and P. vivax. - Usage notes: where the mean field departs from the IBM and what to do about it, and run times.
- Model specification: scope, the state space and the full daily update.
- Parameter reference:
how
fleethandles everymalariasimulationset_*()argument: exactly, approximately, or not at all. - Function reference.
- Contributing.
Agreement with the IBM is assessed in a separate project, fleetcheck: a register of claims covering core relationships, age structure, demography, interventions and 63 country site files, each with the criterion that decides it, the value measured against it and a verdict. It records the evidence so far, failing claims included, and is not a completed validation. It is kept outside this repository so that the evidence cannot fall out of date unnoticed alongside the code it assesses, and this README quotes no comparison figures.
MIT. Copyright (c) 2026 Peter Winskill. See LICENSE.md.
