[Dev] Align the costate and dual signs of the JuMP models with OptimalControl
Los mantenedores suelen responder en 1 día
@ocots ya está trabajando en esto.
Desde el 4/11/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Context
On the same problem and the same scheme (trapezoidal rule), the costate returned by the JuMP accessor costate(model) is the opposite of the costate of the OptimalControl solution. Example on beam, N = 100, trapezoid, Ipopt: objectives agree (8.89860 in both), but
OptimalControl costate(sol)(0.5) = [ 4.2e-6, 0.00795]
JuMP costate(model)(0.5) = [-2.3e-5, -0.00800]
The documentation works around it by plotting -p(t) for JuMP (docs/src/tutorial-solve.md, docs/problems.jl), and the comparison tests do not compare costates.
What to do (later)
- Apply the sign conventions of ct-conventions
rules/signs.md(SGN1–SGN6, v0.10.0) to the JuMP side: costate and, when they are exposed, the duals of the constraints, so that the same constraint has the same dual in both modelings (SGN5). - Follow the ecosystem work on multipliers and duals: https://github.com/orgs/control-toolbox/discussions/68#discussioncomment-19323512 (not done yet); this issue waits for it.
- Then remove the
-p(t)workaround from the docs and add costate comparisons to the comparison tests.
Related: #283 (port to OptimalControl v2, JuMP → Solution), #284 (JuMP schemes), #170.
- Lenguaje dominante
- Julia
- Estrellas
- 13
- Forks
- 1
- Merge medio
- 3 h 20 min
- PR fusionados (30 d)
- 27
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de control-toolbox/OptimalControlProblems.jl
-
[Metadata] Declared fields: tags, references, Corleone, reference solutionPosiblemente ocupada @ocots la tomó hoy. Abierto
control-toolbox/OptimalControlProblems.jl#379 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Cron] Robustness of the initial guess and known local objectivesPosiblemente ocupada @ocots la tomó hoy. Abierto
control-toolbox/OptimalControlProblems.jl#378 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Metadata] Shared initial guess in the metadata, read by every modelingPosiblemente ocupada @ocots la tomó hoy. Abierto
control-toolbox/OptimalControlProblems.jl#377 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Metadata] Compute the features of a problem from its modelPosiblemente ocupada @ocots la tomó hoy. Abierto
control-toolbox/OptimalControlProblems.jl#376 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Metadata] Reference objectives per scheme, computed by a scriptPosiblemente ocupada @ocots la tomó hoy. Abierto
control-toolbox/OptimalControlProblems.jl#375 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de control-toolbox/OptimalControlProblems.jl
Issues similares
-
backport 1.14 GC
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
JuliaDiff/TaylorSeries.jl#445 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
control-toolbox/CTActions#139 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
SciML/Optimization.jl#1448 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
SciML/PETScDiffEq.jl#362 ·
Los mantenedores suelen responder en 1 día