Private API
This page lists non-exported (internal) symbols of CTDirect.
From CTDirect
DOCP_Hessian_pattern
CTDirect.DOCP_Hessian_pattern — Function
DOCP_Hessian_pattern(
docp::CTDirect.DOCP{D<:CTDirect.Discretization}
) -> SparseArrays.SparseMatrixCSC{Bool, Int64}
Build sparsity pattern for Hessian of Lagrangian (to be implemented for each discretization scheme)
DOCP_Hessian_pattern(
docp::CTDirect.DOCP{CTDirect.Euler}
) -> SparseArrays.SparseMatrixCSC{Bool, Int64}
Build sparsity pattern for Hessian of Lagrangian
DOCP_Hessian_pattern(
docp::CTDirect.DOCP{<:CTDirect.GenericIRK}
) -> SparseArrays.SparseMatrixCSC{Bool, Int64}
Build sparsity pattern for Hessian of Lagrangian
DOCP_Hessian_pattern(
docp::CTDirect.DOCP{CTDirect.Midpoint}
) -> SparseArrays.SparseMatrixCSC{Bool, Int64}
Build sparsity pattern for Hessian of Lagrangian
DOCP_Hessian_pattern(
docp::CTDirect.DOCP{CTDirect.Trapeze}
) -> SparseArrays.SparseMatrixCSC{Bool, Int64}
Build sparsity pattern for Hessian of Lagrangian
DOCP_Jacobian_pattern
CTDirect.DOCP_Jacobian_pattern — Function
DOCP_Jacobian_pattern(
docp::CTDirect.DOCP{D<:CTDirect.Discretization}
) -> SparseArrays.SparseMatrixCSC{Bool, Int64}
Build sparsity pattern for Jacobian of constraints (to be implemented for each discretization scheme)
DOCP_Jacobian_pattern(
docp::CTDirect.DOCP{CTDirect.Euler}
) -> SparseArrays.SparseMatrixCSC{Bool, Int64}
Build sparsity pattern for Jacobian of constraints
DOCP_Jacobian_pattern(
docp::CTDirect.DOCP{<:CTDirect.GenericIRK}
) -> SparseArrays.SparseMatrixCSC{Bool, Int64}
Build sparsity pattern for Jacobian of constraints
DOCP_Jacobian_pattern(
docp::CTDirect.DOCP{CTDirect.Midpoint}
) -> SparseArrays.SparseMatrixCSC{Bool, Int64}
Build sparsity pattern for Jacobian of constraints
DOCP_Jacobian_pattern(
docp::CTDirect.DOCP{CTDirect.Trapeze}
) -> SparseArrays.SparseMatrixCSC{Bool, Int64}
Build sparsity pattern for Jacobian of constraints
Gauss_Legendre_1
CTDirect.Gauss_Legendre_1 — Type
Implicit Midpoint discretization, formulated as a generic IRK (ie Gauss Legendre 1) For testing purpose only, use :midpoint instead (cf midpoint.jl) !
Gauss_Legendre_2
CTDirect.Gauss_Legendre_2 — Type
Gauss Legendre 2 discretization, formulated as a generic IRK
Gauss_Legendre_3
CTDirect.Gauss_Legendre_3 — Type
Gauss Legendre 3 discretization, formulated as a generic IRK
IRK_dims
CTDirect.IRK_dims — Function
IRK_dims(
dim_NLP_steps,
dim_NLP_x,
dim_NLP_u,
dim_NLP_v,
dim_path_cons,
dim_boundary_cons,
stage
) -> NTuple{5, Any}
Return the dimension of the NLP variables and constraints for a generic IRK discretizion, with the control taken constant per step (ie not distinct controls at time stages)
add_nonzero_block!
CTDirect.add_nonzero_block! — Function
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
get_OCP_control_at_time_step
CTDirect.get_OCP_control_at_time_step — Function
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
get_OCP_control_at_time_step(
xu,
docp::CTDirect.DOCP{CTDirect.Euler},
i
) -> Any
Retrieve control variables at given time step from the NLP variables. Convention: see above for explicit / implicit versions Vector output
get_OCP_state_at_time_step
CTDirect.get_OCP_state_at_time_step — Function
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
get_OCP_variable
CTDirect.get_OCP_variable — Function
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
get_stagevars_at_time_step
CTDirect.get_stagevars_at_time_step — Function
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.
runningCost
CTDirect.runningCost — Function
runningCost(
docp::CTDirect.DOCP{D<:CTDirect.Discretization},
xu,
v,
time_grid
) -> Any
Compute the running cost (must be implemented for each discretization scheme)
runningCost(
docp::CTDirect.DOCP{CTDirect.Euler},
xu,
v,
time_grid
) -> Any
Compute the running cost
runningCost(
docp::CTDirect.DOCP{<:CTDirect.GenericIRK},
xu,
v,
time_grid
) -> Any
Compute the running cost
runningCost(
docp::CTDirect.DOCP{CTDirect.Midpoint},
xu,
v,
time_grid
) -> Any
Compute the running cost
runningCost(
docp::CTDirect.DOCP{CTDirect.Trapeze},
xu,
v,
time_grid
) -> Any
Compute the running cost
setStepConstraints!
CTDirect.setStepConstraints! — Function
setStepConstraints!(
docp::CTDirect.DOCP{CTDirect.Euler},
c,
xu,
v,
time_grid,
i,
work
) -> Any
Set the constraints corresponding to the state equation Convention: 1 <= i <= dimNLPsteps+1
setStepConstraints!(
docp::CTDirect.DOCP{<:CTDirect.GenericIRK},
c,
xu,
v,
time_grid,
i,
work
) -> Any
Set the constraints corresponding to the state equation Convention: 1 <= i <= dimNLPsteps (+1)
setStepConstraints!(
docp::CTDirect.DOCP{CTDirect.Midpoint},
c,
xu,
v,
time_grid,
i,
work
) -> Any
Set the constraints corresponding to the state equation Convention: 1 <= i <= dimNLPsteps+1
setStepConstraints!(
docp::CTDirect.DOCP{CTDirect.Trapeze},
c,
xu,
v,
time_grid,
i,
work
) -> Any
Set the constraints corresponding to the state equation Convention: 1 <= i <= dimNLPsteps+1
setWorkArray
CTDirect.setWorkArray — Function
setWorkArray(docp::CTDirect.DOCP, xu, time_grid, v) -> Any
Set work array for all dynamics evaluations
setWorkArray(
docp::CTDirect.DOCP{CTDirect.Euler},
xu,
time_grid,
v
) -> Any
Set work array for all dynamics and lagrange cost evaluations
setWorkArray(
docp::CTDirect.DOCP{<:CTDirect.GenericIRK},
xu,
time_grid,
v
) -> Any
Set work array for all dynamics and lagrange cost evaluations
setWorkArray(
docp::CTDirect.DOCP{CTDirect.Midpoint},
xu,
time_grid,
v
) -> Any
Set work array for all dynamics cost evaluations
setWorkArray(
docp::CTDirect.DOCP{CTDirect.Trapeze},
xu,
time_grid,
v
) -> Any
Set work array for all dynamics evaluations
set_control_at_time_step!
CTDirect.set_control_at_time_step! — Function
set_control_at_time_step!(
xu,
u_init,
docp::CTDirect.DOCP,
i
)
Set initial guess for control variables at given time step Convention: 1 <= i <= dimNLPsteps(+1)
set_optim_variable!
CTDirect.set_optim_variable! — Function
set_optim_variable!(xu, v_init, docp) -> Any
Set optimization variables in the NLP variables (for initial guess)
set_state_at_time_step!
CTDirect.set_state_at_time_step! — Function
set_state_at_time_step!(xu, x_init, docp::CTDirect.DOCP, i)
Set initial guess for state variables at given time step Convention: 1 <= i <= dimNLPsteps+1