pub struct ClarabelPersistent { /* private fields */ }Expand description
A stateful Clarabel handle that keeps the built solver resident across solves.
Created by Clarabel::persistent. When the next model
has the same dimensions, cone layout and P/A sparsity pattern, only the
numeric data (P, q, A, b) is overwritten in place via Clarabel’s
update_data, reusing the
KKT symbolic factorization instead of rebuilding it. Any structural change
— added/removed rows or columns, a changed sparsity pattern, a new cone, a
flipped constraint sense that moves a row between cones — triggers a
transparent full rebuild, so every result matches a cold
Clarabel::solve.
Clarabel is an interior-point method and does not warm-start from the previous iterate, so iteration counts are unchanged; the saving is the skipped setup (equilibration structure, symbolic factorization, allocations).
In-place updates are rejected by Clarabel when presolve or structural-zero
dropping altered the problem, in which case the handle falls back to a
rebuild. Set presolve_enable(false) and input_sparse_dropzeros(false)
(the defaults leave presolve on) to keep the fast path available.
A failed solve leaves the handle without a resident model; the next call
rebuilds from scratch.
Implementations§
Trait Implementations§
Source§impl Debug for ClarabelPersistent
impl Debug for ClarabelPersistent
Source§impl Default for ClarabelPersistent
impl Default for ClarabelPersistent
Source§fn default() -> ClarabelPersistent
fn default() -> ClarabelPersistent
Source§impl Solver for ClarabelPersistent
impl Solver for ClarabelPersistent
Source§type Options = ClarabelOptions
type Options = ClarabelOptions
() for solvers without any
tunables.fn name(&self) -> &str
fn supports(&self, kind: ModelKind) -> bool
Source§fn solve(
&mut self,
model: &Model,
opts: &ClarabelOptions,
) -> Result<SolverResult, SolverError>
fn solve( &mut self, model: &Model, opts: &ClarabelOptions, ) -> Result<SolverResult, SolverError>
Model using this solver. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ClarabelPersistent
impl !UnwindSafe for ClarabelPersistent
impl Freeze for ClarabelPersistent
impl Send for ClarabelPersistent
impl Sync for ClarabelPersistent
impl Unpin for ClarabelPersistent
impl UnsafeUnpin for ClarabelPersistent
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> 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