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.
The four-module architecture: Core, Geo, Models, and Visualization.
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.
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).