You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEAT] Port PotentialCSpatialLagRegression and AllocationCClueLikeSaturation (LuccME-BR components) #6
Add the two continuous LuccME components that disslucc lacks and that the LuccME-BR model (Bezerra et al. 2022, PLOS ONE e0256052) is built from:
PotentialCSpatialLagRegression — potential = const + Σβx + ρ·(mean of the cell and its Moore neighbours), one parameter block per region;
AllocationCClueLikeSaturation — CLUE-like continuous allocation with a per-cell saturation indicator (changeLimiarValue / maxChangeAboveLimiar), one parameter block per region.
components/potential/spatial_lag.py → PotentialSpatialLagRegression (interface of PotentialLinearRegression), components/allocation/saturation.py → AllocationClueLikeSaturation (interface of AllocationClueLike), specs in schemas.py.
Faithful to LuccME 6244dd4, including what looks accidental: the constant adaptation accumulates year to year; correctCellChange runs (spelled correctly in the Saturation variant) and its BACKP carries over from cell to cell; the neighbourhood LuccME names "11x11" is TerraME's mxn default, 3 × 3 with the cell.
Goldens lab03 and lab06 from terrame-docker (the two labs that combine exactly these components; lab06 also updates a driver in 2009, which shows LuccME pairs dynamic variables by position, not by id).
Those goldens never reach correctCellChange, the saturation branch or isolated cells, so these parts are also checked against the original Lua functions run with lupa (tests/lua/, provisional — to be replaced by component-level goldens generated in terrame-docker).
Existing components and Lab1/Lab15 numbers untouched.
Acceptance Criteria (Definition of Done)
Implementation completed in the target modules
Tests: potential alone and full model vs lab03/lab06 goldens (every cell, every year, plus TerraME's logged iterations and maximum error); differential tests vs the Lua for the branches the goldens do not reach
pytest tests/ -v still reports the same Lab1/Lab15 validation numbers
Activity
Add LuccSaturationExecutor, with raster input and intermediate steps (#6
Read named-band GeoTIFFs in the base executor; use RasterBackend.shif…