pub enum ClassReason {
Show 14 variants
NoNonlinearParts,
NonlinearPartsCancelled,
ObjectiveNotQuadratic,
ConstraintNotQuadratic {
row: usize,
},
ObjectiveTermsDropped,
ConstraintTermsDropped {
row: usize,
},
ObjectiveHessianIndefinite,
NonconvexQcqp {
row: usize,
},
ConstraintSenseNonconvex {
row: usize,
},
ConstraintHessianIndefinite {
row: usize,
},
QcqpReformTooCostly {
flops: u128,
},
QcqpTooLargeToSolve {
size: u64,
},
ConvexQuadraticObjective,
ConvexQcqpWithinBudgets {
flops: u128,
size: u64,
},
}Expand description
Why classify_problem reached the class it did.
Every arm is a place the classifier stops — either because it proved a
class or because it could not, and fell back to the more general one. The
distinction matters most for a convex QCQP: four different findings
(a nonconvex row, a nonconvex sense, an unaffordable reformulation, an
oversized conic solve) all route to Nlp, and a user staring at
Problem class: NLP on a model they know is a QCQP has so far had no way
to tell which. POUNCE_DBG_CLASSIFY=1 prints it.
Variants§
NoNonlinearParts
Neither the objective nor any row carries a nonlinear part.
NonlinearPartsCancelled
Nonlinear parts exist but all of them expanded to nothing of degree 2 or higher — the model is linear after expansion.
ObjectiveNotQuadratic
The objective’s nonlinear part is not a degree-2 polynomial.
ConstraintNotQuadratic
Row row’s nonlinear part is not a degree-2 polynomial.
ObjectiveTermsDropped
The objective is degree ≤ 2, but the recognizer lost a term reaching its coefficients, so they are not the whole objective.
ConstraintTermsDropped
Row row is degree ≤ 2, but the recognizer lost a term reaching
its coefficients, so they are not the whole row (gh #685).
“Lost”, not merely “dropped”: a term that cancels exactly is not missing from the form, so those rows keep the fast path (gh #687).
ObjectiveHessianIndefinite
The sense-adjusted objective Hessian has a negative eigenvalue, and every constraint row is linear — a nonconvex QP.
NonconvexQcqp
The sense-adjusted objective Hessian has a negative eigenvalue and
some row carries curvature — a nonconvex QCQP, which is not a QP
and must not be classified as one (see ProblemClass::NonconvexQp).
ConstraintSenseNonconvex
Row row is quadratic with a PSD Hessian, but its bound sense
(>=, =, or two-sided) carves a nonconvex feasible set.
ConstraintHessianIndefinite
Row row’s quadratic Hessian is not PSD.
QcqpReformTooCostly
Convex QCQP, but the cone reformulation exceeds
[SOCP_REFORM_FLOP_BUDGET].
QcqpTooLargeToSolve
Convex QCQP whose reformulation is affordable, but whose conic
solve exceeds [SOCP_SOLVE_SIZE_CAP].
ConvexQuadraticObjective
Convex quadratic objective, linear constraints.
ConvexQcqpWithinBudgets
Convex QCQP inside both guards — the conic path is taken.
Implementations§
Trait Implementations§
Source§impl Clone for ClassReason
impl Clone for ClassReason
Source§fn clone(&self) -> ClassReason
fn clone(&self) -> ClassReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ClassReason
Source§impl Debug for ClassReason
impl Debug for ClassReason
impl Eq for ClassReason
Source§impl PartialEq for ClassReason
impl PartialEq for ClassReason
impl StructuralPartialEq for ClassReason
Auto Trait Implementations§
impl Freeze for ClassReason
impl RefUnwindSafe for ClassReason
impl Send for ClassReason
impl Sync for ClassReason
impl Unpin for ClassReason
impl UnsafeUnpin for ClassReason
impl UnwindSafe for ClassReason
Blanket Implementations§
impl<T> Boilerplate for T
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,
impl<T, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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