[Dev] Expose the duals of the JuMP path, boundary and box constraints, aligned with signs.md
Les mainteneurs répondent en général sous 1 jour
@ocots y travaille déjà.
Depuis le 8/11/2026.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
Context
#326 aligns the sign of the JuMP costate with OptimalControl (ct-conventions rules/signs.md, SGN1–SGN6, v0.11.0): the normalized multiplier of a constraint row is -JuMP.dual(ref), for a Min and a Max model alike. Today only the dynamics constraints are exposed — their duals are read as the costate. The duals of the other constraints the JuMP models create exist but are never read:
- path constraints:
lower <= g(x, u, v, t) <= upperrows, built at every node; - boundary constraints:
lower <= g(x0, xf, v) <= upperrows; - box bounds on the state, control and variable components (
LowerBoundRef/UpperBoundRef).
All of them are concatenated in model[:constraints] (dynamics, path, boundary); build.jl would have to keep the refs per group to expose them.
What to do (later)
- Expose the duals of the path and boundary constraints, and of the box bounds, normalized as the costate (
-JuMP.dual). - Conventions to apply (
rules/signs.mdv0.11.0):- SGN3: a two-sided row
l ≤ c ≤ ucarries one signed multipliery = μU − μL(≥ 0upper active,≤ 0lower active) — a JuMPIntervalconstraint gives one signed dual, mapped by-dual; - SGN2: for a box bound or a single-bounded row, the dual is the multiplier of that side,
≥ 0— i.e.-dual(LowerBoundRef)/-dual(UpperBoundRef)give the nonnegative per-side values; - SGN5: the same constraint declared as a path constraint or as a box must have the same dual — the comparison tests should check it;
- the scale of a time-dependent dual (density vs raw multiplier) is free in SGN5 — CTDirect divides the path multipliers by
h; choose the same here for consistency.
- SGN3: a two-sided row
- Follow the ecosystem design for reading duals by constraint label (
dual(sol, model, label)): CTModels.jl#105, CTFlows.jl#314 and discussion #312 — this issue waits for it, as #326 did for the costate.
Tests
Extend the sign tests of #326 (two layers, SGN6): the normalized duals must satisfy ∇F + Jᵀy = 0 on hand-written JuMP problems with known multipliers — active lower and upper sides of a two-sided row, bounds of variables, min f vs max -f (SGN1) — and match the OptimalControl duals of the same problem where both are exposed.
Related
#326, #170, control-toolbox/CTDirect.jl#405, control-toolbox/CTModels.jl#105.
- Langage dominant
- Julia
- Étoiles
- 13
- Forks
- 1
- Merge moyen
- 3 h 33 min
- PR mergées (30 j)
- 55
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/Doc] ModelingToolkit convergence cron, trajectories, and documentation (#308)Peut-être pris @ocots l’a pris aujourd’hui. Ouvertedocumentation feature
control-toolbox/OptimalControlProblems.jl#439 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
[Tests] Corleone solve helper and ModelingToolkit test suite (smoke, equivalence, reference solution) (#308)Peut-être pris @ocots l’a pris aujourd’hui. Ouvertefeature
control-toolbox/OptimalControlProblems.jl#438 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
[Problems] ModelingToolkitBackend, extension ModelingToolkitModels, and continuous bryson_denham (#308)Peut-être pris @ocots l’a pris aujourd’hui. Ouvertefeature
control-toolbox/OptimalControlProblems.jl#437 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
cron-convergence
Difficulté 4/5 3-5 jours Accessibilité débutants 32/100
control-toolbox/OptimalControlProblems.jl#436 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
[Cron] cron-failureOuvertecron-failure
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
control-toolbox/OptimalControlProblems.jl#435 · 5 commentaires ·
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 67/100