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
engine: dimension name in a different case from its declaration fails #1018
A variable declared over a dimension spelled in different case from the dimension's own declaration (variable over dima, dimension declared DimA) fails with bad_dimension_name.
Everywhere else the engine matches names case- and separator-insensitively, so this should resolve.
Example
Project dimension DimA = {a1, a2}; variable x whose equation is apply-to-all over dima.
Expected: x has two elements.
Actual: x's dimension does not resolve.
This is from code reading; it has not been reproduced with a model.
Why it matters
Seen only in constructed cases.
It needs a variable whose dimension list is spelled differently from the declaration, which a hand-edited XMILE file, a JSON/MCP edit, or an importer that canonicalizes one side but not the other could produce; whether any importer does today is unknown.
The bug is a plain inconsistency, and the fix is small.
Fix
Before parsing a variable, the engine narrows the project's dimensions to the ones the variable is declared over (plus anything reachable through dimension mappings), so editing an unrelated dimension does not invalidate every cached parse.
That filter compares the variable's dimension names as written against each dimension's display name with exact string equality.
Names reached through a mapping are converted to display names first; the variable's own names are not.
Compare canonical names on both sides of the filter (or map the variable's names through the same canonical-to-display table the mapping targets use).
Do it in both copies of the filter, which must stay identical, and add one test with a case-differing dimension that is not reachable through a mapping.
Pointers
src/simlin-engine/src/db/query.rs: parse_source_variable and variable_dimensions (the two filters), variable_relevant_dimensions
changed the title [-]engine: the per-variable dimension narrowing matches raw equation spellings against display names, so a case-differing dimension reference is dropped before canonical matching[/-][+]engine: dimension name in a different case from its declaration fails[/+]on Oct 12, 2026
Activity
engine: performance pass on compile, simulation, and the LTM path (#1021
[-]engine: the per-variable dimension narrowing matches raw equation spellings against display names, so a case-differing dimension reference is dropped before canonical matching[/-][+]engine: dimension name in a different case from its declaration fails[/+]