Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions joss/paper.bib
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@

@misc{caillau2023juliacon,
author = {Caillau, Jean-Baptiste and Cots, Olivier and Gergaud, Joseph and Martinon, Pierre and Sed, Sophia},
title = {On solving optimal control problems with Julia},
year = {2023},
howpublished = {JuliaCon 2023, Cambridge, MA. Talk and abstract: \url{https://pretalx.com/juliacon2023/talk/HDC8F7/}. Video recording: \url{https://www.youtube.com/watch?v=RYUtVnzLj5k}}
}

@software{joss_oc_example,
author = {Caillau, Jean-Baptiste and Cots, Olivier and Gergaud, Joseph and Martinon, Pierre and Sed, Sophia},
title = {joss-oc-example: illustrative example companion to the {OptimalControl.jl} {JOSS} paper},
Expand Down
14 changes: 7 additions & 7 deletions joss/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ archive_doi: 10.5281/zenodo.13336563

[OptimalControl.jl](https://control-toolbox.org/OptimalControl.jl) [@OptimalControl_jl] is a Julia [@Bezanson2017] package for modeling and solving optimal control problems governed by ordinary differential equations (ODEs). As the core of the [control-toolbox ecosystem](https://control-toolbox.org), it provides a unified framework that supports both direct and indirect solution methods with applications spanning aerospace, medical imaging, epidemiology, and quantum control.

The package features an expressive domain-specific language (DSL) built around the `@def` macro, enabling users to define control problems using notation that closely resembles standard mathematical formulations. Problems are solved through direct transcription, converting the continuous problem into a nonlinear program (NLP) using discretization schemes including Euler, trapezoidal, midpoint, and high-order Gauss-Legendre collocation. Alternatively, indirect shooting methods based on Pontryagin's Maximum Principle can be employed. The architecture relies on a modeler-solver separation that provides a modular and extensible foundation, enabling seamless execution on both CPU and GPU with minimal user intervention.
The package features an expressive domain-specific language (DSL) built around the `@def` macro, enabling users to define control problems using notation that closely resembles standard mathematical formulations. Problems are solved through direct transcription, converting the continuous problem into a nonlinear program (NLP) using discretization schemes including Euler, trapezoidal, midpoint, and high-order Gauss-Legendre collocation. Alternatively, indirect shooting methods based on Pontryagin's Maximum Principle can be employed. The architecture relies on a modeler-solver separation that provides a modular and extensible foundation, enabling GPU execution (currently limited to NVIDIA hardware) with minimal user intervention alongside standard CPU solvers.

The ecosystem includes extensive [tutorial resources](https://control-toolbox.org/Tutorials.jl), a benchmark problem collection ([OptimalControlProblems.jl](https://control-toolbox.org/OptimalControlProblems.jl) [@OptimalControlProblems_jl] with formulations in OptimalControl DSL and [JuMP](https://jump.dev/JuMP.jl) [@Lubin2023]), and performance comparison tools ([CTBenchmarks.jl](https://control-toolbox.org/CTBenchmarks.jl)). Integration with Julia's ecosystem enables access to state-of-the-art tools: NLP solvers [IPOPT](https://coin-or.github.io/Ipopt) [@Wachter2006] and [MadNLP.jl](https://github.com/MadNLP/MadNLP.jl) [@SHIN2024110651; @SHIN2021693], automatic differentiation and NLP modeling through JuliaSmoothOptimizers' [ADNLPModels](https://jso.dev/ADNLPModels.jl) [@ADNLPModels_jl], GPU acceleration via [ExaModels.jl](https://github.com/exanauts/ExaModels.jl) [@shin2023accelerating], numerical integration from SciML's [DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs) [@rackauckas2017differentialequations], and visualization through [Plots.jl](https://docs.juliaplots.org) [@PlotsJL].

Expand All @@ -54,19 +54,19 @@ OptimalControl.jl is, to our knowledge, the only Julia package that unifies both

This unified approach addresses a gap in the current optimal control software landscape. Existing tools are fragmented across programming languages and paradigms. Legacy packages such as [HamPath](https://gitlab.inria.fr/ct/hampath) [@caillau2012differential], [NutoPy](https://ct.gitlabpages.inria.fr/nutopy) [@CAILLAU202213], and [COTCOT](https://github.com/mctao-inria/cotcot) [@bonnard2007second] implement sophisticated indirect methods but rely on Fortran implementations with MATLAB or Python interfaces, leading to complex and less extensible workflows. Proprietary solvers like [GPOPS-II](https://gpops2.com) [@Patterson2014] limit transparency and reproducibility. Open-source tools such as [BOCOP](https://github.com/control-toolbox/bocop) [@Bonnans2017], [ACADO](https://acado.github.io) [@Houska2011], and [acados](https://docs.acados.org) [@Verschueren2021] provide valuable direct method implementations but are not natively integrated into a modern, high-level scientific computing ecosystem. Python-based tools such as [Dymos](https://openmdao.github.io/dymos) [@Falck2021], [Pyomo.DAE](https://pyomo.readthedocs.io/en/stable/modeling_extensions/dae.html) [@Nicholson2018], [do-mpc](https://www.do-mpc.com) [@Fiedler2023], and [GEKKO](https://gekko.readthedocs.io) [@Beal2018] offer complementary capabilities but are similarly limited to direct transcription approaches within the Python ecosystem.

Within Julia, most existing packages target specific domains: [RobustAndOptimalControl.jl](https://juliacontrol.github.io/RobustAndOptimalControl.jl) for linear systems, [QuantumControl.jl](https://juliaquantumcontrol.github.io/QuantumControl.jl) and [Piccolo.jl](https://github.com/harmoniqs/Piccolo.jl) for quantum optimal control, [DirectTrajectoryOptimization.jl](https://github.com/thowell/DirectTrajectoryOptimization.jl) for trajectory problems, [LinearMPC.jl](https://darnstrom.github.io/LinearMPC.jl/stable/) [@arnstrom2022daqp] and [ModelPredictiveControl.jl](https://juliacontrol.github.io/ModelPredictiveControl.jl/stable/) [@Gagnon_ModelPredictiveControl_jl_advanced_process_2024] for model predictive control, and [InfiniteOpt.jl](https://infiniteopt.github.io/InfiniteOpt.jl) [@pulsipher2022unifying] for infinite-dimensional optimization. In contrast with InfiniteOpt.jl that is designed as an extension of [JuMP.jl](https://jump.dev/JuMP.jl), our plan is to provide a modeler agnostic approach, able to accept general Julia code and leverage various optimization solvers. Besides, contributing to general-purpose NLP modeling frameworks like JuMP or [CasADi](https://web.casadi.org) [@Andersson2019] would not address the specific needs of optimal control: these tools lack native support for shooting methods based on Pontryagin's Maximum Principle and that heavily rely on differential geometric primitives.
Within Julia, most existing packages target specific domains: [RobustAndOptimalControl.jl](https://juliacontrol.github.io/RobustAndOptimalControl.jl) for linear systems, [QuantumControl.jl](https://juliaquantumcontrol.github.io/QuantumControl.jl) and [Piccolo.jl](https://github.com/harmoniqs/Piccolo.jl) for quantum optimal control, [DirectTrajectoryOptimization.jl](https://github.com/thowell/DirectTrajectoryOptimization.jl) for trajectory problems, [LinearMPC.jl](https://darnstrom.github.io/LinearMPC.jl/stable/) [@arnstrom2022daqp] and [ModelPredictiveControl.jl](https://juliacontrol.github.io/ModelPredictiveControl.jl/stable/) [@Gagnon_ModelPredictiveControl_jl_advanced_process_2024] for model predictive control, and [InfiniteOpt.jl](https://infiniteopt.github.io/InfiniteOpt.jl) [@pulsipher2022unifying] for infinite-dimensional optimization. In contrast with InfiniteOpt.jl that is designed as an extension of [JuMP.jl](https://jump.dev/JuMP.jl), our package provides a modeler-agnostic approach, accepting general Julia code and leveraging various optimization solvers. Besides, contributing to general-purpose NLP modeling frameworks like JuMP or [CasADi](https://web.casadi.org) [@Andersson2019] would not address the specific needs of optimal control: these tools lack native support for shooting methods based on Pontryagin's Maximum Principle and that heavily rely on differential geometric primitives.

OptimalControl.jl fills this gap by providing a DSL that matches mathematical notation, multiple discretization schemes and shooting methods, with planned support for homotopy continuation methods. The modeler-solver separation enables complementary use with InfiniteOpt.jl (JuMP-based) through alternative NLP modeling backends (currently ADNLPModels, ExaModels) and solvers. GPU acceleration and an ecosystem with domain-specific applications, tutorials, and benchmarking tools complete the offering. Target users include researchers and engineers working in optimal control, control theorists developing new algorithms, and students learning optimal control through interactive tutorials.

# State of the Field

OptimalControl.jl requires Julia version 1.10 or later and is registered in the Julia General registry, enabling straightforward installation via `Pkg.add("OptimalControl")`. We compare it below with existing software.

- **Legacy tools (COTCOT, HamPath, NutoPy)**: These Fortran packages excel at indirect methods and homotopy continuation but require multi-language setup (Fortran plus Matlab / Python). OptimalControl.jl provides both direct and indirect methods in pure Julia with straightforward installation via package manager.
- **Legacy tools (COTCOT, HamPath, NutoPy)**: These Fortran packages excel at indirect methods and homotopy continuation but require multi-language setup (Fortran plus MATLAB / Python). OptimalControl.jl provides both direct and indirect methods in pure Julia with straightforward installation via package manager.

- **Direct method tools (BOCOP, ACADO, GPOPS-II, acados, nosnoc)**: Strong direct method implementations: [GPOPS-II](https://gpops2.com) [@Patterson2014] delivers mature methods with MATLAB and C++ implementations but is proprietary; [acados](https://docs.acados.org) [@Verschueren2021] targets real-time MPC on embedded systems; [nosnoc](https://github.com/nosnoc/nosnoc) [@Nurkanovic2022] specializes in nonsmooth optimal control; [CasADi](https://web.casadi.org) [@Andersson2019], used as symbolic backend by several of these tools, is a general NLP modeler rather than an optimal control solver. OptimalControl.jl offers an open-source alternative with expressive DSL, native Julia ecosystem integration, GPU support, and unified direct and indirect approaches.

- **Julia packages**: RobustAndOptimalControl.jl targets linear systems; QuantumControl.jl, Piccolo.jl and DirectTrajectoryOptimization.jl serve specific domains; [LinearMPC.jl](https://darnstrom.github.io/LinearMPC.jl/stable/) [@arnstrom2022daqp] and [ModelPredictiveControl.jl](https://juliacontrol.github.io/ModelPredictiveControl.jl/stable/) [@Gagnon_ModelPredictiveControl_jl_advanced_process_2024] focus on model predictive control. InfiniteOpt.jl addresses a very rich range of problems, including optimization on PDE's or with chance constraints, focusing on direct transcription methods. OptimalControl.jl works seamlessly on both CPU and GPU, and adds tools to do shooting in a unified framework plus systematic benchmarking through OptimalControlProblems.jl and CTBenchmarks.jl.
- **Julia packages**: RobustAndOptimalControl.jl targets linear systems; QuantumControl.jl, Piccolo.jl and DirectTrajectoryOptimization.jl serve specific domains; [LinearMPC.jl](https://darnstrom.github.io/LinearMPC.jl/stable/) [@arnstrom2022daqp] and [ModelPredictiveControl.jl](https://juliacontrol.github.io/ModelPredictiveControl.jl/stable/) [@Gagnon_ModelPredictiveControl_jl_advanced_process_2024] focus on model predictive control. InfiniteOpt.jl addresses a very rich range of problems, including optimization on PDE's or with chance constraints, focusing on direct transcription methods. OptimalControl.jl supports both CPU and GPU execution (currently NVIDIA-only, via ExaModels.jl + MadNLP.jl), and adds tools to do shooting in a unified framework plus systematic benchmarking through OptimalControlProblems.jl and CTBenchmarks.jl.

# Illustrative Example

Expand All @@ -92,7 +92,7 @@ The package architecture balances expressiveness, performance, and extensibility

1. **DSL vs. programmatic API**: We prioritized a mathematical DSL to reduce cognitive load for domain experts, accepting increased parsing complexity handled internally. Currently we do not address optimization of PDE or stochastic systems.

2. **GPU acceleration strategy**: The modeler-solver separation enables seamless CPU-to-GPU transition. Users simply select the appropriate modeler-solver pair: ExaModels with MadNLP and the CUDSS linear solver for GPU execution. This modular approach minimizes maintenance burden while enabling GPU performance without reimplementing transcription logic. As for now, GPU support is limited to the ExaModels + MadNLP modeler-solver combination.
2. **GPU acceleration strategy**: The modeler-solver separation enables a straightforward CPU-to-GPU transition. Users select the ExaModels modeler with MadNLP and the CUDSS linear solver for GPU execution, or simply append the `:gpu` token to the `solve` call. This modular approach minimizes maintenance burden while enabling GPU performance without reimplementing transcription logic. GPU support is currently limited to NVIDIA hardware and to the ExaModels + MadNLP modeler-solver combination.

3. **Method coverage**: Supporting both direct and indirect approaches increases code complexity but serves distinct user needs: direct methods for constrained problems with many variables, indirect methods for theoretical analysis and smaller problems requiring high accuracy. Both approaches resort to iterative solvers and may converge or not, *e.g.* depending on the initial guess. In the case of optimization solvers, the full output status of the solver is returned allowing *a posteriori* analysis.

Expand All @@ -104,13 +104,13 @@ Research by close collaborators further demonstrates the package's versatility a

The [control-toolbox organization](https://control-toolbox.org) hosts domain-specific application packages built on OptimalControl.jl: medical imaging optimization ([MagneticResonanceImaging.jl](https://control-toolbox.org/MagneticResonanceImaging.jl)), gene regulatory networks ([PWLdynamics.jl](https://agustinyabo.github.io/PWLdynamics.jl)), spacecraft orbital transfers ([Kepler.jl](https://control-toolbox.org/Kepler.jl)), epidemiological modeling ([SIRcontrol.jl](https://anasxbouali.github.io/SIRcontrol.jl)), and variational calculus ([CalculusOfVariations.jl](https://control-toolbox.org/CalculusOfVariations.jl)).

The package serves educational purposes through [Tutorials.jl](https://control-toolbox.org/Tutorials.jl) covering topics from linear-quadratic regulators to Model Predictive Control. These resources are used in academic courses and workshops. [OptimalControlProblems.jl](https://control-toolbox.org/OptimalControlProblems.jl) provides standardized test problems formulated in both OptimalControl DSL and JuMP, enabling systematic performance comparisons through [CTBenchmarks.jl](https://control-toolbox.org/CTBenchmarks.jl).
The package serves educational purposes through [Tutorials.jl](https://control-toolbox.org/Tutorials.jl) covering topics from linear-quadratic regulators to Model Predictive Control. These resources are used in academic courses and workshops; the package was notably presented at JuliaCon 2023 [@caillau2023juliacon]. [OptimalControlProblems.jl](https://control-toolbox.org/OptimalControlProblems.jl) provides standardized test problems formulated in both OptimalControl DSL and JuMP, enabling systematic performance comparisons through [CTBenchmarks.jl](https://control-toolbox.org/CTBenchmarks.jl).

Development involves international collaborations with CNES (French space agency), Thales Alenia Space, Inria, and CNRS. The package development began in September 2022, with the first public release in February 2023. As of March 2026, OptimalControl.jl has published more than 40 releases with contributions from multiple developers across the control-toolbox ecosystem packages, demonstrating sustained community engagement.

# AI Usage Disclosure

The core software implementation, algorithms, and architectural design of OptimalControl.jl were developed by the authors. Generative AI has been used to assist with code refactoring and generation of unit and integration tests. This paper was drafted by the authors and subsequently revised with AI assistance for restructuring according to JOSS format requirements and language editing. All technical content, examples, and claims reflect the authors' work and judgment.
The core software implementation, algorithms, and architectural design of OptimalControl.jl were developed by the authors. Generative AI tools—specifically Claude Sonnet (version 4.6) and Claude Opus (version 4.8) by Anthropic—have been used to assist with code refactoring and generation of unit and integration tests, always under human review. This paper was drafted by the authors and subsequently revised with AI assistance for restructuring according to JOSS format requirements and language editing. All technical content, examples, and claims reflect the authors' work and judgment.

# Acknowledgements

Expand Down
Binary file modified joss/paper.pdf
Binary file not shown.
Loading