CTBase.jl — Ecosystem Foundation
CTBase.jl is the foundational package of the control-toolbox ecosystem. It provides the base layer shared by all packages: common types, structured exceptions, description management, compile-time traits, trait-carrying data wrappers, extension infrastructure, and developer tools.
Qualified access
CTBase exports no symbols at the package level. Every public symbol is accessed via its full qualified path, e.g. CTBase.Exceptions.IncorrectArgument or CTBase.Descriptions.add. This makes the origin of every symbol explicit at every call site and prevents namespace collisions between packages.
Downstream packages (e.g. OptimalControl.jl) may re-export selected symbols for convenience.
DeepWiki offers an interactive, AI-generated overview of this codebase. Answers may be inaccurate — use this reference documentation as the source of truth.
Submodule overview
| Submodule | Role |
|---|---|
CTBase.Core | Fundamental numeric type alias (ctNumber) and internal display helpers |
CTBase.Exceptions | Typed exception hierarchy with rich context fields |
CTBase.Traits | Compile-time trait types for time dependence, variable dependence, mutability, and dynamics dispatch |
CTBase.Data | Trait-carrying function wrappers: VectorField, Hamiltonian, HamiltonianVectorField |
CTBase.Descriptions | Symbolic description tuples: catalogue management, pattern completion, similarity search |
CTBase.Options | Generic option handling: provenance tracking, schema definition, validation, and aliases |
CTBase.Strategies | Strategy contract, registry, building/validation, and metadata for pluggable algorithmic components |
CTBase.Orchestration | Option routing and disambiguation between problem-level actions and strategies |
CTBase.Differentiation | AD-backend strategies for gradients, derivatives, partial derivatives, and Jacobian–vector products |
CTBase.Interpolation | Linear and piecewise-constant interpolation with flat extrapolation |
CTBase.DevTools | Developer tools with tag-based dispatch for run_tests, postprocess_coverage, and automatic_reference_documentation |
CTBase.Unicode | Unicode subscript/superscript helpers for display |
CTBase.Plotting | Backend-agnostic plotting IR: series, axes, layout tree, and render contract |
User Guides
Getting Started — installation, mental model, 5-minute walkthrough.
Exceptions — exception hierarchy, choosing the right type, best practices.
Traits — compile-time trait types, the opt-in contract, and predicate functions.
Data — trait-carrying wrappers for vector fields and Hamiltonians.
Descriptions — catalogue API, pattern matching, error handling.
Options System — option schema, validation, aliases, and provenance.
Implementing a Strategy — the strategy contract and how to add one.
Strategy Parameters — declaring and resolving strategy options.
Orchestration & Routing — routing options to strategies with disambiguation.
Differentiation — AD-backend strategies and differentiation primitives (extension-backed).
Test Runner — modular test infrastructure with
CTBase.DevTools.run_tests.Coverage — post-processing coverage artifacts with
CTBase.postprocess_coverage.API Documentation — auto-generating per-module API pages.
Color System — semantic color roles, built-in themes, and runtime customization.
Interpolation — linear and piecewise-constant interpolation with flat extrapolation.
Unicode Helpers — subscript and superscript character generation for display.
Plotting Engine — backend-agnostic plotting IR, panels, combinators, and render contract.
To browse the complete API, see the API Reference section in the left sidebar.