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: module stocks reached only through internal feedback are ignored #282
When a feedback loop passes through a module, LTM adds the module's internal stocks to the loop's stock list, but only stocks that sit on a simple path from the module's input to its output.
A stock that affects the output only through an internal feedback loop hanging off that path is not added.
Example
A user module with input -> a -> output, where a also depends on stock_b and stock_b's inflow depends on a.
A parent loop through this module gets no internal stocks, because stock_b is not on the input -> a -> output path.
Why it matters
Probably not at all.
The input-to-output path in this example has no stock on it, so a parent-level cycle through the module is simultaneous end to end: it is an algebraic loop at the parent level, not a feedback loop through state.
Leaving stock_b out is arguably the right answer.
The enriched stock list is used in one place that changes results: a pinned loop is rejected if it contains no stock, and module-internal stocks count.
It does not affect cycle partitions, since module-internal stocks never appear in the parent's partition map.
Every built-in module (SMOOTH, DELAY, TREND) has its stocks on the direct path.
No real model has this shape.
Fix
None recommended.
If a real model shows a loop wrongly treated as stockless, collect every stock reachable from the nodes on the path (simple, may over-count).
changed the title [-]LTM: module stock enrichment misses stocks reachable only through internal feedback cycles[/-][+]ltm: module stocks reached only through internal feedback are ignored[/+]on Oct 12, 2026
In the issue's own example the input-to-output path has no stock, so the parent cycle is algebraic and leaving the stock out is arguably correct; the stock list only affects the pinned-loop 'no stock' check, all built-in modules are fine, and no real model has this shape.
Activity
[-]LTM: module stock enrichment misses stocks reachable only through internal feedback cycles[/-][+]ltm: module stocks reached only through internal feedback are ignored[/+]bpowers commentedon Oct 12, 2026
Closing as won't fix.
In the issue's own example the input-to-output path has no stock, so the parent cycle is algebraic and leaving the stock out is arguably correct; the stock list only affects the pinned-loop 'no stock' check, all built-in modules are fine, and no real model has this shape.