Epiworld¶
A fast, general-purpose C++ framework for agent-based epidemiological simulation.
Quick Example¶
#include "epiworld.hpp"
using namespace epiworld;
int main() {
// Create a built-in SIR model
epimodels::ModelSIR<> model(
"COVID-19", // Virus name
0.01, // Initial prevalence
0.1, // Transmission rate
0.3 // Recovery rate
);
// Generate a small-world contact network
model.agents_smallworld(100000, 10, false, 0.01);
// Run for 100 days with seed 122
model.run(100, 122);
model.print();
return 0;
}
Lightning Fast¶
Over 150 million agent × day simulations per second — built for large-scale studies without sacrificing speed.
Fully Flexible¶
Define arbitrary states, viruses, tools, and update rules. Build the exact model you need from composable primitives.
Header-Only¶
Single-file include with zero external dependencies — just the C++ standard library. Drop it in and go.
Network-Aware¶
Simulations run on contact networks with configurable topologies including small-world, scale-free, and custom graphs.
Multi-Pathogen¶
Multiple viruses and tools can coexist in one simulation with independent transmission and recovery dynamics.
Rich Analytics¶
Built-in data collection, reproductive number tracking, generation intervals, and likelihood-free inference (LFMCMC).
Documentation Sections¶
-
User Guide
Learn epiworld step by step: fundamentals, building custom models, adding viruses and tools, and using the built-in models.
-
Examples
Runnable C++ examples from the epiworld repository — from a simple "Hello World" to advanced multi-population models.
-
API Reference
Complete class and function reference generated from the source code via Doxygen.
Source Code¶
The epiworld source code is hosted at UofUEpiBio/epiworld on GitHub. This documentation site is built from the UofUEpiBio/epiworld-docs repository and always reflects the latest version of the library.