Skip to main content

SecondOpinionTrigger

Enum SecondOpinionTrigger 

Source
pub enum SecondOpinionTrigger {
    LocalInfeasibility,
    InvalidNumber,
    RestorationFailure,
    IterationLimit,
}
Expand description

Which failure opened the ladder. Not every rung is evidence about every failure: an Invalid_Number_Detected is a statement about the callbacks at a point, and re-running the same callbacks at the same point under a different linear-solver scaling or a different barrier strategy evaluates the same non-finite quantity again. Only the rung that moves the point applies there.

Variants§

§

LocalInfeasibility

Infeasible_Problem_Detected — a local statement about a nonconvex problem, which every rung is evidence against.

§

InvalidNumber

Invalid_Number_Detected — a NaN or infinity out of the model.

§

RestorationFailure

Restoration_Failed — the restoration phase could not find a point the filter would accept. Like the two above and unlike a budget exit, this is a statement about the trajectory the solve happened to take, not about the model; see SecondOpinionTrigger::for_status.

§

IterationLimit

Maximum_Iterations_Exceededand only when the solve escalated the linear solver’s factorization quality at least once (gh#857).

This is the one trigger that is not a property of the verdict alone, and the exception it carves out of the paragraph on SecondOpinionTrigger::for_status is narrow on purpose. A budget exit normally wants a bigger budget, not a different trajectory — but a feral_increase_quality escalation changes which pivots are taken and never steps back down, so when one fired, the wall the solve hit may be the escalated trajectory’s rather than the model’s, and a bigger budget re-runs the same wall. On square_flowsheet_resto’s lbfgs leg the escalated path reaches 3000 iterations and the un-escalated one converges in 178.

The escalation count is what keeps this from opening a ladder on every budget exit; it comes from the quality_escalations statistic and is checked in second_opinion_rungs, not here — for_status only sees a status. A solve that escalated zero times produces an empty rung list and the driver returns before it narrates anything.

Implementations§

Source§

impl SecondOpinionTrigger

Source

pub fn for_status(status: ApplicationReturnStatus) -> Option<Self>

Which ladder, if any, a finished solve’s verdict opens.

Only these three statuses open one. In particular an iteration- or time-limit exit does not: the answer there is a bigger budget, and a re-solve from a different trajectory would burn the same budget again to reach the same wall.

Restoration_Failed is on the list for the same reason the other two are (gh#815): it is a report about the path, not about the model. The restoration phase failing to find a filter-acceptable point says the iterate reached somewhere the sub-problem could not work from, and a different starting point is a different sub-problem. It is not a budget exit — pounce stops far short of max_iter — so “give it more iterations” is not the available answer, which is precisely the distinction the paragraph above draws. Measured on the gh#815 square flowsheet family: both failing members exit Restoration_Failed, no ladder ran, and rung 3 alone recovers both to Optimal Solution Found — one of them (f100) to an optimum Ipopt itself misses.

Only rung 3 opens on this trigger; rungs 1 and 2 stay gated on SecondOpinionTrigger::LocalInfeasibility, so a restoration failure costs exactly one extra solve. That is the measured ordering, not caution for its own sake: over the KRONOS corpus the displaced start recovered 13 of 15 where mu_strategy=adaptive recovered 4 (see start_point_retry’s option text).

Source

pub fn describe(self) -> &'static str

The word for this trigger in a console line.

Trait Implementations§

Source§

impl Clone for SecondOpinionTrigger

Source§

fn clone(&self) -> SecondOpinionTrigger

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 Copy for SecondOpinionTrigger

Source§

impl Debug for SecondOpinionTrigger

Source§

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

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

impl Eq for SecondOpinionTrigger

Source§

impl PartialEq for SecondOpinionTrigger

Source§

fn eq(&self, other: &SecondOpinionTrigger) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SecondOpinionTrigger

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> Boilerplate for T
where T: Copy + Send + Sync + Debug + PartialEq + 'static,

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> 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> 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> 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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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> 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