Feature: CLUMPY style allocation#30
Conversation
…architecture Agent-Logs-Url: https://github.com/ethzplus/evoland-plus/sessions/39b6065d-0375-4ce9-ae25-40e65e2e68dd Co-authored-by: mmyrte <24587121+mmyrte@users.noreply.github.com>
…lock Agent-Logs-Url: https://github.com/ethzplus/evoland-plus/sessions/39b6065d-0375-4ce9-ae25-40e65e2e68dd Co-authored-by: mmyrte <24587121+mmyrte@users.noreply.github.com>
There was a problem hiding this comment.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
air
[air] reported by reviewdog 🐶
evoland-plus/inst/tinytest/test_alloc_params_t.R
Lines 79 to 80 in 2cfdcba
[air] reported by reviewdog 🐶
[air] reported by reviewdog 🐶
evoland-plus/inst/tinytest/test_trans_pot_t.R
Lines 11 to 12 in 2cfdcba
[air] reported by reviewdog 🐶
evoland-plus/inst/tinytest/test_trans_pot_t.R
Lines 37 to 38 in 2cfdcba
[air] reported by reviewdog 🐶
[air] reported by reviewdog 🐶
evoland-plus/inst/tinytest/test_trans_pot_t.R
Lines 43 to 44 in 2cfdcba
[air] reported by reviewdog 🐶
evoland-plus/inst/tinytest/test_trans_pot_t.R
Lines 48 to 49 in 2cfdcba
[air] reported by reviewdog 🐶
evoland-plus/inst/tinytest/test_trans_pot_t.R
Lines 81 to 82 in 2cfdcba
6a135de to
a672f32
Compare
…esis Adds dev/pivot-mechanism-verification.md documenting: - GART/MuST pivot test is a faithful inverse-CDF translation - the allocator implements the simplified single-pass strategy, not the bias-free uPAM (no per-patch P(v|u) update, no merge rollback) - the 1/E(sigma) pivot rarefaction (thesis Fig. 3.2) is missing - determinism behaviour under 0/1 transition potentials Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0189ymK6BeCwBC8iZ45CGuVb
…hape metric
Move the whole CLUMPY pivot-selection + patch-growth routine into C++
(allocate_clumpy_cpp) so the hot loop no longer crosses into R per patch.
- Add selectable allocation methods:
* uSAM (single GART pass, quantity of change in expectation)
* uPAM (iterative GART with a per-transition pixel quota and sampling
without replacement; batch_size dials speed vs fidelity, 1 = strict
one-pivot-per-draw). Affordable here because evoland's fixed-model
potentials are pool-independent, so rho(z|u) is never re-estimated.
- Apply the 1/E(sigma) pivot rarefaction before GART (thesis Fig. 3.2) so the
allocated quantity of change matches the target rate; rate confirmed to be a
quantity-of-change rate via get_obs_trans_rates.
- Clamp negative/NaN potentials inside GART (matches reference clumpy).
- Move gart/sample_lognorm_area/raster_neighbors from R into C++
(gart_cpp, sample_lognorm_area_cpp, raster_neighbors_cpp).
- Unify the duplicate patch-shape metric (patch_eccentricity vs
calculate_elongation) into clumpy::elongation_from_raw_moments
(src/clumpy_geometry.h), shared by the grower and calculate_class_stats_cpp.
- Patch grower uses incremental moments (O(1) per candidate) and the shared
metric; thread method/batch_size through alloc_clumpy() and the evoland_db
binding; update unit tests to the C++ entry points.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0189ymK6BeCwBC8iZ45CGuVb
R CMD check (light) failed during package load because
evoland_db_views.Rattempted to add public methods that are now already declared inevoland_db.R. The failure was caused by duplicate R6 method registration at load time.R6 method override compatibility
evoland_db$set(...)calls inR/evoland_db_views.Rto explicitly allow replacing predeclared methods:trans_rates_dinamica_vadjusted_trans_pot_valloc_params_clumpy_vevoland_db.Ras the canonical method declaration surface while preserving view-backed implementations inevoland_db_views.R.Behavioral impact