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>,
}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: UniversalOptionsOptions 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
impl ClarabelOptions
Sourcepub fn direct_solve_method(self, m: ClarabelDirectSolve) -> Self
pub fn direct_solve_method(self, m: ClarabelDirectSolve) -> Self
Select the direct linear (KKT) solver method.
Sourcepub fn max_step_fraction(self, v: f64) -> Self
pub fn max_step_fraction(self, v: f64) -> Self
Maximum interior-point step length. Clarabel default 0.99.
Sourcepub fn tol_gap_abs(self, v: f64) -> Self
pub fn tol_gap_abs(self, v: f64) -> Self
Absolute duality-gap tolerance. Clarabel default 1e-8.
Sourcepub fn tol_gap_rel(self, v: f64) -> Self
pub fn tol_gap_rel(self, v: f64) -> Self
Relative duality-gap tolerance. Clarabel default 1e-8.
Sourcepub fn tol_feas(self, v: f64) -> Self
pub fn tol_feas(self, v: f64) -> Self
Primal/dual feasibility tolerance. Clarabel default 1e-8.
Sourcepub fn tol_infeas_abs(self, v: f64) -> Self
pub fn tol_infeas_abs(self, v: f64) -> Self
Absolute infeasibility tolerance. Clarabel default 1e-8.
Sourcepub fn tol_infeas_rel(self, v: f64) -> Self
pub fn tol_infeas_rel(self, v: f64) -> Self
Relative infeasibility tolerance. Clarabel default 1e-8.
Sourcepub fn tol_ktratio(self, v: f64) -> Self
pub fn tol_ktratio(self, v: f64) -> Self
κ/τ tolerance. Clarabel default 1e-6.
Sourcepub fn reduced_tol_gap_abs(self, v: f64) -> Self
pub fn reduced_tol_gap_abs(self, v: f64) -> Self
Reduced (low-accuracy fallback) absolute duality-gap tolerance.
Clarabel default 5e-5.
Sourcepub fn reduced_tol_gap_rel(self, v: f64) -> Self
pub fn reduced_tol_gap_rel(self, v: f64) -> Self
Reduced relative duality-gap tolerance. Clarabel default 5e-5.
Sourcepub fn reduced_tol_feas(self, v: f64) -> Self
pub fn reduced_tol_feas(self, v: f64) -> Self
Reduced feasibility tolerance. Clarabel default 1e-4.
Sourcepub fn reduced_tol_infeas_abs(self, v: f64) -> Self
pub fn reduced_tol_infeas_abs(self, v: f64) -> Self
Reduced absolute infeasibility tolerance. Clarabel default 5e-12.
Sourcepub fn reduced_tol_infeas_rel(self, v: f64) -> Self
pub fn reduced_tol_infeas_rel(self, v: f64) -> Self
Reduced relative infeasibility tolerance. Clarabel default 5e-5.
Sourcepub fn reduced_tol_ktratio(self, v: f64) -> Self
pub fn reduced_tol_ktratio(self, v: f64) -> Self
Reduced κ/τ tolerance. Clarabel default 1e-4.
Sourcepub fn equilibrate_enable(self, v: bool) -> Self
pub fn equilibrate_enable(self, v: bool) -> Self
Enable data-equilibration pre-scaling. Clarabel default true.
Sourcepub fn equilibrate_max_iter(self, v: u32) -> Self
pub fn equilibrate_max_iter(self, v: u32) -> Self
Maximum equilibration scaling iterations. Clarabel default 10.
Sourcepub fn equilibrate_min_scaling(self, v: f64) -> Self
pub fn equilibrate_min_scaling(self, v: f64) -> Self
Minimum equilibration scaling allowed. Clarabel default 1e-4.
Sourcepub fn equilibrate_max_scaling(self, v: f64) -> Self
pub fn equilibrate_max_scaling(self, v: f64) -> Self
Maximum equilibration scaling allowed. Clarabel default 1e4.
Sourcepub fn linesearch_backtrack_step(self, v: f64) -> Self
pub fn linesearch_backtrack_step(self, v: f64) -> Self
Line-search backtracking factor. Clarabel default 0.8.
Sourcepub fn min_switch_step_length(self, v: f64) -> Self
pub fn min_switch_step_length(self, v: f64) -> Self
Minimum step for asymmetric cones with PrimalDual scaling.
Clarabel default 1e-1.
Sourcepub fn min_terminate_step_length(self, v: f64) -> Self
pub fn min_terminate_step_length(self, v: f64) -> Self
Minimum step for symmetric cones / asymmetric cones with Dual scaling.
Clarabel default 1e-4.
Sourcepub fn static_regularization_enable(self, v: bool) -> Self
pub fn static_regularization_enable(self, v: bool) -> Self
Enable KKT static regularization. Clarabel default true.
Sourcepub fn static_regularization_constant(self, v: f64) -> Self
pub fn static_regularization_constant(self, v: f64) -> Self
KKT static regularization constant. Clarabel default 1e-8.
Sourcepub fn static_regularization_proportional(self, v: f64) -> Self
pub fn static_regularization_proportional(self, v: f64) -> Self
Static regularization proportional to the max abs diagonal term.
Clarabel default f64::EPSILON.powi(2).
Sourcepub fn dynamic_regularization_enable(self, v: bool) -> Self
pub fn dynamic_regularization_enable(self, v: bool) -> Self
Enable KKT dynamic regularization. Clarabel default true.
Sourcepub fn dynamic_regularization_eps(self, v: f64) -> Self
pub fn dynamic_regularization_eps(self, v: f64) -> Self
KKT dynamic regularization threshold. Clarabel default 1e-13.
Sourcepub fn dynamic_regularization_delta(self, v: f64) -> Self
pub fn dynamic_regularization_delta(self, v: f64) -> Self
KKT dynamic regularization shift. Clarabel default 2e-7.
Sourcepub fn iterative_refinement_enable(self, v: bool) -> Self
pub fn iterative_refinement_enable(self, v: bool) -> Self
KKT direct solve with iterative refinement. Clarabel default true.
Sourcepub fn iterative_refinement_reltol(self, v: f64) -> Self
pub fn iterative_refinement_reltol(self, v: f64) -> Self
Iterative-refinement relative tolerance. Clarabel default 1e-13.
Sourcepub fn iterative_refinement_abstol(self, v: f64) -> Self
pub fn iterative_refinement_abstol(self, v: f64) -> Self
Iterative-refinement absolute tolerance. Clarabel default 1e-12.
Sourcepub fn iterative_refinement_max_iter(self, v: u32) -> Self
pub fn iterative_refinement_max_iter(self, v: u32) -> Self
Iterative-refinement maximum iterations. Clarabel default 10.
Sourcepub fn iterative_refinement_stop_ratio(self, v: f64) -> Self
pub fn iterative_refinement_stop_ratio(self, v: f64) -> Self
Iterative-refinement stalling tolerance. Clarabel default 5.0.
Sourcepub fn presolve_enable(self, v: bool) -> Self
pub fn presolve_enable(self, v: bool) -> Self
Enable presolve constraint reduction. Clarabel default true.
Sourcepub fn input_sparse_dropzeros(self, v: bool) -> Self
pub fn input_sparse_dropzeros(self, v: bool) -> Self
Drop structural zeros from sparse inputs (disables parametric updating).
Clarabel default false.
Trait Implementations§
Source§impl Clone for ClarabelOptions
impl Clone for ClarabelOptions
Source§fn clone(&self) -> ClarabelOptions
fn clone(&self) -> ClarabelOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClarabelOptions
impl Debug for ClarabelOptions
Source§impl Default for ClarabelOptions
impl Default for ClarabelOptions
Source§fn default() -> ClarabelOptions
fn default() -> ClarabelOptions
Source§impl HasUniversal for ClarabelOptions
impl HasUniversal for ClarabelOptions
fn universal(&self) -> &UniversalOptions
fn universal_mut(&mut self) -> &mut UniversalOptions
Auto Trait Implementations§
impl Freeze for ClarabelOptions
impl RefUnwindSafe for ClarabelOptions
impl Send for ClarabelOptions
impl Sync for ClarabelOptions
impl Unpin for ClarabelOptions
impl UnsafeUnpin for ClarabelOptions
impl UnwindSafe for ClarabelOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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