Common
Index
CTDirect.DOCP_Hessian_pattern
CTDirect.DOCP_Jacobian_pattern
CTDirect.add_nonzero_block!
CTDirect.get_OCP_control_at_time_step
CTDirect.get_OCP_state_at_time_step
CTDirect.get_OCP_variable
CTDirect.get_lagrange_state_at_time_step
CTDirect.get_stagevars_at_time_step
CTDirect.setWorkArray
CTDirect.set_control_at_time_step!
CTDirect.set_optim_variable!
CTDirect.set_state_at_time_step!
Documentation
CTDirect.DOCP_Hessian_pattern
— MethodDOCP_Hessian_pattern(
docp::CTDirect.DOCP{D<:CTDirect.Discretization}
) -> SparseArrays.SparseMatrixCSC{Bool, Int64}
Build sparsity pattern for Hessian of Lagrangian
CTDirect.DOCP_Jacobian_pattern
— MethodDOCP_Jacobian_pattern(
docp::CTDirect.DOCP{D<:CTDirect.Discretization}
) -> SparseArrays.SparseMatrixCSC{Bool, Int64}
Build sparsity pattern for Jacobian of constraints
CTDirect.add_nonzero_block!
— Methodadd_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
CTDirect.get_OCP_control_at_time_step
— Methodget_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
CTDirect.get_OCP_state_at_time_step
— Methodget_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
CTDirect.get_OCP_variable
— Methodget_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
CTDirect.get_lagrange_state_at_time_step
— Methodget_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 !)
CTDirect.get_stagevars_at_time_step
— Methodget_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.
CTDirect.setWorkArray
— MethodsetWorkArray(docp::CTDirect.DOCP, xu, time_grid, v) -> Any
Set work array for all dynamics and lagrange cost evaluations
CTDirect.set_control_at_time_step!
— Methodset_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)
CTDirect.set_optim_variable!
— Methodset_optim_variable!(xu, v_init, docp) -> Any
Set optimization variables in the NLP variables (for initial guess)
CTDirect.set_state_at_time_step!
— Methodset_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