Skip to main content

ComparisonSolver

Trait ComparisonSolver 

Source
pub trait ComparisonSolver {
    // Required methods
    fn name(&self) -> &'static str;
    fn solve(
        &mut self,
        problem: &QpProblem,
        warm_start: Option<&WarmStart>,
    ) -> Result<Solution, String>;
}
Expand description

Solver-neutral adapter for benchmark integrations.

Optional OSQP or Clarabel adapters can implement this trait without changing the instance generator or report format.

Required Methods§

Source

fn name(&self) -> &'static str

Stable label used in reports.

Source

fn solve( &mut self, problem: &QpProblem, warm_start: Option<&WarmStart>, ) -> Result<Solution, String>

Solves one problem, optionally from a common primal warm start.

§Errors

Returns a human-readable adapter or solver error.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§