DOCP

Index

Documentation

CTDirect.DOCPType

Struct for discretized optimal control problem DOCP

Contains:

  • a copy of the original OCP
  • the discretized DOCP as a NLP problem
  • data required to link the OCP with the discretized DOCP
source
CTDirect.DOCPFlagsType

Internal struct for DOCP boolean flags

  • freet0: OCP has free initial time
  • freetf: OCP has free final time
  • lagrange: OCP has a lagrange cost
  • mayer: OCP has a mayer cost
  • lagrangetomayer: convert lagrange cost to mayer form
  • max: OCP is a maximization problem
source
CTDirect.DOCPboundsType

Internal struct for DOCP bounds

  • var_l: lower bounds for the NLP variables
  • var_u: upper bounds for the NLP variables
  • con_l: lower bounds for the NLP constraints
  • con_u: upper bounds for the NLP constraints
source
CTDirect.DOCPdimsType

Internal struct for DOCP dimensions

  • NLP_x: state dimension including additional component for reformulated lagrange cost
  • NLP_u: control dimension
  • NLP_v: variable dimension
  • OCP_x: state dimension for the original OCP
  • path_cons: path constraints dimension
  • boundary_cons: boundary constraints dimension
source
CTDirect.DOCPtimeType

Internal struct for DOCP time grid

  • steps: number of time steps
  • normalized_grid: time grid rescaled to [0,1]
  • fixed_grid: fixed time grid [t0,tf]
source
CTDirect.DOCP_constraints!Method
DOCP_constraints!(c, xu, docp::CTDirect.DOCP) -> Any

Compute the constraints C for the DOCP problem (modeled as LB <= C(X) <= UB).

source
CTDirect.DOCP_initial_guessFunction
DOCP_initial_guess(docp::CTDirect.DOCP) -> Vector{Float64}
DOCP_initial_guess(
    docp::CTDirect.DOCP,
    init::CTModels.Init
) -> Vector{Float64}

Build initial guess for discretized problem

source
CTDirect.build_boundsMethod
build_bounds(
    dim_var,
    dim_box,
    box_triplet
) -> Tuple{Any, Any}

Build full, ordered sets of bounds for state, control or optimization variables

source
CTDirect.constraints_bounds!Method
constraints_bounds!(
    docp::CTDirect.DOCP
) -> Tuple{Vector{Float64}, Vector{Float64}}

Build upper and lower bounds vectors for the DOCP nonlinear constraints.

source
CTDirect.get_time_gridMethod
get_time_grid(xu, docp::CTDirect.DOCP) -> Any

Return time grid for variable time problems (times are then dependent on NLP variables)

source
CTDirect.modelMethod
model(docp::CTDirect.DOCP) -> Any

Extracts the NLP model from a DOCP object.

Arguments

  • docp::DOCP: The DOCP object containing the NLP model.

Returns

The NLP model stored in the DOCP object.

source
CTDirect.variables_bounds!Method
variables_bounds!(
    docp::CTDirect.DOCP
) -> Tuple{Vector{Float64}, Vector{Float64}}

Build upper and lower bounds vectors for the DOCP variable box constraints.

source