pub struct Solver { /* private fields */ }Expand description
Structure-exploiting convex QP solver.
Implementations§
Source§impl Solver
impl Solver
Sourcepub const fn new(settings: SolverSettings) -> Self
pub const fn new(settings: SolverSettings) -> Self
Creates a solver with explicit settings.
Sourcepub const fn settings(&self) -> &SolverSettings
pub const fn settings(&self) -> &SolverSettings
Returns the active settings.
Sourcepub fn solve(
&self,
problem: &QpProblem,
warm_start: Option<&WarmStart>,
) -> Result<Solution, SolverError>
pub fn solve( &self, problem: &QpProblem, warm_start: Option<&WarmStart>, ) -> Result<Solution, SolverError>
Solves a convex factor-model QP.
When SolverSettings::scaling_iterations is positive, ADMM iterates
on a Ruiz-equilibrated copy of the data; termination checks and every
value on the returned Solution are evaluated on the original data.
Each call pays equilibration and factorization setup again. For
rolling sequences over a fixed structure, build a Workspace with
Solver::workspace instead.
§Errors
Returns SolverError when the input, settings, warm start, factor
covariance, or reduced linear system is invalid.
Sourcepub fn workspace(&self, problem: &QpProblem) -> Result<Workspace, SolverError>
pub fn workspace(&self, problem: &QpProblem) -> Result<Workspace, SolverError>
Builds a reusable Workspace that caches the equilibration and the
SMW-reduced factorization across solves (roadmap 2.4).
Use it when the problem structure — covariance, constraint matrices, bounds — is fixed and only the linear cost or right-hand sides change between solves, as in rolling rebalances.
§Errors
Returns SolverError when the input, settings, factor covariance,
or reduced linear system is invalid.