# Relationship between OptimalControl.jl and ControlSystems.jl

**URL:** <https://discourse.julialang.org/t/relationship-between-optimalcontrol-jl-and-controlsystems-jl/116959>\
**Category:** Modelling & Simulations\
**Tags:** question, control\
**Created:** [July 12, 2024, 9:53am UTC](https://discourse.julialang.org/t/relationship-between-optimalcontrol-jl-and-controlsystems-jl/116959 "2024-07-12T09:53:23Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![jbcaillau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jbcaillau/32/206767_2.png) [@jbcaillau](https://discourse.julialang.org/u/jbcaillau)\
**Post date:** [September 30, 2025, 12:20pm UTC](https://discourse.julialang.org/t/relationship-between-optimalcontrol-jl-and-controlsystems-jl/116959/6 "2025-09-30T12:20:38Z")

</div>

Dear @ufechner7, dear all, seizing the opportunity of OptimalControl.jl latest release to provide some more details:

> [@\[ANN\] New release of OptimalControl.jl](https://discourse.julialang.org/t/ann-new-release-of-optimalcontrol-jl/132764):
>
> It is a pleasure to announce the new release of [OptimalControl.jl](https://control-toolbox.org/OptimalControl.jl) (v1.1). Intended to solve optimal control problems on ODEs, the package features: a [friendly DSL](https://control-toolbox.org/OptimalControl.jl/stable/manual-abstract.html) both [direct](https://control-toolbox.org/OptimalControl.jl/stable/manual-solve.html) (optimisation) and [indirect](https://control-toolbox.org/OptimalControl.jl/stable/example-double-integrator-time.html#Indirect-method) (aka. shooting) methods [solving on GPU](https://control-toolbox.org/OptimalControl.jl/stable/manual-solve-gpu.html) a bunch of examples: [tutorials](https://control-toolbox.org/Tutorials.jl), [applications](https://control-toolbox.org/MagneticResonanceImaging.jl/stable/saturation.html) and [collection of problems](https://control-toolbox.org/OptimalControlProblems.jl) Give it a try, and if ever the syntax below does not look familiar enough slightly_smiling_face… ocp = @def begin t ∈ [0, 1], time x ∈ R², state u ∈ R, control x(0)…

As pointed by @baggepinnen the package is indeed devoted to trajectory (= solution to ODEs) optimisation, either by direct methods (transcription into nonlinear programs) or indirect methods (multiple shooting on Hamiltonian flows). There are already very nice tools, in particular for direct solving, in other languages (such as Casadi, GPOPS…) or in Julia ([InfiniteOpt.jl](https://infiniteopt.github.io/InfiniteOpt.jl)…) We try to propose a user friendly unified approach for both direct and indirect approaches, including the differential geometric tools needed to do so (check, _e.g._, [Goddard tuto](https://control-toolbox.org/Tutorials.jl/stable/tutorial-goddard.html)). We build upon cutting edge modeller-solver pairs such as ADNLPModels.jl / ExaModels.jl with Ipopt / MadNLP.jl (the latter now allowing to solve control problems on GPU) for the direct part, on OrdinaryDiffEq.jl and AD tools (ForwardDiff.jl + DI) for the indirect one (+ ongoing discussions with @rveltz to leverage [BifurcationKit.jl](https://github.com/bifurcationkit/BifurcationKit.jl) for continuation). The DSL leverages the very nice package [MLStyle.jl](https://thautwarm.github.io/MLStyle.jl) by @thautwarm.

Optimal control of ODEs is all about dynamical systems, optimisation… and use cases: there are several tutorials and applications in the package [documentation](https://control-toolbox.org/OptimalControl.jl), and we welcome issues and PRs 🙂. More to come, with ongoing benchmarks on [OptimalControlProblems.jl](https://control-toolbox.org/OptimalControlProblems.jl).

---

_[View the full topic](https://discourse.julialang.org/t/relationship-between-optimalcontrol-jl-and-controlsystems-jl/116959)._
