Documentation: sign conventions (min/max, p⁰, constraints, duals) and how they appear in a solution

Abierto
#1,015 2 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@ocots ya está trabajando en esto.

Desde el 21/10/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

documentation

Summary

Add a page to the documentation that explains the sign conventions of the ecosystem and how they show up in a solution, once they are settled in the discussion control-toolbox/OptimalControl.jl#1014. This issue is the place for that page; it should not be written before the choices are made.

Related: control-toolbox/OptimalControl.jl#968 (documentation items waiting on other packages), control-toolbox/CTDirect.jl#639, control-toolbox/CTFlows.jl#472.

What the page should explain

  • min vs max: the value of p⁰, the Hamiltonian (with and without constraints), and whether p and the duals change sign when min J becomes max −J.
  • Inequality constraints: g ≥ 0 or c ≤ 0, the sign of the multiplier on each side, two-sided constraints, equalities.
  • What dual(sol, ocp, :label) returns for each kind of constraint (path, box, boundary, variable box): sign, scaling (continuous-time density or raw NLP value), and its meaning at the first and last nodes.
  • The same constraint solved directly (solve) and by an indirect method (Flow(ocp, law; constraint=:label, multiplier=μ)): how to read the duals on both sides, and the dictionary between μ and dual.
  • Transversality and boundary constraints: the sign of β and of the dual of a boundary constraint.
  • Which of these do not depend on the NLP solver (Ipopt, MadNLP).

Elements already available

  • Probes of 2026-10-21 (closed-form problems; table in the discussion).
  • The KKT derivation per scheme and the measurements in control-toolbox/CTDirect.jl#639.
  • The existing section Formulation → Notation and conventions, to complete or to point to.
  • A runnable probe such as solution_duals.jl (see #968), extended with an indirect solve, so the page is checked by the documentation build.

Depends on

  • Decision on the conventions: control-toolbox/OptimalControl.jl#1014
  • CTDirect alignment: control-toolbox/CTDirect.jl#639
  • Duals of Flow(ocp, law): control-toolbox/CTFlows.jl#472
Lenguaje dominante
Julia
Estrellas
135
Forks
11
Merge medio
7 h 49 min
PR fusionados (30 d)
23

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de control-toolbox/OptimalControl.jl

Todos los issues de control-toolbox/OptimalControl.jl

Issues similares

Más issues de Julia

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.