Skip to main content

SolverSettings

Struct SolverSettings 

Source
pub struct SolverSettings {
Show 18 fields pub max_iterations: usize, pub absolute_tolerance: f64, pub relative_tolerance: f64, pub rho: f64, pub sigma: f64, pub check_termination_every: usize, pub adaptive_rho: bool, pub adaptive_rho_interval: usize, pub adaptive_rho_tolerance: f64, pub adaptive_rho_multiplier: f64, pub over_relaxation: f64, pub minimum_rho: f64, pub maximum_rho: f64, pub scaling_iterations: usize, pub infeasibility_tolerance: f64, pub polish: bool, pub polish_regularization: f64, pub polish_refinement_iterations: usize,
}
Expand description

ADMM settings.

Fields§

§max_iterations: usize

Maximum number of ADMM iterations.

§absolute_tolerance: f64

Absolute stopping tolerance.

§relative_tolerance: f64

Relative stopping tolerance.

§rho: f64

Initial augmented-Lagrangian penalty.

§sigma: f64

Positive proximal regularization in the x update.

§check_termination_every: usize

Evaluate KKT residuals every this many iterations.

§adaptive_rho: bool

Whether residual balancing may update rho.

§adaptive_rho_interval: usize

Consider a penalty update every this many iterations.

§adaptive_rho_tolerance: f64

Update when one ADMM residual exceeds the other by this ratio.

§adaptive_rho_multiplier: f64

Multiplicative increase or decrease applied to rho.

§over_relaxation: f64

Over-relaxation coefficient alpha blended into every consensus update: the slack and multiplier steps see alpha * Ax + (1 - alpha) * z_prev instead of Ax.

Must lie in the open interval (0, 2); 1.0 disables relaxation and recovers plain ADMM. Values around 1.6 typically cut iteration counts substantially on feasible convex QPs (see Boyd et al. §3.4.3 and the OSQP default).

§minimum_rho: f64

Smallest penalty selected by adaptation.

§maximum_rho: f64

Largest penalty selected by adaptation.

§scaling_iterations: usize

Number of Ruiz equilibration passes over the problem data before iterating; 0 disables automatic scaling.

Scaling only changes the space ADMM iterates in. Termination checks and every reported residual are always evaluated on the original data.

§infeasibility_tolerance: f64

Tolerance for declaring the problem primal or dual infeasible from ADMM iterate differences; 0 disables infeasibility detection.

Candidate certificates are normalized to unit infinity norm and evaluated on the original data, so the tolerance is relative: a direction qualifies when its defining residuals are below the tolerance and its gap is below the negated tolerance (see crate::check_primal_certificate / crate::check_dual_certificate). Problems infeasible by a margin smaller than this tolerance stop at SolveStatus::MaxIterations with diagnostics instead.

§polish: bool

Whether to refine Solved iterates with one direct active-set solve (polishing).

The active set is guessed from the final multipliers and the resulting KKT system is solved through the same SMW reduction the iterations use, at the cost of one extra reduced factorization. The polished iterate is adopted only when its worst KKT residual — re-audited with crate::check_kkt on the original data — improves on the ADMM iterate’s, so enabling polish never degrades a solution. Solution::polished records the outcome.

§polish_regularization: f64

Regularization added to the polishing KKT system so it stays factorable even when the active-set guess is degenerate.

The regularization error is removed afterwards by SolverSettings::polish_refinement_iterations rounds of iterative refinement against the unregularized system.

§polish_refinement_iterations: usize

Iterative-refinement rounds applied to the polishing solve.

Trait Implementations§

Source§

impl Clone for SolverSettings

Source§

fn clone(&self) -> SolverSettings

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SolverSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SolverSettings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for SolverSettings

Source§

fn eq(&self, other: &SolverSettings) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SolverSettings

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.