COPP C ABI 0.2.3
C interface for COPP trajectory optimization
Loading...
Searching...
No Matches
Copp3Problem Struct Reference

Borrowed value descriptor for a COPP3 problem solved from C. More...

#include <formulation.h>

Data Fields

struct CoppRobot * robot
 Mutable robot handle that owns station-indexed constraint storage.
size_t idx_s_start
 Start station index.
struct CoppSliceF64 a_linearization
 Reference profile a[k] used to linearize third-order constraints.
double a_start
 Boundary value a(idx_s_start) = dot{s}^2.
double a_final
 Boundary value a(idx_s_final) = dot{s}^2.
double b_start
 Boundary value b(idx_s_start) = ddot{s}.
double b_final
 Boundary value b(idx_s_final) = ddot{s}.
size_t num_stationary_max_start
 User-input stationary upper bound at the start.
size_t num_stationary_max_end
 User-input stationary upper bound at the end.
double a_linearization_floor
 Denominator floor used when linearizing third-order constraints.
const struct CoppObjective * objectives
 Objective descriptor array.
size_t num_objectives
 Number of objective descriptors.
struct CoppSliceF64 b_linearization
 Optional path acceleration b[k] paired with a_linearization.

Detailed Description

Borrowed value descriptor for a COPP3 problem solved from C.

This extends Topp3Problem with borrowed objective descriptors. It is not an owning handle; all pointers are used only during the solver call.

Example

The example below extends a TOPP3 descriptor with borrowed objective descriptors for a COPP3 solver call.

struct Copp3Problem problem = {
0,
(struct CoppSliceF64){a_seed.data, a_seed.len},
0.0,
0.0,
0.0,
0.0,
1,
1,
1e-10,
};
Borrowed value descriptor for a COPP3 problem solved from C.
size_t num_objectives
Number of objective descriptors.
const struct CoppObjective * objectives
Objective descriptor array.
struct CoppRobot * robot
Mutable robot handle that owns station-indexed constraint storage.
Borrowed immutable f64 slice passed from C to COPP.
Definition core.h:812

Definition at line 382 of file formulation.h.

Field Documentation

◆ robot

struct CoppRobot* Copp3Problem::robot

Mutable robot handle that owns station-indexed constraint storage.

Definition at line 386 of file formulation.h.

◆ idx_s_start

size_t Copp3Problem::idx_s_start

Start station index.

The final index is derived from a_linearization.len - 1.

Definition at line 391 of file formulation.h.

◆ a_linearization

struct CoppSliceF64 Copp3Problem::a_linearization

Reference profile a[k] used to linearize third-order constraints.

Definition at line 395 of file formulation.h.

◆ a_start

double Copp3Problem::a_start

Boundary value a(idx_s_start) = dot{s}^2.

Definition at line 399 of file formulation.h.

◆ a_final

double Copp3Problem::a_final

Boundary value a(idx_s_final) = dot{s}^2.

Definition at line 403 of file formulation.h.

◆ b_start

double Copp3Problem::b_start

Boundary value b(idx_s_start) = ddot{s}.

Definition at line 407 of file formulation.h.

◆ b_final

double Copp3Problem::b_final

Boundary value b(idx_s_final) = ddot{s}.

Definition at line 411 of file formulation.h.

◆ num_stationary_max_start

size_t Copp3Problem::num_stationary_max_start

User-input stationary upper bound at the start.

Definition at line 415 of file formulation.h.

◆ num_stationary_max_end

size_t Copp3Problem::num_stationary_max_end

User-input stationary upper bound at the end.

Definition at line 419 of file formulation.h.

◆ a_linearization_floor

double Copp3Problem::a_linearization_floor

Denominator floor used when linearizing third-order constraints.

Definition at line 423 of file formulation.h.

◆ objectives

const struct CoppObjective* Copp3Problem::objectives

Objective descriptor array.

Definition at line 427 of file formulation.h.

◆ num_objectives

size_t Copp3Problem::num_objectives

Number of objective descriptors.

Definition at line 431 of file formulation.h.

◆ b_linearization

struct CoppSliceF64 Copp3Problem::b_linearization

Optional path acceleration b[k] paired with a_linearization.

Leave empty (data = NULL, len = 0, as zero-initialization does) to linearize every third-order row of station k at a_linearization[k]. When non-empty, each row is instead anchored where that row is nearly active at the feasible state (a_linearization, b_linearization), so a slack row is anchored high and a tight one stays near the state. It must then have the same length as a_linearization, otherwise the solver returns COPP_STATUS_SOLVER_INVALID_INPUT when it builds the problem, and the two must be the a and b of one previously solved third-order profile; the b of a TOPP2 profile is discretized differently and must not be used.

Prefer this adaptive mode when a spans a wide range over the window, and especially when a can approach zero (about 1e-10): anchoring both rows of one axis at the same small a_linearization[k] cancels b and c and leaves a[k] <= 3 * a_linearization[k]. On profiles that stay well away from zero the two modes agree closely, and leaving this field empty is cheaper.

Definition at line 453 of file formulation.h.


The documentation for this struct was generated from the following file: