CTBase.jl
The CTBase.jl package is part of the control-toolbox ecosystem.
It provides the core types, utilities, and infrastructure used by other packages in the ecosystem, such as OptimalControl.jl.
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.
Features and User Guides
CTBase provides several key features to build robust control-toolbox packages:
- Descriptions: encoding algorithms: A declarative way to encode algorithms or configurations using tuples of symbols.
- Error handling and Exceptions: A domain-specific exception hierarchy for consistent error reporting.
- Test Runner: A modular test runner for granular test execution.
- Coverage Post-processing: Tools to generate readable coverage reports.
- API Documentation Generation: Automated API reference generation from docstrings.
Note on Private Methods
In some examples in the documentation, private methods are shown without the module prefix. This is done for the sake of clarity and readability.
julia> using CTBase
julia> x = 1
julia> private_fun(x) # throws an errorThis should instead be written as:
julia> using CTBase
julia> x = 1
julia> CTBase.private_fun(x)If the method is re-exported by another package,
module OptimalControl
import CTBase: private_fun
export private_fun
endthen there is no need to prefix it with the original module name:
julia> using OptimalControl
julia> x = 1
julia> private_fun(x)