Summary
A cluster of C-LEARN graphical-function / lookup / data-table-backed series import into the engine with a literal 0+0 equation (or per-element 0+0 | 0+0 | ... for arrayed vars) while the genuine-Vensim reference output (test/xmutil_test_models/Ref.vdf) carries substantial real values. The whole variable is therefore zeroed at runtime. This is the dominant residual cluster in the post-element-cycle-resolution C-LEARN numeric reconciliation (relative error = 1.0 -- entire variables sit at 0 vs real Vensim values).
Discovered during the C-LEARN hero-model work (branch clearn-hero-model, HEAD 8775ae97) after C-LEARN began compiling, running to FINAL TIME, and matching Ref.vdf within 1% on 96.3% of matched cells (following the per-element-GF mapping fix #589 / commit 61573545, and a :NA:-aware + near-zero-robust comparator in ensure_vdf_results). The decision was made to bank the 96.3% and track the residual rather than investigate now: these variables are excluded from the simulates_clearn gate via the documented EXPECTED_VDF_RESIDUAL exclusion constant, so the test passes on the reconciled set. This issue is the tracking item for the largest residual cluster.
Affected variables (representative, not exhaustive)
All from test/xmutil_test_models/C-LEARN v77 for Vensim.mdl. Their imported datamodel equation is literally 0+0 (or 0+0 | 0+0 | ... per element) while Ref.vdf has real values:
historical_gdp_lookup -- e.g. [cop_developing_b] Vensim = 1.487e5, Simlin = 0
historical_forestry_lookup
global_emissions_from_graph_lookup
ref_global_emissions_from_graph_lookup
rs_ch4
rs_hfc125, rs_hfc134a, rs_hfc143a, rs_hfc152a, rs_hfc227ea, rs_hfc23, rs_hfc245ca, rs_hfc32
other_forcings_smooth_plus_rcp85
other_forcings_composite_plus_rcp85
ozone_precursor_forcings
oc,_bc,_and_bio_aerosol_forcings
These are graphical-function / lookup / data-table-backed series.
Two candidate root causes (not yet determined)
The user chose to track rather than investigate, so the root cause is open. Two candidates:
(a) MDL-import / lowering bug -- a lookup / WITH LOOKUP / graphical-function or GET ...-style data construct is dropped to a 0+0 stub on import. If so, this is a genuine importer defect that silently zeroes real series.
(b) Genuine external-data dependency -- C-LEARN needs external data that is not present, in which case those series cannot match without the data and the 0+0 import may be the correct degradation (no fix to the importer is warranted, only documentation of the missing-data requirement).
The follow-up should determine which by inspecting one representative variable's (historical_gdp_lookup) MDL source in test/xmutil_test_models/C-LEARN v77 for Vensim.mdl and tracing how the importer (src/simlin-engine/src/mdl/) converts it to the 0+0 stub.
Why it matters
- Correctness: if (a), real lookup/data series are silently zeroed on import with no diagnostic -- wrong simulation output cascading through any downstream variable, no crash. This is the single largest source of C-LEARN's divergence from the Vensim reference.
- Diagnosability: a
0+0 stub is indistinguishable at runtime from a legitimately-zero variable; the degradation is invisible without comparing against reference output.
Components affected
src/simlin-engine/src/mdl/ -- convert/, reader, and the lookup / data-equation handling that emits the 0+0 stub.
- Test fixtures:
test/xmutil_test_models/C-LEARN v77 for Vensim.mdl, test/xmutil_test_models/Ref.vdf
src/simlin-engine/tests/simulate.rs -- simulates_clearn (these vars live in its EXPECTED_VDF_RESIDUAL exclusion const)
Discovery context
Identified during the C-LEARN hero-model element-cycle-resolution work (branch clearn-hero-model, HEAD 8775ae97), element-cycle-resolution AC8.1. These variables are excluded from the simulates_clearn gate and tracked here.
Relationship to existing issues (all DISTINCT)
Summary
A cluster of C-LEARN graphical-function / lookup / data-table-backed series import into the engine with a literal
0+0equation (or per-element0+0 | 0+0 | ...for arrayed vars) while the genuine-Vensim reference output (test/xmutil_test_models/Ref.vdf) carries substantial real values. The whole variable is therefore zeroed at runtime. This is the dominant residual cluster in the post-element-cycle-resolution C-LEARN numeric reconciliation (relative error= 1.0-- entire variables sit at 0 vs real Vensim values).Discovered during the C-LEARN hero-model work (branch
clearn-hero-model, HEAD8775ae97) after C-LEARN began compiling, running to FINAL TIME, and matchingRef.vdfwithin 1% on 96.3% of matched cells (following the per-element-GF mapping fix #589 / commit61573545, and a:NA:-aware + near-zero-robust comparator inensure_vdf_results). The decision was made to bank the 96.3% and track the residual rather than investigate now: these variables are excluded from thesimulates_clearngate via the documentedEXPECTED_VDF_RESIDUALexclusion constant, so the test passes on the reconciled set. This issue is the tracking item for the largest residual cluster.Affected variables (representative, not exhaustive)
All from
test/xmutil_test_models/C-LEARN v77 for Vensim.mdl. Their imported datamodel equation is literally0+0(or0+0 | 0+0 | ...per element) whileRef.vdfhas real values:historical_gdp_lookup-- e.g.[cop_developing_b]Vensim =1.487e5, Simlin =0historical_forestry_lookupglobal_emissions_from_graph_lookupref_global_emissions_from_graph_lookuprs_ch4rs_hfc125,rs_hfc134a,rs_hfc143a,rs_hfc152a,rs_hfc227ea,rs_hfc23,rs_hfc245ca,rs_hfc32other_forcings_smooth_plus_rcp85other_forcings_composite_plus_rcp85ozone_precursor_forcingsoc,_bc,_and_bio_aerosol_forcingsThese are graphical-function / lookup / data-table-backed series.
Two candidate root causes (not yet determined)
The user chose to track rather than investigate, so the root cause is open. Two candidates:
(a) MDL-import / lowering bug -- a lookup /
WITH LOOKUP/ graphical-function orGET ...-style data construct is dropped to a0+0stub on import. If so, this is a genuine importer defect that silently zeroes real series.(b) Genuine external-data dependency -- C-LEARN needs external data that is not present, in which case those series cannot match without the data and the
0+0import may be the correct degradation (no fix to the importer is warranted, only documentation of the missing-data requirement).The follow-up should determine which by inspecting one representative variable's (
historical_gdp_lookup) MDL source intest/xmutil_test_models/C-LEARN v77 for Vensim.mdland tracing how the importer (src/simlin-engine/src/mdl/) converts it to the0+0stub.Why it matters
0+0stub is indistinguishable at runtime from a legitimately-zero variable; the degradation is invisible without comparing against reference output.Components affected
src/simlin-engine/src/mdl/--convert/,reader, and the lookup / data-equation handling that emits the0+0stub.test/xmutil_test_models/C-LEARN v77 for Vensim.mdl,test/xmutil_test_models/Ref.vdfsrc/simlin-engine/tests/simulate.rs--simulates_clearn(these vars live in itsEXPECTED_VDF_RESIDUALexclusion const)Discovery context
Identified during the C-LEARN hero-model element-cycle-resolution work (branch
clearn-hero-model, HEAD8775ae97), element-cycle-resolution AC8.1. These variables are excluded from thesimulates_clearngate and tracked here.Relationship to existing issues (all DISTINCT)
61573545) and unlocked the 96.3% match; it concerns which element's table is read, not series importing as0+0.:NA:mishandled as IEEE NaN) -- the runtime:NA:sentinel fix; unrelated to lookup/data series zeroing.