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
ltm: a loop across a dimension mapping is reported once per element #755
duplicateThis issue or pull request already existsengineIssues with the rust-based simulation engineenhancementNew feature or requestltmLoops that Matter (LTM) analysis subsystem
A feedback loop that crosses a dimension mapping is reported as one scalar loop per element instead of one arrayed loop.
For stock[State] -> x[Region] -> stock[State] with a State -> Region mapping, each circuit (stock[s1] -> x[r1] -> stock[s1], ...) becomes its own loop r1, r2, ..., where a loop over a single dimension would be one loop r1 with a score per element.
The scores are correct; only the grouping differs.
Why it happens
build_element_level_loops decides whether a circuit stays on one element by comparing the first subscript element of each node by name. s1 and r1 differ as names even though the mapping pairs them, so the circuit is treated as crossing elements.
Fix
Compare elements through the mapping (DimensionsContext::executed_read_correspondence) instead of by name.
This is the same change to the same grouping test as #658 (loops through a scalar SUM reported per element); do them together.
Pointers
src/simlin-engine/src/db/ltm/loops.rs: build_element_level_loops, the is_cross_element check
changed the title [-]ltm: collapse mapped-diagonal loop families into one arrayed loop score (cross-element check defeats grouping across dimension mappings)[/-][+]ltm: a loop across a dimension mapping is reported once per element[/+]on Oct 12, 2026
duplicateThis issue or pull request already existsengineIssues with the rust-based simulation engineenhancementNew feature or requestltmLoops that Matter (LTM) analysis subsystem
Activity
[-]ltm: collapse mapped-diagonal loop families into one arrayed loop score (cross-element check defeats grouping across dimension mappings)[/-][+]ltm: a loop across a dimension mapping is reported once per element[/+]bpowers commentedon Oct 12, 2026
Closing as a duplicate of #658.
Same grouping check in build_element_level_loops as #658 needs widening; one change covers both.