CTSolvers.jl

The CTSolvers.jl package is part of the control-toolbox ecosystem. It provides the solution layer for optimal control problems:

  • Options — flexible configuration with provenance tracking and validation
  • Strategies — two-level contract pattern for configurable components
  • Orchestration — automatic option routing across multi-strategy pipelines
  • Optimization — abstract problem types and callable builder pattern
  • Modelers — NLP backend adapters (ADNLPModels, ExaModels)
  • DOCP — discretized optimal control problem types
  • Solvers — NLP solver integration (Ipopt, MadNLP, Knitro) via tag dispatch
CTSolvers vs CTModels

CTSolvers focuses on solving optimal control problems (discretization, NLP backends, optimization strategies). For defining these problems and representing their solutions, see CTModels.jl.

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
CTSolvers.Options.extract_options(kwargs, defs)   # ✓ Qualified
CTSolvers.Strategies.id(Solvers.Ipopt)              # ✓ Qualified

Modules

ModulePurpose
OptionsOption definition, extraction, validation, provenance tracking
StrategiesAbstract strategy contract, metadata, options, registry
OrchestrationOption routing, disambiguation, method tuple handling
OptimizationAbstract problem types, builder pattern, build/solve API
ModelersModelers.ADNLP, Modelers.Exa — NLP backend adapters
DOCPDiscretizedModel — concrete problem type
SolversSolvers.Ipopt, Solvers.MadNLP, Solvers.MadNCL, Solvers.Knitro — NLP solver wrappers

Documentation

Developer Guides

API Reference

Auto-generated documentation for all public and private symbols, organized by module.

Quick Start

using CTSolvers
using NLPModelsIpopt  # loads the Ipopt extension

# Create a solver with validated options
solver = CTSolvers.Solvers.Ipopt(max_iter = 1000, tol = 1e-8)

# Create a modeler
modeler = CTSolvers.Modelers.ADNLP(backend = :optimized)

# Solve (high-level API)
using CommonSolve
solution = solve(problem, initial_guess, modeler, solver; display = false)