Skip to content

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' Modelers and Solvers to 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:

julia
using CTSolvers
CTBase.Strategies.id(CTSolvers.Solvers.Ipopt)   # ✓ Qualified
CTSolvers.Optimization.build_model(prob, x0, m)  # ✓ Qualified

Module overview ​

ModuleResponsibility
OptimizationAbstract problem type (AbstractOptimizationProblem), BuiltModel, NoCache, generic build_model/build_solution
ModelersModelers.ADNLP, Modelers.Exa — NLP backend selection
DOCPAbstractDiscretizer, DiscretizedModel — an OCP paired with its discretizer; discretize
SolversSolvers.Ipopt, Solvers.MadNLP, Solvers.MadNCL, Solvers.Knitro, Solvers.Uno — NLP solvers
IntegratorsIntegrators.SciML — ODE integrator, and integration results

How this documentation is organized ​

Ask DeepWiki

Ask DeepWiki offers an interactive, AI-generated overview of this codebase. Answers may be inaccurate — use this reference documentation as the source of truth.