pub enum QpError {
DimensionMismatch(String),
InvertedBounds(String),
WarmStartDimensionMismatch(String),
LinearSolverFailure(String),
UnsupportedFeature(String),
}Expand description
Hard errors — problems the solver cannot return any meaningful
solution for. Soft outcomes (max-iter, infeasible, unbounded) are
reported via QpStatus inside a successful
crate::QpSolution.
Variants§
DimensionMismatch(String)
Problem-data dimensions disagree (e.g., g.len() != n).
InvertedBounds(String)
A bound vector contains bl > bu for some index.
WarmStartDimensionMismatch(String)
Warm-start working set has the wrong length for the problem dimensions.
LinearSolverFailure(String)
Linear-solver backend reported a hard failure that cannot be recovered by the inertia / refactor logic.
UnsupportedFeature(String)
Feature required by this QP is not yet implemented in the current crate phase (e.g., one-sided inequality constraints before the working-set machinery lands).
Implementations§
Source§impl QpError
impl QpError
Sourcepub fn is_recoverable_factorization_failure(&self) -> bool
pub fn is_recoverable_factorization_failure(&self) -> bool
True when this is a linear-solver failure that the §4.5 inertia-control loop may recover from by shifting the Hessian diagonal — i.e. a singular factor or a wrong-inertia report.
Centralizes the recoverability decision so the retry loops in
solver.rs and schur.rs don’t each re-implement a fragile
substring test. The match is case-insensitive: some failure
messages embed the backend’s Debug-formatted ESymSolverStatus
(Singular / WrongInertia, capitalized — produced by
LinearSolver::resolve’s catch-all "resolve backend status: {status:?}"), which a bare lowercase contains("singular") /
contains("inertia") would silently miss, so those failures would
propagate as unrecoverable instead of triggering a shift retry
(L14).
Trait Implementations§
impl Eq for QpError
Source§impl Error for QpError
impl Error for QpError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()