DOCP
Index
CTDirect.DOCP
CTDirect.DOCPFlags
CTDirect.DOCPbounds
CTDirect.DOCPdims
CTDirect.DOCPtime
CTDirect.DOCP_constraints!
CTDirect.DOCP_initial_guess
CTDirect.DOCP_objective
CTDirect.build_bounds
CTDirect.constraints_bounds!
CTDirect.get_time_grid
CTDirect.is_solvable
CTDirect.model
CTDirect.setPointConstraints!
CTDirect.variables_bounds!
Documentation
CTDirect.DOCP
— TypeStruct 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
CTDirect.DOCPFlags
— TypeInternal 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
CTDirect.DOCPbounds
— TypeInternal 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
CTDirect.DOCPdims
— TypeInternal 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
CTDirect.DOCPtime
— TypeInternal 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]
CTDirect.DOCP_constraints!
— MethodDOCP_constraints!(c, xu, docp::CTDirect.DOCP) -> Any
Compute the constraints C for the DOCP problem (modeled as LB <= C(X) <= UB).
CTDirect.DOCP_initial_guess
— FunctionDOCP_initial_guess(docp::CTDirect.DOCP) -> Vector{Float64}
DOCP_initial_guess(
docp::CTDirect.DOCP,
init::CTModels.Init
) -> Vector{Float64}
Build initial guess for discretized problem
CTDirect.DOCP_objective
— MethodDOCP_objective(xu, docp::CTDirect.DOCP) -> Any
Compute the objective for the DOCP problem.
CTDirect.build_bounds
— Methodbuild_bounds(
dim_var,
dim_box,
box_triplet
) -> Tuple{Any, Any}
Build full, ordered sets of bounds for state, control or optimization variables
CTDirect.constraints_bounds!
— Methodconstraints_bounds!(
docp::CTDirect.DOCP
) -> Tuple{Vector{Float64}, Vector{Float64}}
Build upper and lower bounds vectors for the DOCP nonlinear constraints.
CTDirect.get_time_grid
— Methodget_time_grid(xu, docp::CTDirect.DOCP) -> Any
Return time grid for variable time problems (times are then dependent on NLP variables)
CTDirect.is_solvable
— Methodis_solvable(ocp) -> Bool
Check if an OCP is solvable by the method solve
.
CTDirect.model
— Methodmodel(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.
CTDirect.setPointConstraints!
— MethodsetPointConstraints!(docp::CTDirect.DOCP, c, xu, v) -> Any
Set the boundary and variable constraints
CTDirect.variables_bounds!
— Methodvariables_bounds!(
docp::CTDirect.DOCP
) -> Tuple{Vector{Float64}, Vector{Float64}}
Build upper and lower bounds vectors for the DOCP variable box constraints.