Skip to main content

copp2_socp_expert

Function copp2_socp_expert 

Source
pub fn copp2_socp_expert<'a, M: RobotTorque>(
    problem: &Copp2Problem<'a, M>,
    options: &ClarabelOptions,
) -> Result<(Option<Vec<f64>>, DefaultSolution<f64>), CoppError>
Expand description

Expert COPP2-SOCP API with full Clarabel solution exposure.

§Purpose

This API is intended for advanced users who need both:

  • extracted high-level profile Option<Vec<f64>>, and
  • raw solver result DefaultSolution<f64> for post-analysis.

§Return contract

  • Ok((Some(a), solution)): status accepted by options.is_allow(solution.status).
  • Ok((None, solution)): solve finished but status not accepted by policy.
  • Err(...): true runtime failures only (input validation / model build / solver construction).

§Returns

Returns tuple (Option<Vec<f64>>, DefaultSolution<f64>) for diagnostic workflows.

§Errors

Returns CoppError only for real failures (input, model build, or solver runtime).

§Contract

  • caller must handle None profile when status is not accepted;
  • acceptance policy is fully controlled by options.is_allow. See ClarabelOptions::is_allow for a status-handling example.

§Verbosity behavior

Logging is layered by options.verbosity():

  • Silent: no algorithm logs;
  • Summary: lifecycle milestones and elapsed time;
  • Debug: assembly-level counters and stage summaries;
  • Trace: fine-grained stage deltas and solver snapshot diagnostics.