[Metadata] Computed features, reference objective, shared initial guess
メンテナーはふだん 1 日以内に返信
@ocots がすでに取り組んでいます。
2026年11月4日 から。
評価
この issue はまだ評価されていません。
説明
Agents: read the guide for agents in #310 first (order, difficulty, how to claim an issue, working method). The specification is in this description and in the comments below.
Goal
Separate what is computed about a problem from what is declared in its metadata, add the declared fields the tests, the crons and the benchmarks need, and make the metadata the single source of the initial guess shared by every modeling (#151).
Part of #310, step 5. Depends on #283 (continuous problems, Problem) and #303 (statuses). Used by #304 (comparison rule), #305 (crons), #307 (documentation pages).
Current state
metadata(:p)holds:grid_sizeand:parameters(ext/MetaData/<p>.jl, anOrderedDict); types checked at load time (METADATA_INFOS,METADATA_TYPESinsrc/OptimalControlProblems.jl).- The documentation browser already computes dimensions, cost kind (Mayer / Lagrange / Bolza), fixed or free final time and constraint counts from the
ocp(docs/browser.jl:742-767,collect_problem_data). - Initial guesses are written in each model file: in
ext/OptimalControlModels/mostly constants (xinit = [0.1, 0.1]), one function of time, and one defined on the grid (xinit = [[…] for i in 0:N]), which cannot exist for a continuous problem; JuMP models use constantstart=values.
Computed, never written by hand
A function (e.g. features(:beam)) computes, when an extension is loaded: dimensions, cost kind, fixed or free initial and final times, kinds and counts of constraints (box on state / control / variable, nonlinear path, boundary). From the ocp (OptimalControl modelings), or from the keys stored in the JuMP model for problems available in JuMP only. Move the computation out of docs/browser.jl into it; the documentation (browser, status page) and CTBenchmarks read it.
Declared fields
| Field | Content |
|---|---|
:grid_size, :parameters |
unchanged |
:status, :notes |
see #303 |
:known_failures |
see #305 |
:reference_objective |
see below |
:init |
see below |
:tags |
controlled vocabulary defined in src and checked by the tests (e.g. :hard from CTDirect#580, :analytic, :large_state) |
:references |
bibliographic sources of the problem (literature values of the objective, when known, go here as information) |
:corleone |
name of the matching problem in Corleone's OptimalControlBenchmarks, and whether the formulation is the same (#308) |
:reference_solution |
optional: analytic x(t), u(t), for convergence orders |
Every field is type-checked at load time and by the consistency tests of #304.
:reference_objective
Entries (value, source, grid_size, scheme, …), with a priority order:
- Analytic value, when it exists:
source = :analytic,grid_size = nothing, with the reference where it is derived. - Otherwise, computed by us on a fine grid:
source = :computed, with the configuration used (grid size, scheme, modeler, solver, tolerances) and the package versions. A script (e.g.scripts/reference_objective.jl) computes and writes these entries, so they are never typed by hand; it is rerun when a problem or its parameters change.
The source is always stated, in the metadata and in the documentation. For a problem available in one modeling only, a :computed reference is a regression check (it detects changes), not an independent validation: the status page (#307) shows it as such.
Tolerance: to decide later, from the first cron results (#305). Until then the crons report the relative gap to the reference without failing on it.
:init
The initial guess of every modeling comes from the metadata, no longer from each model file:
- format
(state=…, control=…, variable=…); each component a constant, a vector, or a function oft, never data on a grid; - OptimalControl and OptimalControlScalarized: passed as is (
Problem.init, #283); - JuMP: evaluated at the nodes, with the number of controls of the scheme (
N+1for trapezoid,Nfor Euler and midpoint, see #284); - overridable:
beam(JuMPBackend(); init=…), andinit=insolveon the OptimalControl side; - rewrite the grid-defined guess as a function of
t, and check the problem still converges; - the tests check that the OptimalControl guess and the JuMP start values coincide at the nodes (today
test_init).
Not now
:expected_structure (smooth, bang-bang, singular, state constraints) is dropped: it depends on the parameters, and doing it properly means a list of arcs and switching times. To revisit with indirect methods.
Done when
-
features(:p)computed from the model;docs/browser.jluses it. - Declared fields above with type checks; consistency tests cover them.
-
:reference_objectivefor every problem: analytic where it exists, otherwise computed by the script, source stated. - Initial guesses read from the metadata by every modeling; no initial guess left in the model files; the grid-defined one rewritten.
- Initial guess documented (#151), with how to override it.
- 主要言語
- Julia
- スター
- 13
- フォーク
- 1
- 平均マージ
- 3時間 20分
- マージ済み PR(30日)
- 27
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
control-toolbox/OptimalControlProblems.jl のほかの issue
-
[Metadata] Declared fields: tags, references, Corleone, reference solution対応中かも @ocots が今日担当しました。 オープン
control-toolbox/OptimalControlProblems.jl#379 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Cron] Robustness of the initial guess and known local objectives対応中かも @ocots が今日担当しました。 オープン
control-toolbox/OptimalControlProblems.jl#378 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Metadata] Shared initial guess in the metadata, read by every modeling対応中かも @ocots が今日担当しました。 オープン
control-toolbox/OptimalControlProblems.jl#377 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Metadata] Compute the features of a problem from its model対応中かも @ocots が今日担当しました。 オープン
control-toolbox/OptimalControlProblems.jl#376 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
[Metadata] Reference objectives per scheme, computed by a script対応中かも @ocots が今日担当しました。 オープン
control-toolbox/OptimalControlProblems.jl#375 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
control-toolbox/OptimalControlProblems.jl の issue をすべて見る
似ている issue
-
backport 1.14 GC
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
`binary_focal_loss` throws a `DomainError` when a negative sample has `ŷ = 1`対応中かも @parth-patel010 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
FluxML/Flux.jl#2818 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
JuliaDiff/TaylorSeries.jl#445 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
control-toolbox/CTActions#139 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
SciML/Optimization.jl#1448 ·
メンテナーはふだん 1 日以内に返信