Skip to main content

ClarabelOptions

Struct ClarabelOptions 

Source
pub struct ClarabelOptions {
Show 36 fields pub universal: UniversalOptions, pub direct_solve_method: Option<ClarabelDirectSolve>, pub max_iter: Option<u32>, pub max_step_fraction: Option<f64>, pub tol_gap_abs: Option<f64>, pub tol_gap_rel: Option<f64>, pub tol_feas: Option<f64>, pub tol_infeas_abs: Option<f64>, pub tol_infeas_rel: Option<f64>, pub tol_ktratio: Option<f64>, pub reduced_tol_gap_abs: Option<f64>, pub reduced_tol_gap_rel: Option<f64>, pub reduced_tol_feas: Option<f64>, pub reduced_tol_infeas_abs: Option<f64>, pub reduced_tol_infeas_rel: Option<f64>, pub reduced_tol_ktratio: Option<f64>, pub equilibrate_enable: Option<bool>, pub equilibrate_max_iter: Option<u32>, pub equilibrate_min_scaling: Option<f64>, pub equilibrate_max_scaling: Option<f64>, pub linesearch_backtrack_step: Option<f64>, pub min_switch_step_length: Option<f64>, pub min_terminate_step_length: Option<f64>, pub static_regularization_enable: Option<bool>, pub static_regularization_constant: Option<f64>, pub static_regularization_proportional: Option<f64>, pub dynamic_regularization_enable: Option<bool>, pub dynamic_regularization_eps: Option<f64>, pub dynamic_regularization_delta: Option<f64>, pub iterative_refinement_enable: Option<bool>, pub iterative_refinement_reltol: Option<f64>, pub iterative_refinement_abstol: Option<f64>, pub iterative_refinement_max_iter: Option<u32>, pub iterative_refinement_stop_ratio: Option<f64>, pub presolve_enable: Option<bool>, pub input_sparse_dropzeros: Option<bool>,
}
Available on crate feature clarabel only.
Expand description

Clarabel-specific solver options.

A typed mirror of the tunable, non-feature-gated fields of clarabel::solver::CoreSettings. Every field is Option, None leaves Clarabel’s own default in place, so the defaults quoted below are informational.

The universal threads option maps to Clarabel’s max_threads, which only affects multithreaded KKT solvers. The default qdldl solver is single-threaded.

Fields§

§universal: UniversalOptions

Options shared by every backend.

§direct_solve_method: Option<ClarabelDirectSolve>

Direct linear (KKT) solver method. Clarabel default Auto.

§max_iter: Option<u32>

Interior-point iteration limit. Clarabel default 200.

§max_step_fraction: Option<f64>

Maximum interior-point step length. Clarabel default 0.99.

§tol_gap_abs: Option<f64>

Absolute duality-gap tolerance. Clarabel default 1e-8.

§tol_gap_rel: Option<f64>

Relative duality-gap tolerance. Clarabel default 1e-8.

§tol_feas: Option<f64>

Primal/dual feasibility tolerance. Clarabel default 1e-8.

§tol_infeas_abs: Option<f64>

Absolute infeasibility tolerance. Clarabel default 1e-8.

§tol_infeas_rel: Option<f64>

Relative infeasibility tolerance. Clarabel default 1e-8.

§tol_ktratio: Option<f64>

κ/τ tolerance. Clarabel default 1e-6.

§reduced_tol_gap_abs: Option<f64>

Reduced (low-accuracy fallback) absolute duality-gap tolerance. Clarabel default 5e-5.

§reduced_tol_gap_rel: Option<f64>

Reduced relative duality-gap tolerance. Clarabel default 5e-5.

§reduced_tol_feas: Option<f64>

Reduced feasibility tolerance. Clarabel default 1e-4.

§reduced_tol_infeas_abs: Option<f64>

Reduced absolute infeasibility tolerance. Clarabel default 5e-12.

§reduced_tol_infeas_rel: Option<f64>

Reduced relative infeasibility tolerance. Clarabel default 5e-5.

§reduced_tol_ktratio: Option<f64>

Reduced κ/τ tolerance. Clarabel default 1e-4.

§equilibrate_enable: Option<bool>

Enable data-equilibration pre-scaling. Clarabel default true.

§equilibrate_max_iter: Option<u32>

Maximum equilibration scaling iterations. Clarabel default 10.

§equilibrate_min_scaling: Option<f64>

Minimum equilibration scaling allowed. Clarabel default 1e-4.

§equilibrate_max_scaling: Option<f64>

Maximum equilibration scaling allowed. Clarabel default 1e4.

§linesearch_backtrack_step: Option<f64>

Line-search backtracking factor. Clarabel default 0.8.

§min_switch_step_length: Option<f64>

Minimum step for asymmetric cones with PrimalDual scaling. Clarabel default 1e-1.

§min_terminate_step_length: Option<f64>

Minimum step for symmetric cones / asymmetric cones with Dual scaling. Clarabel default 1e-4.

§static_regularization_enable: Option<bool>

Enable KKT static regularization. Clarabel default true.

§static_regularization_constant: Option<f64>

KKT static regularization constant. Clarabel default 1e-8.

§static_regularization_proportional: Option<f64>

Static regularization proportional to the max abs diagonal term. Clarabel default f64::EPSILON.powi(2).

§dynamic_regularization_enable: Option<bool>

Enable KKT dynamic regularization. Clarabel default true.

§dynamic_regularization_eps: Option<f64>

KKT dynamic regularization threshold. Clarabel default 1e-13.

§dynamic_regularization_delta: Option<f64>

KKT dynamic regularization shift. Clarabel default 2e-7.

§iterative_refinement_enable: Option<bool>

KKT direct solve with iterative refinement. Clarabel default true.

§iterative_refinement_reltol: Option<f64>

Iterative-refinement relative tolerance. Clarabel default 1e-13.

§iterative_refinement_abstol: Option<f64>

Iterative-refinement absolute tolerance. Clarabel default 1e-12.

§iterative_refinement_max_iter: Option<u32>

Iterative-refinement maximum iterations. Clarabel default 10.

§iterative_refinement_stop_ratio: Option<f64>

Iterative-refinement stalling tolerance. Clarabel default 5.0.

§presolve_enable: Option<bool>

Enable presolve constraint reduction. Clarabel default true.

§input_sparse_dropzeros: Option<bool>

Drop structural zeros from sparse inputs (disables parametric updating). Clarabel default false.

Implementations§

Source§

impl ClarabelOptions

Source

pub fn direct_solve_method(self, m: ClarabelDirectSolve) -> ClarabelOptions

Select the direct linear (KKT) solver method.

Source

pub fn max_iter(self, v: u32) -> ClarabelOptions

Interior-point iteration limit. Clarabel default 200.

Source

pub fn max_step_fraction(self, v: f64) -> ClarabelOptions

Maximum interior-point step length. Clarabel default 0.99.

Source

pub fn tol_gap_abs(self, v: f64) -> ClarabelOptions

Absolute duality-gap tolerance. Clarabel default 1e-8.

Source

pub fn tol_gap_rel(self, v: f64) -> ClarabelOptions

Relative duality-gap tolerance. Clarabel default 1e-8.

Source

pub fn tol_feas(self, v: f64) -> ClarabelOptions

Primal/dual feasibility tolerance. Clarabel default 1e-8.

Source

pub fn tol_infeas_abs(self, v: f64) -> ClarabelOptions

Absolute infeasibility tolerance. Clarabel default 1e-8.

Source

pub fn tol_infeas_rel(self, v: f64) -> ClarabelOptions

Relative infeasibility tolerance. Clarabel default 1e-8.

Source

pub fn tol_ktratio(self, v: f64) -> ClarabelOptions

κ/τ tolerance. Clarabel default 1e-6.

Source

pub fn reduced_tol_gap_abs(self, v: f64) -> ClarabelOptions

Reduced (low-accuracy fallback) absolute duality-gap tolerance. Clarabel default 5e-5.

Source

pub fn reduced_tol_gap_rel(self, v: f64) -> ClarabelOptions

Reduced relative duality-gap tolerance. Clarabel default 5e-5.

Source

pub fn reduced_tol_feas(self, v: f64) -> ClarabelOptions

Reduced feasibility tolerance. Clarabel default 1e-4.

Source

pub fn reduced_tol_infeas_abs(self, v: f64) -> ClarabelOptions

Reduced absolute infeasibility tolerance. Clarabel default 5e-12.

Source

pub fn reduced_tol_infeas_rel(self, v: f64) -> ClarabelOptions

Reduced relative infeasibility tolerance. Clarabel default 5e-5.

Source

pub fn reduced_tol_ktratio(self, v: f64) -> ClarabelOptions

Reduced κ/τ tolerance. Clarabel default 1e-4.

Source

pub fn equilibrate_enable(self, v: bool) -> ClarabelOptions

Enable data-equilibration pre-scaling. Clarabel default true.

Source

pub fn equilibrate_max_iter(self, v: u32) -> ClarabelOptions

Maximum equilibration scaling iterations. Clarabel default 10.

Source

pub fn equilibrate_min_scaling(self, v: f64) -> ClarabelOptions

Minimum equilibration scaling allowed. Clarabel default 1e-4.

Source

pub fn equilibrate_max_scaling(self, v: f64) -> ClarabelOptions

Maximum equilibration scaling allowed. Clarabel default 1e4.

Source

pub fn linesearch_backtrack_step(self, v: f64) -> ClarabelOptions

Line-search backtracking factor. Clarabel default 0.8.

Source

pub fn min_switch_step_length(self, v: f64) -> ClarabelOptions

Minimum step for asymmetric cones with PrimalDual scaling. Clarabel default 1e-1.

Source

pub fn min_terminate_step_length(self, v: f64) -> ClarabelOptions

Minimum step for symmetric cones / asymmetric cones with Dual scaling. Clarabel default 1e-4.

Source

pub fn static_regularization_enable(self, v: bool) -> ClarabelOptions

Enable KKT static regularization. Clarabel default true.

Source

pub fn static_regularization_constant(self, v: f64) -> ClarabelOptions

KKT static regularization constant. Clarabel default 1e-8.

Source

pub fn static_regularization_proportional(self, v: f64) -> ClarabelOptions

Static regularization proportional to the max abs diagonal term. Clarabel default f64::EPSILON.powi(2).

Source

pub fn dynamic_regularization_enable(self, v: bool) -> ClarabelOptions

Enable KKT dynamic regularization. Clarabel default true.

Source

pub fn dynamic_regularization_eps(self, v: f64) -> ClarabelOptions

KKT dynamic regularization threshold. Clarabel default 1e-13.

Source

pub fn dynamic_regularization_delta(self, v: f64) -> ClarabelOptions

KKT dynamic regularization shift. Clarabel default 2e-7.

Source

pub fn iterative_refinement_enable(self, v: bool) -> ClarabelOptions

KKT direct solve with iterative refinement. Clarabel default true.

Source

pub fn iterative_refinement_reltol(self, v: f64) -> ClarabelOptions

Iterative-refinement relative tolerance. Clarabel default 1e-13.

Source

pub fn iterative_refinement_abstol(self, v: f64) -> ClarabelOptions

Iterative-refinement absolute tolerance. Clarabel default 1e-12.

Source

pub fn iterative_refinement_max_iter(self, v: u32) -> ClarabelOptions

Iterative-refinement maximum iterations. Clarabel default 10.

Source

pub fn iterative_refinement_stop_ratio(self, v: f64) -> ClarabelOptions

Iterative-refinement stalling tolerance. Clarabel default 5.0.

Source

pub fn presolve_enable(self, v: bool) -> ClarabelOptions

Enable presolve constraint reduction. Clarabel default true.

Source

pub fn input_sparse_dropzeros(self, v: bool) -> ClarabelOptions

Drop structural zeros from sparse inputs (disables parametric updating). Clarabel default false.

Trait Implementations§

Source§

impl Clone for ClarabelOptions

Source§

fn clone(&self) -> ClarabelOptions

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 ClarabelOptions

Source§

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

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

impl Default for ClarabelOptions

Source§

fn default() -> ClarabelOptions

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

impl HasUniversal for ClarabelOptions

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> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

impl<T> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DistributionExt for T
where T: ?Sized,

Source§

fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> T
where Self: Distribution<T>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.
Source§

impl<T> UniversalOptionsExt for T
where T: HasUniversal,

Source§

fn time_limit(self, d: Duration) -> Self

Source§

fn threads(self, n: u32) -> Self

Source§

fn verbose(self, on: bool) -> Self

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more