Skip to content

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.jldirect methods: discretizes continuous-time OCPs (defined in CTModels.jl) into finite-dimensional NLPs, then uses CTSolvers' Solvers and Modelers to solve them.

  • CTFlows.jlflows 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:

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

Module overview

ModuleResponsibility
OptimizationAbstract problem types (AbstractOptimizationProblem, BuiltModel, NoCache), build_model/build_solution generic functions
ModelersModelers.ADNLP, Modelers.Exa — NLP backend adapters
DOCPDiscretizedModel — concrete problem type, pairs OCP with its discretizer (from CTDirect.jl)
SolversSolvers.Ipopt, Solvers.MadNLP, Solvers.MadNCL, Solvers.Knitro, Solvers.Uno — NLP solver wrappers
IntegratorsIntegrators.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:

  • API Reference — auto-generated documentation for all public and private symbols.

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.