Private API
This page lists non-exported (internal) symbols of CTDirect.
From CTDirect
Collocation [Struct]
CTDirect.Collocation — Type
struct Collocation <: CTSolvers.DOCP.AbstractDiscretizerDiscretizer for the direct collocation transcription of an optimal control problem.
Collocation turns the continuous OCP into a nonlinear program by discretizing the state and control on a time grid and enforcing the dynamics with a collocation scheme (:trapeze, :midpoint, :euler, :euler_implicit, :gauss_legendre_2, :gauss_legendre_3, ...). It is the general-purpose direct transcription and works with both the ADNLP and Exa NLP modeler backends.
Select it from OptimalControl's explicit-mode API with discretizer = CTDirect.Collocation(), or set options directly, e.g. CTDirect.Collocation(; grid_size = 100, scheme = :trapeze). Use CTDirect.DirectShooting instead for a sequential (shooting) transcription.
Fields
options::CTBase.Strategies.StrategyOptions: the resolved option set —grid_size,schemeandtime_grid; see the strategy metadata for defaults and accepted values.
See also: CTDirect.DirectShooting, CTDirect.Scheme.
DirectShooting [Struct]
CTDirect.DirectShooting — Type
struct DirectShooting <: CTSolvers.DOCP.AbstractDiscretizerDiscretizer for the direct (sequential) shooting transcription of an optimal control problem.
DirectShooting discretizes only the control on a time grid and recovers the state by integrating the dynamics, yielding a smaller nonlinear program than CTDirect.Collocation at the cost of denser derivatives and more sensitivity to the initial guess. Only the ADNLP modeler backend is supported; the Exa backend falls through to the CTSolvers NotImplemented stub.
Select it from OptimalControl's explicit-mode API with discretizer = CTDirect.DirectShooting(), or set options directly, e.g. CTDirect.DirectShooting(; grid_size = 100, control_steps = 2).
Fields
options::CTBase.Strategies.StrategyOptions: the resolved option set —grid_size,control_stepsandscheme; see the strategy metadata for defaults and accepted values.
See also: CTDirect.Collocation, CTDirect.Scheme.
__collocation_grid_size [Function]
CTDirect.__collocation_grid_size — Function
Default CTDirect.Collocation grid size (number of time steps).
__collocation_scheme [Function]
CTDirect.__collocation_scheme — Function
Default CTDirect.Collocation discretization scheme.
__collocation_time_grid [Function]
CTDirect.__collocation_time_grid — Function
Default CTDirect.Collocation explicit time grid (nothing: uniform grid).
__direct_shooting_control_steps [Function]
CTDirect.__direct_shooting_control_steps — Function
Default CTDirect.DirectShooting number of controls per time step.
__direct_shooting_grid_size [Function]
CTDirect.__direct_shooting_grid_size — Function
Default CTDirect.DirectShooting grid size (number of time steps).
__direct_shooting_scheme [Function]
CTDirect.__direct_shooting_scheme — Function
Default CTDirect.DirectShooting time integration scheme.