Skip to content

LASER documentation

LASER (Light Agent Spatial modeling for ERadication) is a high-performance, stochastic agent-based simulation framework for modeling the spread of infectious diseases. It supports spatial structure, age demographics, and modular disease logic using Python-based components.

The LASER framework is designed to be flexible and is composed of modular components that can be used to create custom epidemiological models. For those who want to explore disease dynamics without the need to code from scratch, the framework includes epidemiological components that are designed model diseases with non-vector transmission dynamics. These modules can be used to create anything from simple compartmental models to more complex agent-based models with spatial dynamics. The framework is open-source, so for those who want to contribute to code, contributions are welcome!

Installation

LASER is distributed as a Python package. The recommended install path for most users is through the high-level laser-generic package, which includes the core engine and all epidemiological modeling tools.


To install LASER, run:

1
uv pip install laser-generic

This installs:

  • laser-generic: modeling framework and components (e.g., SIR, SEIR, demography, mobility)
  • laser-core: the basic data structures used by laser-generic

Once installed, you can start using LASER (importing components and composing a model) with:

1
2
3
from laser.generic.model import Model
from laser.generic.models.components import Susceptible
etc.

🛠️ For engine developers

If you are developing or modifying the model code, you can install the low-level engine directly:

1
uv pip install laser-core

This is not required for modelers using the LASER framework via laser-generic.


Verify the install

Check your install with:

1
python -c "import laser.generic; print('LASER is ready.')"

Why uv?

uv is a modern Python package manager that is:

  • Much faster than pip
  • Fully compatible with pip install
  • Drop-in replacement for Python environments

To install uv:

1
pip install uv

Learn more

Authors

  • Christopher Lorton - Tech Lead, Author, Maintainer
  • Kevin McCarthy - Research Lead, Author
  • Paul Saxman - Author, Maintainer
  • Jonathan Bloedow - Author
  • Katherine Rosenfeld - Author