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
mdl: no test simulates a one-parameter macro call #553
A one-parameter Vensim macro call such as PEAK(sales) now reaches macro resolution (#1076), but no test simulates one, and many comments still say such a call becomes a table lookup.
The importer used to rewrite every one-argument call NAME(x) as LOOKUP(NAME, x); it now does so only when NAME is a variable the model defines (calls_a_table).
Existing one-parameter fixtures (DOUBLE(3), DBL(...), LAGSUM(driver)) check only import text or names, not values.
Several macro tests still use two parameters to dodge the old rewrite.
One-parameter macros are common in real models: PEAK(x) in the metasd beer game (RealBeer4-Sterman13.mdl), SSHAPE(input) and others.
Fix
Add a one-parameter macro row to the macro simulation tests in tests/integration/simulate.rs, checking its value.
changed the title [-]engine: single-parameter Vensim macro invocation is silently rewritten to LOOKUP on MDL import[/-][+]mdl: a one-parameter macro call is read as a table lookup[/+]on Oct 12, 2026
changed the title [-]mdl: a one-parameter macro call is read as a table lookup[/-][+]mdl: no test simulates a one-parameter macro call[/+]on Oct 12, 2026
Closing: fixed on main. The rewrite to LOOKUP applies only when the name is a declared table (calls_a_table); 12b1df5 adds simulates_one_parameter_macro_calls, which simulates one-parameter macro calls and a one-argument table call, and removes the stale comments.
Activity
[-]engine: single-parameter Vensim macro invocation is silently rewritten to LOOKUP on MDL import[/-][+]mdl: a one-parameter macro call is read as a table lookup[/+][-]mdl: a one-parameter macro call is read as a table lookup[/-][+]mdl: no test simulates a one-parameter macro call[/+]bpowers commentedon Oct 12, 2026
Closing: fixed on main. The rewrite to LOOKUP applies only when the name is a declared table (
calls_a_table); 12b1df5 addssimulates_one_parameter_macro_calls, which simulates one-parameter macro calls and a one-argument table call, and removes the stale comments.