CTSolvers.jl
CTSolvers.jl is the resolution layer of the control-toolbox ecosystem. It provides the infrastructure — solvers, modelers, integrators, and abstract problem types — used by upstream packages to solve optimal control problems.
CTSolvers and its consumers
CTSolvers provides the resolution infrastructure; it does not call it directly. Two packages build on top of it:
CTDirect.jl — direct methods: discretizes continuous-time OCPs (defined in CTModels.jl) into finite-dimensional NLPs, then uses CTSolvers'
SolversandModelersto solve them.CTFlows.jl — flows for indirect methods: builds Hamiltonian flows from ODE systems and integrates them with CTSolvers'
Integrators.
Note
The root package is OptimalControl.jl which aims to provide tools to model and solve optimal control problems with ordinary differential equations by direct and indirect methods, both on CPU and GPU.
Qualified Module Access
CTSolvers does not export functions directly. All functions and types are accessed via qualified module paths:
using CTSolvers
CTBase.Strategies.id(CTSolvers.Solvers.Ipopt) # ✓ Qualified
CTSolvers.Optimization.build_model(prob, x0, m) # ✓ QualifiedModule overview
| Module | Responsibility |
|---|---|
Optimization | Abstract problem types (AbstractOptimizationProblem, BuiltModel, NoCache), build_model/build_solution generic functions |
Modelers | Modelers.ADNLP, Modelers.Exa — NLP backend adapters |
DOCP | DiscretizedModel — concrete problem type, pairs OCP with its discretizer (from CTDirect.jl) |
Solvers | Solvers.Ipopt, Solvers.MadNLP, Solvers.MadNCL, Solvers.Knitro, Solvers.Uno — NLP solver wrappers |
Integrators | Integrators.SciML — ODE integrator wrapper |
How this documentation is organized
Getting Started — installation and a quick-start walkthrough.
Architecture — module overview, type hierarchies, data flow, and design patterns.
Developer Guides — step-by-step tutorials for implementing each component type:
Implementing a Solver — tag dispatch, extension pattern, CommonSolve integration
Implementing an Integrator — SciML wrapper, integration result types
Implementing a Modeler — strategy options,
build_model/build_solutiondispatchImplementing an Optimization Problem —
AbstractOptimizationProblemcontract,DiscretizedModelError Messages Reference — all exception types with examples and fixes
API Reference — auto-generated documentation for all public and private symbols.