Private API

This page lists non-exported (internal) symbols of CTDirect.


From CTDirect

Collocation [Struct]

CTDirect.CollocationType
struct Collocation <: CTSolvers.DOCP.AbstractDiscretizer

Discretizer 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, scheme and time_grid; see the strategy metadata for defaults and accepted values.

See also: CTDirect.DirectShooting, CTDirect.Scheme.

DirectShooting [Struct]

CTDirect.DirectShootingType
struct DirectShooting <: CTSolvers.DOCP.AbstractDiscretizer

Discretizer 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_steps and scheme; see the strategy metadata for defaults and accepted values.

See also: CTDirect.Collocation, CTDirect.Scheme.

__collocation_grid_size [Function]

__collocation_scheme [Function]

__collocation_time_grid [Function]

__direct_shooting_control_steps [Function]

__direct_shooting_grid_size [Function]

__direct_shooting_scheme [Function]