[Dev] One source of truth per problem, and the equality of the modelings checked by computation
Les mainteneurs répondent en général sous 1 jour
@ocots y travaille déjà.
Depuis le 6/11/2026.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
Written by Claude (Claude Code) at the request of ocots, from a design discussion with ocots.
Goal
Each problem should have one source of truth for what is shared between modelings, and an automatic check for what is written more than once. Today a problem is written once per modeling (OptimalControl @def, its scalarized variant, JuMP), plus its metadata. Nothing checks that the dynamics, costs and constraints of two modelings are the same function. #371 compares NLPs, which happens after discretization and mixes the formulation with the transcription.
What we know
- Declarative data (parameters, bounds, initial guess, reference values, names) can be shared directly: #377 (shared initial guess), #379 (declared fields), #376 (features computed from the model).
ProblemData(ext/JuMPModels/schemes/data.jl, #368, #369) already describes a problem by continuous functions(x, u, v, t), with no discretization in it. These functions are generic Julia code. They can be called with numbers, JuMP variables or symbolic variables, so the same data could feed a ModelingToolkit modeling (#308).- The
@defmodels stay hand-written. They are the showcase of OptimalControl, and two independent writings make a better oracle than one generated from the other. - Exa is the only reason OptimalControl needs
@def. The Exa model is generated from the syntax by CTParser (build_examodel). A model built from functions with the functional API of CTModels has no Exa builder. control-toolbox/CTDirect.jl#673 removes this limit: the components get a traceable form, and one transcription in CTDirect serves every modeler.
Proposal (to be discussed)
- Shared declarative data: one source per problem, read by every modeling (#377, #379).
- Equality of the functions, by computation: for every problem available in both OptimalControl and JuMP, evaluate the dynamics, the Lagrange and Mayer costs, and the path and boundary constraints of the
@defmodel and ofProblemDataat random points, and require equality. This checks the formulation before any discretization, without a hand-written list. Differences that are wanted (scaling withstate_expressions, component names) must be recognised by computation and reported. - ModelingToolkit (optional): build the MTK modeling from
ProblemDatainstead of writing it by hand (#308). - Target, after control-toolbox/CTDirect.jl#673: a
ProblemDatacould become a CTModelsModelwith its traceable form, hence solvable with Exa without@def. Its transcription by CTDirect would then be compared with the hand-written JuMP transcription (schemes/build.jl), which stays an independent oracle.
Related
#257, #284, #308, #371, #376, #377, #379; control-toolbox/CTDirect.jl#673 and control-toolbox/CTDirect.jl#674.
How to work on this theme
This is a theme issue: it describes the work to do and what is known so far, it is not meant to be closed by a single PR.
- Whoever takes it first defines the work precisely and splits it into sub-issues (they can live in any repository of the organization).
- Work proceeds through the sub-issues; tick the checklist below as they are closed.
- Close the theme when everything is done or explicitly dropped.
Sub-issues
- to be created when the theme is taken
- Langage dominant
- Julia
- Étoiles
- 13
- Forks
- 1
- Merge moyen
- 3 h 9 min
- PR mergées (30 j)
- 47
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de control-toolbox/OptimalControlProblems.jl
-
[Cron] cron-convergenceOuvertecron-convergence
Difficulté 4/5 3-5 jours Accessibilité débutants 28/100
control-toolbox/OptimalControlProblems.jl#418 ·
Les mainteneurs répondent en général sous 1 jour
-
[Dev] Split src into submodules (ct-conventions MOD1, MOD2), keeping the public exportsPeut-être pris @ocots l’a pris il y a 1 jour. Ouvertedev
control-toolbox/OptimalControlProblems.jl#413 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
[Metadata] Reference solutions with how they were obtained: typed references and APIPeut-être pris @ocots l’a pris il y a 1 jour. Ouvertefeature
control-toolbox/OptimalControlProblems.jl#409 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
[Tests] Remove the MadNLP barrier bypass once CTSolvers ≥ 0.7.1 is usedPeut-être pris @ocots l’a pris il y a 1 jour. Ouverte
control-toolbox/OptimalControlProblems.jl#398 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Restore the full CI matrix (Julia 1.10, macOS, Windows) after the reorganisationPeut-être pris @ocots l’a pris il y a 3 jours. Ouverte
control-toolbox/OptimalControlProblems.jl#344 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de control-toolbox/OptimalControlProblems.jl
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
Les mainteneurs répondent en général sous 1 jour
-
lux
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
JuliaGraphs/GraphNeuralNetworks.jl#732 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
erfinv(::Float16) and erfcinv(::Float16) are wrong for abs(x) <= 0.75 (erfinv(Float16(0)) == 0.2201)Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
JuliaMath/SpecialFunctions.jl#571 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100