DisSModel
A Discrete Spatial Modeling framework for Python.
DisSModel: Discrete Spatial Modeling in Python
DisSModel is a modular, open-source framework designed for spatially explicit dynamic modeling. Developed within the LambdaGeo research group at UFMA, it serves as a modern, Pythonic successor to the TerraME framework.
Why DisSModel?
While traditional tools often rely on specialized stacks, DisSModel is built directly on top of the standard Python geospatial ecosystem, leveraging GeoPandas, PySAL, and Salabim. It provides a unified environment for building:
- Cellular Automata (CA): Spatial grid models with configurable neighborhood strategies (Queen, Rook, KNN).
- System Dynamics (SysDyn): Compartmental models with automatic live plotting.
🧩 Ecosystem
DisSModel is the core framework — a clean, specialized package for the simulation engine itself. Models, domain applications, and companion tools live in their own repositories, each installable independently:
| Package | Description | Install |
|---|---|---|
dissmodel-ca | Classic Cellular Automata (Game of Life, Forest Fire, Growth) | pip install "git+https://github.com/DisSModel/dissmodel-ca.git" |
dissmodel-sysdyn | System Dynamics (SIR, Predator-Prey, Lorenz) | pip install "git+https://github.com/DisSModel/dissmodel-sysdyn.git" |
brmangue-dissmodel | BR-MANGUE coastal flooding and mangrove succession model, validated against TerraME | pip install "git+https://github.com/DisSModel/brmangue-dissmodel.git" |
disslucc-continuous | Land Use and Cover Change models, continuous allocation (CLUE-inspired) | pip install "git+https://github.com/DisSModel/disslucc-continuous.git" |
disslucc-discrete | Land Use and Cover Change models, discrete allocation (CLUE-inspired) | pip install "git+https://github.com/DisSModel/disslucc-discrete.git" |
DisSModel is also the current chapter of a longer LambdaGeo research trajectory on reproducible, interoperable spatial modeling — alongside tools such as QGISSPARQL (Linked Data ↔ GIS integration) and TerraHS (a from-scratch, pure-Haskell rewrite of the original TerraHS map-algebra library).
Key Features
- Flexible Execution: Run models via CLI scripts, Jupyter notebooks, or as interactive Streamlit web apps.
- Reactive UI: Use
@display_inputsto automatically generate sidebar widgets from model attributes. - Geospatial Integration: Seamlessly generate grids from dimensions, bounds, or existing GeoDataFrames.
Quick Example — SIR Model
from dissmodel.core import Environment
from dissmodel.models.sysdyn import SIR
from dissmodel.visualization import Chart
env = Environment()
SIR(susceptible=9998, infected=2, recovered=0, duration=2)
Chart(show_legend=True)
env.run(30)
Research & Citation
If you use DisSModel in your research, please cite:
Costa, S. & Santos Junior, N. (2025). DisSModel: A Discrete Spatial Modeling Framework for Python. LambdaGeo, Federal University of Maranhão (UFMA).