All notable changes to this project will be documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
SyncSpatialModel—SpatialModelwith automatic_pastsnapshot semantics, equivalent to TerraME'scs:synchronize(). Declareself.land_use_typesinsetup()and<col>_pastcolumns are managed automatically.SyncRasterModel— raster analogue ofSyncSpatialModel. Copies each array inland_use_typesto<n>_pastin theRasterBackendbefore and after each step.- Both expose a public
synchronize()method that can also be called manually.
shapefile_to_raster_backend— loads any GeoPandas-supported vector format (Shapefile, GeoJSON, GeoPackage, ZIP) and rasterizes attribute columns into aRasterBackend. Adds a"mask"band marking valid cells. Supportsnodata_valueto distinguish out-of-extent cells from valid zero values.save_raster_backend— convenience wrapper that writes all (or selected) arrays to a GeoTIFF without requiring aband_spec.load_geotiffandsave_geotiffupdated with full docstrings and support for.ziparchives containing a single GeoTIFF.
schemeparameter:"manual"(default),"equal_interval","quantiles".k— number of colour classes forequal_interval. Default:5.legend— show or hide the colorbar. Default:True.save_frames— force PNG output even in interactive mode.auto_mask— automatically applies the"mask"band from the backend so out-of-extent cells are transparent. Default:True.
figsize,interval,save_framesparameters.- Headless fallback: saves PNGs to
map_frames/when no display is available.
RasterMapno longer callsmatplotlib.use()at import time, preventing side effects when imported alongside other visualization components.make_raster_grid()renamed toraster_grid(). Old name kept as aDeprecationWarningalias and will be removed in v0.4.0.
Map: fixedAttributeError: 'Map' object has no attribute 'fig'when used with Streamlit (plot_area=st.empty()).Map: no longer raisesRuntimeErrorwhen no display is available — falls back to saving PNGs tomap_frames/.RasterMap: fixedplt.close("all")closing all figures when multipleRasterMapinstances are active. Each instance now maintains its own persistent figure and updates independently.
parse_idxnow returnsGridPos(row, col)namedtuple instead of a plain tuple, eliminating the(col, row)vs(row, col)ambiguity. Tuple unpacking remains fully compatible — no breaking change for existing callers.regular_grid()renamed tovector_grid(). Old name kept as aDeprecationWarningalias and will be removed in v0.3.0.
GridPosnamedtuple exported fromdissmodel.geo.vector.regular_grid.
RasterModel.setup()andRasterCellularAutomaton.setup()no longer accept**kwargs, resolving a salabim incompatibility that raisedTypeError: parameter 'kwargs' not allowed.
RasterBackend— named NumPy array store with vectorized spatial operations:shift2d,focal_sum,focal_sum_mask,neighbor_contact,snapshot.RasterModel— base class for raster push models, providingself.backend,self.shape,self.shift, andself.dirs(Moore neighbourhood).RasterCellularAutomaton— vectorized CA base class;rule(arrays) → dictreplaces per-cell iteration.raster_grid()/make_raster_grid()—RasterBackendfactory.DIRS_MOOREandDIRS_VON_NEUMANN— neighbourhood direction constants.RasterMap— visualization component supporting categorical (color_map) and continuous (cmap) modes; renders to Streamlit, Jupyter, interactive window, or headless PNG frames.
SpatialModel— GeoDataFrame-based push model withcreate_neighborhood(),neighs_id(),neighs(), andneighbor_values().vector_grid()— replacesregular_grid()as the canonical grid factory name.
GameOfLifeRaster— Conway's Game of Life on raster substrate.FireModelRaster— forest fire spread on raster substrate.benchmark_game_of_life.py— vector vs raster benchmark with exact cell-by-cell validation; supports--steps,--sizes,--no-validationflags.benchmark_raster_vs_vector.py— flood model benchmark at realistic workload.- CLI examples updated.
- Full test suite:
tests/vector/,tests/raster/,tests/integration/. tests/integration/test_game_of_life.py— exact cell-by-cell validation across 5×5, 10×10, 20×20 grids and 5 seeds.tests/integration/test_flood_model.py— cross-substrate equivalence with 95% match threshold.
- Package reorganized:
dissmodel.geo.vector.*anddissmodel.geo.raster.*replace the flatdissmodel.geo.*layout. - Documentation migrated to MkDocs Material with separate API reference pages for vector and raster substrates.
- Import paths corrected across all examples after package reorganization.
celullar_automaton.pyfilename typo fixed →cellular_automaton.py.
Benchmarks on Conway's Game of Life (10 steps, Python 3.12, NumPy):
| Grid | Cells | Raster (ms/step) | Vector (ms/step) | Speedup |
|---|---|---|---|---|
| 10×10 | 100 | 0.15 | 30.11 | 206× |
| 50×50 | 2,500 | 0.20 | 647.22 | 3,164× |
| 100×100 | 10,000 | 0.60 | 2,715.16 | 4,491× |
| 1,000×1,000 | 1,000,000 | 25.85 | — | — |
- JOSS submission at this version.
- Minor documentation and packaging fixes.
- Initial release.
CellularAutomatonandSpatialModelon GeoDataFrame substrate.regular_grid(),fill(),FillStrategy.- System Dynamics models:
SIR,PredatorPrey,PopulationGrowth,Lorenz,Coffee. - Cellular Automata models:
GameOfLife,FireModel,FireModelProb,Snow,Growth,Propagation,Anneal. - Salabim integration via
dissmodel.core.EnvironmentandModel. - Streamlit examples.