Skip to main content

clarabel_to_copp3_solution

Function clarabel_to_copp3_solution 

Source
pub fn clarabel_to_copp3_solution(
    solution_x: &[f64],
    s: &[f64],
    num_stationary: (usize, usize),
) -> (Vec<f64>, Vec<f64>)
Expand description

Extract a/b profiles from Clarabel decision vector for TOPP3/COPP3.

  • solution_x is expected in the layout [a[0], ..., a[n], b[0], ..., b[n], x_others];
  • s is expected to be the path-grid slice used by the TOPP3/COPP3 optimization interval;
  • non-stationary segments are copied directly from solution_x.

This helper intentionally does not decide status acceptance; pair it with ClarabelOptions::is_allow(...) in caller logic.