CTSolvers.jl
CTSolvers.jl is the resolution layer of the control-toolbox ecosystem. It provides the strategies — NLP modelers, NLP solvers, ODE integrators — and the abstract problem types that upstream packages use to solve optimal control problems.
Who is this documentation for?
This is a reference for developers and experienced users of the ecosystem. To model and solve optimal control problems, start with OptimalControl.jl, which builds on CTSolvers and exposes its strategies through solve.
CTSolvers does not solve optimal control problems by itself. Two packages build on it:
CTDirect.jl — direct methods: discretizes continuous-time OCPs (defined in CTModels.jl) into finite-dimensional NLPs, then uses CTSolvers'
ModelersandSolversto solve them.CTFlows.jl — flows for indirect methods: builds Hamiltonian flows from ODE systems and integrates them with CTSolvers'
Integrators.
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 type (AbstractOptimizationProblem), BuiltModel, NoCache, generic build_model/build_solution |
Modelers | Modelers.ADNLP, Modelers.Exa — NLP backend selection |
DOCP | AbstractDiscretizer, DiscretizedModel — an OCP paired with its discretizer; discretize |
Solvers | Solvers.Ipopt, Solvers.MadNLP, Solvers.MadNCL, Solvers.Knitro, Solvers.Uno — NLP solvers |
Integrators | Integrators.SciML — ODE integrator, and integration results |
How this documentation is organized
Getting Started — installation, extension loading, options.
Architecture — modules, type hierarchies, data flow, and design patterns.
Using CTSolvers — for experienced users:
Strategies Catalogue — every solver, modeler and integrator, with its package and devices
Integration Results — reading results,
saveat,regrid, multi-phase mergeGPU Execution — the
GPUparameter and its requirements
Developer Guides — implementing new components:
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,DiscretizedModelPerformance & Type Stability — hot path vs setup path, JET and allocation checks
Error Messages Reference — all exception types with examples and fixes
API Reference — auto-generated documentation for all public and private symbols.