Skip to content

feat(references): the references by modeling, each from its own solves (#435) - #474

Merged
ocots merged 1 commit into
mainfrom
feat/references-by-backend
Nov 20, 2026
Merged

ocots merged 1 commit into
mainfrom
feat/references-by-backend

Conversation

@ocots

@ocots ocots commented Nov 20, 2026

Copy link
Copy Markdown
Member

Refs #435, #449 (T5). Based on #473 (itself on #472): to merge after them. Conventions: ct-conventions v0.14.0, ct-agents v0.5.0.

Summary

The modelings are independent but for the definition of the problems (#435). A reference objective was shared by every modeling, computed from all their solves: a modeling that drifted moved the reference of the others, and a modeling with its own grid (ModelingToolkit, #473) had none. Now each modeling has its references.

  • ext/MetaData/references/<problem>.toml: one table per modeling and scheme, [JuMP.trapeze], [ModelingToolkit.shooting_single], at the default grid of the problem in the modeling (grid_size_data(problem, backend)), from the solves of that modeling only.
  • Breaking: reference_objective, solution_kind, references, best_reference take the backend: reference_objective(:beam, OptimalControlBackend()). Defaults: the grid of the modeling, its discretization (:trapeze, :shooting_single for ModelingToolkit). CHANGELOG and BREAKING updated, guides updated.
  • tools/references: grouped by modeling, then scheme; a table not recomputed (another modeling or scheme) is kept.
  • Tests: the gap of a solve is to the reference of its modeling; ModelingToolkit's to its own reference, else to the analytic solution. The consistency tests report each modeling :valid without a reference; the comparison rule asks for a reference in one modeling at least.
  • Problem pages: each modeling against its own reference; how close the modelings are is computed when the page is built ("Other modelings on this discretization", the side by side table), never stored. Status page: the reference of each modeling in its cell.
  • The references regenerated from the latest crons (JuMP 44015064560, OptimalControl 44235205662, scalarized 44455617205, robustness 42387115100): every former value is exactly the one of a modeling, the others within 1.5e-6 (below SAME_SOLUTION = 1e-5). The ModelingToolkit references come with the next cron, on its new grid.

Test plan

  • core: 2326 passed (the reference tool tested on real modelings, each with its grid; the API by modeling over the collection).
  • docs/preview.sh build: built; beam page checked.
  • CI.

🤖 Generated with Claude Code

#435, T5 of #449)

One table per modeling and scheme, [<modeling>.<scheme>], at the default grid of the problem
in the modeling; reference_objective, solution_kind, references and best_reference take the
backend (breaking). update.jl groups the solves by modeling; the problem pages show each
modeling against its own reference and compute how close the modelings are. References
regenerated from the crons 44015064560, 44235205662, 44455617205 and 42387115100: every
former value is the one of a modeling, the others within 1.5e-6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ocots ocots added the run ci github-runner Trigger the CI workflow on GitHub-hosted runners label Nov 20, 2026
Base automatically changed from feat/grid-by-backend to main November 20, 2026 17:30
@ocots
ocots merged commit a307caf into main Nov 20, 2026
17 of 18 checks passed
@ocots
ocots deleted the feat/references-by-backend branch November 20, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run ci github-runner Trigger the CI workflow on GitHub-hosted runners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant