Common

Index

Documentation

CTDirect.DOCP_Hessian_patternMethod
DOCP_Hessian_pattern(
    docp::CTDirect.DOCP{D<:CTDirect.Discretization}
) -> SparseArrays.SparseMatrixCSC{Bool, Int64}

Build sparsity pattern for Hessian of Lagrangian

source
CTDirect.DOCP_Jacobian_patternMethod
DOCP_Jacobian_pattern(
    docp::CTDirect.DOCP{D<:CTDirect.Discretization}
) -> SparseArrays.SparseMatrixCSC{Bool, Int64}

Build sparsity pattern for Jacobian of constraints

source
CTDirect.add_nonzero_block!Method
add_nonzero_block!(M, i_start, i_end, j_start, j_end; sym)

Add block of nonzeros elements to a sparsity pattern Format: boolean matrix (M) or index vectors (Is, Js) Includes a more compact method for single element case Option to add the symmetric block also (eg for Hessian) Note: independent from discretization scheme

source
CTDirect.get_OCP_control_at_time_stepMethod
get_OCP_control_at_time_step(
    xu,
    docp::CTDirect.DOCP,
    i
) -> Any

Retrieve control variables at given time step from the NLP variables. Convention: 1 <= i <= dimNLPsteps(+1), with convention u(tf) = U_N Vector output

source
CTDirect.get_OCP_state_at_time_stepMethod
get_OCP_state_at_time_step(
    xu,
    docp::CTDirect.DOCP,
    i
) -> Any

Retrieve state variables at given time step from the NLP variables. Convention: 1 <= i <= dimNLPsteps+1 Vector output

source
CTDirect.get_OCP_variableMethod
get_OCP_variable(xu, docp::CTDirect.DOCP) -> Any

Retrieve optimization variables from the NLP variables. Convention: stored at the end, hence not dependent on the discretization method Vector output

source
CTDirect.get_lagrange_state_at_time_stepMethod
get_lagrange_state_at_time_step(
    xu,
    docp::CTDirect.DOCP,
    i
) -> Any

Retrieve state variable for lagrange cost at given time step from the NLP variables. Convention: 1 <= i <= dimNLPsteps+1 (no check for actual lagrange cost presence !)

source
CTDirect.get_stagevars_at_time_stepMethod
get_stagevars_at_time_step(
    xu,
    docp::CTDirect.DOCP,
    i,
    j
) -> Any

Retrieve stage variables at given time step/stage from the NLP variables. Convention: 1 <= i <= dimNLPsteps(+1), 1 <= j <= s Vector output Note that passing correct indices is up to the caller, no checks are made here.

source
CTDirect.setWorkArrayMethod
setWorkArray(docp::CTDirect.DOCP, xu, time_grid, v) -> Any

Set work array for all dynamics and lagrange cost evaluations

source
CTDirect.set_control_at_time_step!Method
set_control_at_time_step!(
    xu,
    u_init,
    docp::CTDirect.DOCP,
    i
) -> Any

Set initial guess for control variables at given time step Convention: 1 <= i <= dimNLPsteps(+1)

source
CTDirect.set_state_at_time_step!Method
set_state_at_time_step!(
    xu,
    x_init,
    docp::CTDirect.DOCP,
    i
) -> Any

Set initial guess for state variables at given time step Convention: 1 <= i <= dimNLPsteps+1

source