[Metadata] Reference solutions with how they were obtained: typed references and API
Maintainer thường phản hồi trong vòng 1 ngày
@ocots đang làm issue này rồi.
Từ ngày 7/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Agents: read the guide for agents in #310 first (order, difficulty, how to claim an issue, working method).
Goal
A reference solution says how it was obtained, so that it can be reproduced and used as a benchmark: modeling, modeler, solver and its options (tolerances…), grid, scheme, exit status, iterations, time, constraint violation, platform, package versions, run and commit. The same for every known local solution (#378). An analytic solution of the continuous problem (#379) is a different kind of reference. The package exposes both through one abstract type, concrete types and an API, rebuilt from generated files.
Decisions (maintainer, 2026-11-07, after the triage of #367)
- Never written by hand. Every field is written by the tests and by
tools/references/update.jl; the more information the better, as long as it is generated. - No trajectories for the numerical references: too large. The objective and the configuration are enough to reproduce a solve. The trajectories and the plots belong to the results pipeline (#314).
- An
acceptablesolve (Ipoptacceptable, JuMPALMOST_LOCALLY_SOLVED, MadNLPSOLVED_TO_ACCEPTABLE_LEVEL) may be a known solution: it is a reference, with its exit status recorded. Example:moonlander0.961844 (#367). - Analytic references are separate: a continuous solution, with
stateandcontrolfunctions, the objective and a source.
Design
1. What the tests record
TestStatus.result! (test/common/status.jl) records, besides what it has today (test/<report>-results.tsv):
modeler(empty for JuMP),solver;options: the effective solver options of the solve (defaults ofTestConfigsmerged with the robustness options), as an inline TOML table in one TSV cell, so that it is read back without a hand-written parser;violation: the primal constraint violation of the solution (OptimalControl:CTModels.constraints_violation; JuMP: fromJuMP.primal_feasibility_report).
Each test run also writes test/reports/<report>-environment.toml, once: Julia version, OS and architecture, commit, and the versions of the direct dependencies of the test environment and of the solver binaries (Ipopt_jll). The full Manifest.toml of a run is #314's (env/<run id>/ on the results branch); a reference keeps the run id to find it.
tools/cron/report.py reads the TSV by column name: added columns change nothing there.
2. What update.jl writes
ext/MetaData/references/<problem>.toml keeps every field it has today (the docs of #408 read them) and adds, for each solution of [[<scheme>.solutions]], a table reference: the solve chosen to represent it, with every field of section 1, its platform, run and commit.
The representative of a solution: a strict convergence before an acceptable one, then the smallest violation, then the smallest objective. The objective of the solution is that of its representative, so that value is the objective of a solve that can be redone.
3. Types and API
abstract type AbstractReference end # contract: objective(ref) (TYP4)
struct AnalyticReference <: AbstractReference # continuous problem (#379)
problem; parameters; objective; state; control; source
end
struct NumericalReference <: AbstractReference # one discretized solve
problem; objective; grid_size; scheme
modeling; modeler; solver; options # options::NamedTuple
status; iterations; time; violation
platform; run; commit; versions # versions::NamedTuple
solves; configurations # the solves that reached it
end
Qualified API (no exports, MOD8):
OptimalControlProblems.references(problem; grid_size, scheme): the known solutions, best first (empty when none);OptimalControlProblems.best_reference(problem; grid_size, scheme): the first one, ornothing;OptimalControlProblems.analytic_reference(problem, parameters=nothing): ornothing;OptimalControlProblems.objective(ref).
reference_objective, solution_kind and reference_solution_data stay, written on top of them. Two concrete types because their data differ (TYP7).
Order: two pull requests
A cron dispatched on a branch publishes to results and updates the cron issues (#348, #350, #351 came from such a run), so the new references are computed from runs on main:
- Record (section 1): tests and TSV, environment file,
test/README.md. Merged, then the four crons are dispatched onmain(CronOptimalControl,CronJuMP,CronOptimalControlScalarized,CronRobustness). - Store and expose (sections 2 and 3):
update.jl, the loader, the types and the API, the references regenerated from those runs,tools/references/README.md.
Relations
- #314: the results of the last runs (
result.json, plots,env/<run id>/) live onresults; the references live onmain, generated. A problem page shows both: the latest results with their freshness, the references with how they were obtained. - #408 (documentation rewrite) reads the TOML files: only fields are added, none renamed or removed.
- #306: the reference objective and the local solutions of its notes.
Done when
- PR 1: each row of
*-results.tsvhasmodeler,solver,options,violation; each run writes*-environment.toml; shown on a local run of one problem per modeling. - The crons dispatched on
mainafter PR 1, their run ids recorded here. - PR 2: every reference file regenerated from those runs; each solution has its
referencetable; the files are not edited by hand (the consistency test compares them with a regeneration, or checks the generated header and the schema). -
AbstractReference,AnalyticReference,NumericalReferenceand the API, tested (including a failing case shown in the PR);reference_objective,solution_kind,reference_solution_dataunchanged for their callers. - READMEs updated:
test/README.md,tools/references/README.md.
- Ngôn ngữ chính
- Julia
- Star
- 13
- Fork
- 1
- Merge trung bình
- 3 giờ 9 phút
- Pull request đã merge (30 ngày)
- 47
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của control-toolbox/OptimalControlProblems.jl
-
[Cron] cron-convergenceĐang mởcron-convergence
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
control-toolbox/OptimalControlProblems.jl#418 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Dev] Split src into submodules (ct-conventions MOD1, MOD2), keeping the public exportsCó thể đã có người làm @ocots đã nhận hôm nay. Đang mởdev
control-toolbox/OptimalControlProblems.jl#413 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Tests] Remove the MadNLP barrier bypass once CTSolvers ≥ 0.7.1 is usedCó thể đã có người làm @ocots đã nhận hôm nay. Đang mở
control-toolbox/OptimalControlProblems.jl#398 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Dev] One source of truth per problem, and the equality of the modelings checked by computationCó thể đã có người làm @ocots đã nhận 1 ngày trước. Đang mở
control-toolbox/OptimalControlProblems.jl#391 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Restore the full CI matrix (Julia 1.10, macOS, Windows) after the reorganisationCó thể đã có người làm @ocots đã nhận 2 ngày trước. Đang mở
control-toolbox/OptimalControlProblems.jl#344 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của control-toolbox/OptimalControlProblems.jl
Issue tương tự
-
lux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
JuliaGraphs/GraphNeuralNetworks.jl#732 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
erfinv(::Float16) and erfcinv(::Float16) are wrong for abs(x) <= 0.75 (erfinv(Float16(0)) == 0.2201)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
JuliaMath/SpecialFunctions.jl#571 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100