754#define COPP_MATRIX_VIEW_F64_COLUMN_MAJOR(data_, rows_, cols_) \
755 CoppMatrixViewF64{(data_), (rows_), (cols_), COPP_MATRIX_LAYOUT_COLUMN_MAJOR, (rows_)}
757#define COPP_MATRIX_VIEW_F64_COLUMN_MAJOR(data_, rows_, cols_) \
758 ((struct CoppMatrixViewF64){(data_), (rows_), (cols_), COPP_MATRIX_LAYOUT_COLUMN_MAJOR, (rows_)})
768#define COPP_MATRIX_VIEW_F64_ROW_MAJOR(data_, rows_, cols_) \
769 CoppMatrixViewF64{(data_), (rows_), (cols_), COPP_MATRIX_LAYOUT_ROW_MAJOR, (cols_)}
771#define COPP_MATRIX_VIEW_F64_ROW_MAJOR(data_, rows_, cols_) \
772 ((struct CoppMatrixViewF64){(data_), (rows_), (cols_), COPP_MATRIX_LAYOUT_ROW_MAJOR, (cols_)})
const char * copp_status_message(enum CoppStatus status)
Return a short static message for a COPP status code.
CoppClarabelSolverStatus
Clarabel solver status returned by SOCP expert results.
const char * copp_version(void)
Return the COPP library version.
enum CoppStatus copp_clarabel_solution_to_profile_3rd(struct CoppSliceF64 s, struct CoppSliceF64 x, size_t num_stationary_start, size_t num_stationary_end, struct CoppProfile3rd *out_profile)
Extract a third-order COPP profile from a Clarabel primal solution.
void copp_vec_usize_free(struct CoppVecUsize vec)
Release a library-owned usize vector returned by COPP.
enum CoppStatus copp_last_error_code(void)
Return the status code associated with the current thread's last error.
CoppClarabelDirectSolveMethod
Direct linear solver method forwarded to Clarabel.
CoppStatus
C ABI status code returned by COPP FFI functions.
enum CoppStatus copp_set_last_error_message_n(enum CoppStatus status, const char *message, size_t len)
Set the current thread's last detailed error message from a byte slice.
void copp_clear_last_error(void)
Clear the current thread's last detailed error message.
enum CoppStatus copp_last_error_message_copy(char *buffer, size_t capacity, size_t *out_len)
Copy the current thread's last UTF-8 error message into a caller buffer.
enum CoppStatus copp_clarabel_solution_to_profile_2nd(size_t s_len, struct CoppSliceF64 x, struct CoppVecF64 *out_a)
Extract a second-order COPP profile from a Clarabel primal solution.
void copp_vec_f64_free(struct CoppVecF64 vec)
Release a library-owned f64 vector returned by COPP.
size_t copp_last_error_message_len(void)
Return the length in bytes of the current thread's last UTF-8 error message.
const char * copp_last_error_message(void)
Return the current thread's last detailed error message as UTF-8.
enum CoppStatus copp_clarabel_default_options(struct CoppClarabelOptions *out_options)
Write default shared Clarabel options into out_options.
void copp_matrix_f64_free(struct CoppMatrixF64 matrix)
Release a library-owned f64 matrix returned by COPP.
enum CoppStatus copp_set_last_error_message(enum CoppStatus status, const char *message)
Set the current thread's last detailed error message from a C string.
CoppMatrixLayout
Matrix memory layout used by CoppMatrixViewF64.
CoppVerbosity
C ABI verbosity level for solver diagnostics.
@ COPP_CLARABEL_SOLVER_STATUS_CALLBACK_TERMINATED
Solver terminated by callback.
@ COPP_CLARABEL_SOLVER_STATUS_SOLVED
Solver terminated with a solution.
@ COPP_CLARABEL_SOLVER_STATUS_ALMOST_DUAL_INFEASIBLE
Problem is dual infeasible with reduced accuracy.
@ COPP_CLARABEL_SOLVER_STATUS_PRIMAL_INFEASIBLE
Problem is primal infeasible.
@ COPP_CLARABEL_SOLVER_STATUS_INSUFFICIENT_PROGRESS
Solver terminated due to lack of progress.
@ COPP_CLARABEL_SOLVER_STATUS_DUAL_INFEASIBLE
Problem is dual infeasible.
@ COPP_CLARABEL_SOLVER_STATUS_ALMOST_SOLVED
Solver terminated with a reduced-accuracy solution.
@ COPP_CLARABEL_SOLVER_STATUS_UNSOLVED
Solver has not run.
@ COPP_CLARABEL_SOLVER_STATUS_MAX_ITERATIONS
Iteration limit reached before an accepted solution or certificate.
@ COPP_CLARABEL_SOLVER_STATUS_NUMERICAL_ERROR
Solver terminated with a numerical error.
@ COPP_CLARABEL_SOLVER_STATUS_MAX_TIME
Time limit reached before an accepted solution or certificate.
@ COPP_CLARABEL_SOLVER_STATUS_ALMOST_PRIMAL_INFEASIBLE
Problem is primal infeasible with reduced accuracy.
@ COPP_CLARABEL_DIRECT_SOLVE_METHOD_MKL
Use the optional MKL Pardiso backend when compiled into Clarabel.
@ COPP_CLARABEL_DIRECT_SOLVE_METHOD_AUTO
Let Clarabel choose the direct solver.
@ COPP_CLARABEL_DIRECT_SOLVE_METHOD_PANUA
Use the optional Panua Pardiso backend when compiled into Clarabel.
@ COPP_CLARABEL_DIRECT_SOLVE_METHOD_FAER
Use the optional FAER sparse backend when compiled into Clarabel.
@ COPP_CLARABEL_DIRECT_SOLVE_METHOD_QDLDL
Use Clarabel's QDLDL backend.
@ COPP_STATUS_NULL_POINTER
A required pointer argument was null.
@ COPP_STATUS_PATH_SINGULAR_SYSTEM
Internal spline/path linear system is singular.
@ COPP_STATUS_INVALID_ARGUMENT
An unsupported enum value or option was provided through the C ABI.
@ COPP_STATUS_CONSTRAINT_NO_MATCH_ORDER
Constraint input ordering does not match the expected contract.
@ COPP_STATUS_CONSTRAINT_NO_MATCH_DIMENSIONS
Constraint input dimensions do not match the expected shape.
@ COPP_STATUS_PATH_INVALID_DIMENSION
Path dimension is invalid.
@ COPP_STATUS_SOLVER_INVALID_OPTIONS
Solver rejected the provided options.
@ COPP_STATUS_PATH_NOT_ENOUGH_WAYPOINTS
Not enough waypoints were supplied to build a path.
@ COPP_STATUS_PANIC
COPP caught an internal panic at the C ABI boundary.
@ COPP_STATUS_CONSTRAINT_INFEASIBLE_REFERENCE
Reference profile is infeasible under current constraints.
@ COPP_STATUS_CONSTRAINT_NO_GIVEN_Q_INFO
Required path derivative data is missing.
@ COPP_STATUS_CONSTRAINT_OUT_OF_S_BOUNDS
Requested station interval is outside the stored constraint range.
@ COPP_STATUS_PATH_UNSUPPORTED_DERIVATIVE_ORDER
Requested path derivative order is not supported by this path.
@ COPP_STATUS_CONSTRAINT_NON_POSITIVE_LINEARIZATION_FLOOR
Linearization floor is not strictly positive.
@ COPP_STATUS_CONSTRAINT_INVALID_SIGNED_BOUNDS
Signed upper/lower bounds do not satisfy strict feasibility rules.
@ COPP_STATUS_CONSTRAINT_NON_POSITIVE_A
Profile a violates positivity requirements.
@ COPP_STATUS_IO_ERROR
Filesystem or OS I/O failure.
@ COPP_STATUS_INVALID_SHAPE
A matrix/vector shape was invalid.
@ COPP_STATUS_ALLOCATION_FAILED
A memory allocation failed or an output buffer could not be created.
@ COPP_STATUS_PATH_UNSUPPORTED_BOUNDARY
Requested spline boundary condition is unsupported.
@ COPP_STATUS_INVALID_LENGTH
A slice length or vector length was invalid.
@ COPP_STATUS_SOLVER_UNBOUNDED
Solver reported unboundedness.
@ COPP_STATUS_PATH_DIMENSION_MISMATCH
Path matrix/tensor dimensions are incompatible.
@ COPP_STATUS_CONSTRAINT_EMPTY_INTERVAL
Requested constraint interval is empty.
@ COPP_STATUS_SOLVER_OTHER
Backend-specific or uncategorized solver/runtime error.
@ COPP_STATUS_CONSTRAINT_NO_DYNAMIC
Required dynamic-model data is unavailable.
@ COPP_STATUS_OK
Operation completed successfully.
@ COPP_STATUS_CONSTRAINT_NON_INCREASING_S
Constraint input s is not strictly increasing.
@ COPP_STATUS_CLARABEL_SOLVER_ERROR
Clarabel returned an internal solver error.
@ COPP_STATUS_CLARABEL_SOLVER_STATUS
Clarabel terminated with a non-success status.
@ COPP_STATUS_PATH_OUT_OF_RANGE_S
Query parameter is outside the configured path range.
@ COPP_STATUS_PATH_INVALID_ORDER
Spline order is invalid.
@ COPP_STATUS_ROBOT_DYNAMICS_ERROR
User-provided robot inverse dynamics failed.
@ COPP_STATUS_SOLVER_INVALID_INPUT
Solver rejected the input model or data.
@ COPP_STATUS_SOLVER_INFEASIBLE
Solver reported infeasibility.
@ COPP_STATUS_PATH_INVALID_RANGE
Path parameter range is invalid.
@ COPP_STATUS_CONSTRAINT_LINEAR_JERK_NOT_AVAILABLE
Linearized jerk constraints are unavailable for the requested station.
@ COPP_MATRIX_LAYOUT_COLUMN_MAJOR
Column-major storage: element (row, col) is at data[row + col * leading_dim].
@ COPP_MATRIX_LAYOUT_ROW_MAJOR
Row-major storage: element (row, col) is at data[col + row * leading_dim].
@ COPP_VERBOSITY_DEBUG
Detailed debug information will be emitted.
@ COPP_VERBOSITY_SILENT
No log will be emitted.
@ COPP_VERBOSITY_SUMMARY
Only summary information will be emitted.
@ COPP_VERBOSITY_TRACE
Very detailed trace information will be emitted.
Linear solver metadata reported by Clarabel.
bool direct
Whether the linear solver used a direct factorization method.
size_t nnz_a
Number of nonzeros in the linear system.
size_t threads
Number of threads used by the linear solver.
enum CoppClarabelDirectSolveMethod method
Linear solver method name mapped to COPP's stable enum.
size_t nnz_l
Number of nonzeros in the factored system.
Shared Clarabel options for COPP SOCP solvers.
struct CoppClarabelSettings clarabel_settings
Advanced raw Clarabel solver settings.
bool allow_callback_terminated
Accept Clarabel status CallbackTerminated as usable.
bool allow_insufficient_progress
Accept Clarabel status InsufficientProgress as usable.
enum CoppVerbosity verbosity
Crate-level verbosity for COPP assembly diagnostics.
bool allow_almost_solved
Accept Clarabel status AlmostSolved as usable.
bool allow_max_iterations
Accept Clarabel status MaxIterations as usable.
bool allow_max_time
Accept Clarabel status MaxTime as usable.
Advanced raw Clarabel solver settings.
double reduced_tol_infeas_rel
Reduced relative infeasibility tolerance for almost-solved status.
double tol_ktratio
Kappa/tau tolerance.
double min_switch_step_length
Minimum step length for asymmetric-cone switching.
bool equilibrate_enable
Enable data equilibration before solving.
double min_terminate_step_length
Minimum step length for termination checks.
double reduced_tol_infeas_abs
Reduced absolute infeasibility tolerance for almost-solved status.
bool dynamic_regularization_enable
Enable dynamic KKT regularization.
double dynamic_regularization_eps
Dynamic regularization threshold.
uint32_t equilibrate_max_iter
Maximum number of equilibration iterations.
uint32_t iterative_refinement_max_iter
Iterative-refinement maximum iterations.
bool presolve_enable
Enable Clarabel presolve.
bool input_sparse_dropzeros
Drop structural zeros from sparse inputs before solving.
uint32_t max_threads
Maximum solver threads.
double reduced_tol_feas
Reduced feasibility tolerance for almost-solved status.
double equilibrate_max_scaling
Maximum equilibration scaling.
bool direct_kkt_solver
Whether to use a direct KKT solver.
double tol_infeas_rel
Relative infeasibility tolerance.
double time_limit
Maximum solve time in seconds.
double static_regularization_proportional
Static KKT regularization proportional term.
double equilibrate_min_scaling
Minimum equilibration scaling.
enum CoppClarabelDirectSolveMethod direct_solve_method
Direct linear solver method.
double iterative_refinement_reltol
Iterative-refinement relative tolerance.
uint32_t max_iter
Maximum number of interior-point iterations.
double iterative_refinement_stop_ratio
Iterative-refinement stalling ratio.
double linesearch_backtrack_step
Backtracking factor used by the line search.
double tol_feas
Primal/dual feasibility tolerance.
bool iterative_refinement_enable
Enable iterative refinement for direct solves.
double tol_gap_rel
Relative duality-gap tolerance.
double tol_gap_abs
Absolute duality-gap tolerance.
double iterative_refinement_abstol
Iterative-refinement absolute tolerance.
double reduced_tol_gap_rel
Reduced relative duality-gap tolerance for almost-solved status.
double max_step_fraction
Maximum interior-point step length.
double dynamic_regularization_delta
Dynamic regularization shift.
double reduced_tol_gap_abs
Reduced absolute duality-gap tolerance for almost-solved status.
bool static_regularization_enable
Enable static KKT regularization.
double tol_infeas_abs
Absolute infeasibility tolerance.
double static_regularization_constant
Static KKT regularization constant.
double reduced_tol_ktratio
Reduced kappa/tau tolerance for almost-solved status.
bool verbose
Enable Clarabel's internal solver log.
Library-owned column-major f64 matrix returned to C.
size_t cols
Number of matrix columns.
size_t rows
Number of matrix rows.
double * data
Pointer to the first column-major element, or null for an empty matrix.
size_t capacity
Allocation capacity in number of double elements, used only by copp_matrix_f64_free.
Borrowed immutable f64 matrix passed from C to COPP.
size_t leading_dim
Leading dimension / physical stride.
enum CoppMatrixLayout layout
Matrix memory layout.
const double * data
Pointer to the first matrix element.
size_t rows
Number of matrix rows.
size_t cols
Number of matrix columns.
Owned third-order profile returned by TOPP3/COPP3 C ABI solvers.
size_t num_stationary_end
Effective stationary interval count at the end.
size_t num_stationary_start
Effective stationary interval count at the start.
Borrowed immutable f64 slice passed from C to COPP.
const double * data
Pointer to the first element.
size_t len
Number of elements.
Borrowed mutable f64 slice passed from C to COPP.
double * data
Pointer to the first mutable element.
size_t len
Number of elements.
Library-owned f64 vector returned to C.
size_t capacity
Allocation capacity, used only by copp_vec_f64_free.
size_t len
Number of initialized elements.
double * data
Pointer to the first element, or null for an empty vector.
Library-owned usize vector returned to C.
size_t len
Number of initialized elements.
size_t capacity
Allocation capacity, used only by copp_vec_usize_free.
size_t * data
Pointer to the first element, or null for an empty vector.