Improve structural lowering and MultiBody simulation parity - #328
Improve structural lowering and MultiBody simulation parity#328jgoppert wants to merge 2 commits into
Conversation
Signed-off-by: James Goppert <james.goppert@gmail.com>
Signed-off-by: James Goppert <james.goppert@gmail.com>
MSL Quality Gate SummaryGenerated by
Deltas compare numerator/denominator against the resolved MSL quality baseline. CI Gate SnapshotThese are the baseline-relative MSL stats checked by CI; IC progress is contextual unless simulation successes regress, and speed metrics are informational only.
CI gate details
Package Pass Rates
Per-package pass rates
MLS Contract Coverage
Trace Accuracy vs OMC
Speed vs OMCCompilation and simulation are reported separately for the 168 trace-agreeing models with valid timings on both tools. Aggregate speed summary
Speed breakdownWhere rumoca's time goes
Speed by system sizeTable 1 — Total (model → simulated results)Rumoca = front-end compile + Solve-IR/JIT build + integration; OMC =
Per-model speedup: min 0.08, median 5.61, max 9.67. Table 2 — Compilation (build-to-runnable)Rumoca = front-end compile + Solve-IR/JIT build; OMC =
Per-model speedup: min 0.58, median 5.87, max 9.66. Table 3 — Simulation (integration only)Rumoca =
Per-model speedup: min 0.00, median 3.28, max 121.26. Top 10 slowest modelsTop 10 slowest rumoca compilation modelsTrace-agreeing models ranked by rumoca time.
Top 10 slowest rumoca simulation modelsTrace-agreeing models ranked by rumoca time.
Additional Artifacts
|
Branch Naming
agent/prefix:msl-trace-parity-50Summary
TODO.md.Fourbar2 results
The root cause was structural rather than the number of integrated states: each RHS call rebuilt a broad algebraic dependency closure and solved a 45-variable coupled block even though the model integrates two states.
universalSpherical.f_rod,j1.a) used by OMC's old backend. Forcing the fully inlined 2x2 form was rejected because expression swell increased measured RHS time to approximately 453 ms; the cost model therefore retains the faster exact 21-variable form.j1.phi,j1.w, andder(j1.w). OMC's new backend was also checked regularly; it currently stops inNBVariable.makeDummyStatefor this model, so the old backend remains the numerical oracle.No model-name conditions, MultiBody-specific rewrites, environment-variable switches, or numerical shortcuts are introduced.
Spec / MLS Alignment
rumoca-phase-structuralowns matching, state selection, BLT, exact elimination, and tearing metadata;rumoca-phase-solveowns solve IR; eval/sim/solver crates own dependency-scoped reconstruction and runtime evaluation.Risk and Design Notes
Testing
nix develop -c cargo fmt --all --checkcargo test -p rumoca-phase-structural— 301 passedcargo test -p rumoca-sim— 45 passednix develop -c cargo clippy -p rumoca-phase-structural -p rumoca-sim --all-targets --all-features -- -D warningsnix develop -c cargo xtask verify lint— workspace lint verification passedgit diff --check origin/main...HEADcargo test --workspace,cargo doc --no-deps, the full MSL gate, ModelicaTest semantic gate, and pinnedmodelica_modelsgate. This remains a draft until those heavyweight repository/CI gates complete and parity artifacts are reviewed.Code Size Budget (required)
Public-item counts use a mechanical diff of externally visible Rust declarations; line counts use
git diff --numstat origin/main...HEAD.Reviewer Checklist
cargo test --workspaceandcargo docremain).#[allow(clippy::...)]was added outside generated code.