A modular Python ecosystem for spatially explicit dynamic modeling — Cellular Automata, System Dynamics, and Land Use & Cover Change simulation.
Ecosystem
Each package has a focused role. Use the core alone or combine extensions for complex geospatial simulations.
The core framework. Provides the Environment, Model, and discrete event engine that power every simulation in the ecosystem. Start here.
Cellular Automata library supporting GeoDataFrame-based (vector) and NumPy-based (raster) substrates with interactive Streamlit explorers.
Classic System Dynamics models — SIR, Lorenz, Predator–Prey — built on DisSModel with interactive Streamlit explorers and CLI tools.
Scalable execution platform — JupyterLab, FastAPI, distributed workers, and S3-compatible storage via Docker Compose. For production LUCC runs.
Spatially explicit simulation of sea-level rise impacts on mangrove ecosystems, implementing the model by Bezerra et al. (2014) on the DisSModel framework.
Design
Every simulation is a traceable experiment. Coefficients live in versioned TOML files, not buried in code.
Each run produces an immutable ExperimentRecord capturing provenance, input checksums, and model commit — ready to cite in a paper.
Calibrated coefficients live in versioned TOML files in dissmodel-configs, never hardcoded. Citeable by git hash.
Built on JupyterLab, FastAPI, Redis, and MinIO via Docker Compose. Pangeo integration is planned for a future release.
┌─────────────────────────────────┐ │ DisSModel Platform │ │ │ │ FastAPI │ │ ├── POST /submit_job │ │ ├── GET /job/{id} │ │ └── POST /experiments/repro │ │ │ │ Worker │ │ ├── ExecutorRegistry │ │ ├── ModelExecutor ABC │ │ └── Redis Queue │ ├─────────────────────────────────┤ │ Infrastructure │ │ JupyterLab · MinIO · Redis │ └─────────────────────────────────┘
Reference Application
The brmangue-dissmodel repository demonstrates DisSModel on real data from Maranhão, Brazil —
implementing flood propagation and mangrove migration based on Bezerra et al. (2014).
Pure simulation logic — no I/O, no infrastructure. Works standalone in a notebook or script.
from dissmodel import Environment env = Environment(start_time=2008, end_time=2030) # Models attach themselves to env on instantiation FloodModel(gdf=gdf, taxa_elevacao=0.5, attr_uso="uso") MangroveModel(gdf=gdf, altura_mare=6.0, attr_solo="solo") env.run()
Wraps the model with I/O, column mapping, provenance, and platform integration.
class CoastalVectorExecutor(ModelExecutor): name = "brmangue_vector" def load(self, record: ExperimentRecord) -> GeoDataFrame: # load data + apply column_map → canonical names ... def run(self, data: GeoDataFrame, record: ExperimentRecord) -> GeoDataFrame: # build env + models, call env.run() ...
The same executor runs locally via CLI or remotely via the platform API.
python main.py run \ --input data/input/mangue_grid.zip \ --output data/output/simulation.gpkg \ --param end_time=2030