pub struct OptErrorConvCheck {Show 23 fields
pub tol: Number,
pub dual_inf_tol: Number,
pub constr_viol_tol: Number,
pub compl_inf_tol: Number,
pub acceptable_tol: Number,
pub acceptable_dual_inf_tol: Number,
pub acceptable_constr_viol_tol: Number,
pub acceptable_compl_inf_tol: Number,
pub acceptable_obj_change_tol: Number,
pub acceptable_iter: Index,
pub max_iter: Index,
pub max_cpu_time: Number,
pub max_wall_time: Number,
pub acceptable_count: Index,
pub last_acceptable_obj: Option<Number>,
pub infeas_stationarity_tol: Number,
pub infeas_viol_kappa: Number,
pub infeas_max_streak: Index,
pub infeas_streak: Index,
pub obj_scale_certificate_threshold: Number,
pub veto_fired: bool,
pub acceptable_veto_fired: bool,
pub veto_extra_iters: Index,
}Fields§
§tol: Number§dual_inf_tol: Number§constr_viol_tol: Number§compl_inf_tol: Number§acceptable_tol: Number§acceptable_dual_inf_tol: Number§acceptable_constr_viol_tol: Number§acceptable_compl_inf_tol: Number§acceptable_obj_change_tol: Number§acceptable_iter: Index§max_iter: Index§max_cpu_time: Number§max_wall_time: Number§acceptable_count: Index§last_acceptable_obj: Option<Number>Objective value at the last iterate the main loop stashed via
set_curr_acceptable_obj. Used by the
acceptable_obj_change_tol cross-check. None until an
acceptable point has been recorded.
infeas_stationarity_tol: NumberTolerance on the scaled infeasibility stationarity
‖Jᵀc‖/max(1,‖c‖). An iterate counts toward the infeasibility
streak when this ratio is at or below this value while the
constraint violation stays bounded away from zero. Rapid
infeasibility detection is disabled when this is non-positive.
infeas_viol_kappa: NumberMultiple of constr_viol_tol the constraint violation must
exceed before an iterate can count as infeasible-stationary —
keeps detection from firing on nearly-feasible flat spots.
infeas_max_streak: IndexConsecutive infeasible-stationary iterations required before
terminating with LocallyInfeasible. Non-positive disables
rapid infeasibility detection.
infeas_streak: IndexRunning count of consecutive infeasible-stationary iterations.
obj_scale_certificate_threshold: NumberObjective-scale floor below which a strict certificate is refused
while the unscaled KKT error is still above acceptable_tol
(gh #200). See certificate_masked. 0 disables the mechanism
entirely, restoring bit-for-bit upstream-Ipopt behaviour.
veto_fired: boolWhether a masked strict certificate was ever refused this solve.
acceptable_veto_fired: boolWhether a masked acceptable-level termination was ever refused.
Tracked separately because the two refusals must be undone differently:
a refused strict certificate restores as Success, a refused
acceptable-level one as StopAtAcceptablePoint. Conflating them would
either over-claim a status or, as originally written, leave the
acceptable-level refusal with no safety net at all.
veto_extra_iters: IndexIterations spent since the veto first refused a certificate.
The veto is a bet that continuing reaches a better point. Some problems
never let it pay off — an unscaled error pinned above acceptable_tol
by an unbounded direction keeps the veto engaged until max_iter,
turning a 40-iteration solve into a 300-iteration one for nothing. Past
[VETO_MAX_EXTRA_ITERS] the bet is called off and the run is allowed to
terminate normally; correctness does not depend on the cap, because the
refused certificate is restored either way.
Implementations§
Trait Implementations§
Source§impl ConvCheck for OptErrorConvCheck
impl ConvCheck for OptErrorConvCheck
Source§fn certificate_vetoed(&self) -> bool
fn certificate_vetoed(&self) -> bool
RestoConvCheckAdapter’s orig-NLP inf_pr evaluation
for the kappa-reduction early-exit) can read data.curr and
the cq layer. Default impl delegates to
Self::check_convergence, so scalar-only policies don’t
need to override.
Whether this policy ever refused a termination certificate it judged
masked by an extreme objective scale (gh #200). Read moreSource§fn acceptable_certificate_vetoed(&self) -> bool
fn acceptable_certificate_vetoed(&self) -> bool
OptErrorConvCheck::acceptable_veto_fired.fn check_convergence( &mut self, nlp_err: Number, iter_count: Index, ) -> ConvergenceStatus
fn check_convergence_with_state( &mut self, nlp_err: Number, iter_count: Index, data: &IpoptDataHandle, cq: &IpoptCqHandle, ) -> ConvergenceStatus
Source§fn current_passes_strict(
&self,
nlp_err: Number,
_data: &IpoptDataHandle,
cq: &IpoptCqHandle,
) -> bool
fn current_passes_strict( &self, nlp_err: Number, _data: &IpoptDataHandle, cq: &IpoptCqHandle, ) -> bool
Self::check_convergence_with_state strict test with
the masked-certificate veto (gh #200) removed. In other words: would this
iterate have certified Success were it not for the objective-scale
masking? Read moreSource§fn tol_or_default(&self) -> Number
fn tol_or_default(&self) -> Number
IpBacktrackingLineSearch.cpp:580). Default 1e-8 matches
upstream’s default tol.Source§fn acceptable_constr_viol_tol_or_default(&self) -> Number
fn acceptable_constr_viol_tol_or_default(&self) -> Number
acceptable_constr_viol_tol, in
the unscaled max-norm space curr_unscaled_primal_infeasibility_max
reports. Read by the best-acceptable fallback’s feasibility-aware ranking
(gh #267), which caps it at the upstream default so a user-widened band
cannot let the fallback spend feasibility to buy objective. Default
1e-2 matches upstream’s default acceptable_constr_viol_tol; policies
that track no such tolerance keep it.Source§fn set_tolerance(&mut self, name: &str, value: Number) -> bool
fn set_tolerance(&mut self, name: &str, value: Number) -> bool
true if name
matched a tolerance this policy owns (so the caller can report
whether it took). Default: this policy exposes no live
tolerances → false.Source§fn current_is_acceptable(&self, nlp_err: Number) -> bool
fn current_is_acceptable(&self, nlp_err: Number) -> bool
nlp_err is at or below the acceptable
tolerance — port of upstream
OptimalityErrorConvergenceCheck::CurrentIsAcceptable. Used by
the main loop to gate StoreAcceptablePoint /
RestoreAcceptablePoint. Default returns false so policies
that don’t track an acceptable level (e.g. resto-of-resto inner
adapters) silently skip the rollback machinery.Source§fn current_is_acceptable_with_state(
&self,
nlp_err: Number,
_data: &IpoptDataHandle,
cq: &IpoptCqHandle,
) -> bool
fn current_is_acceptable_with_state( &self, nlp_err: Number, _data: &IpoptDataHandle, cq: &IpoptCqHandle, ) -> bool
OptimalityErrorConvergenceCheck::CurrentIsAcceptable which
reads the per-component residuals and current f to gate the
acceptable_dual_inf_tol / acceptable_constr_viol_tol /
acceptable_compl_inf_tol / acceptable_obj_change_tol
triplet. Default delegates to the scalar Self::current_is_acceptable.Source§fn set_curr_acceptable_obj(&mut self, obj: Number)
fn set_curr_acceptable_obj(&mut self, obj: Number)
OptimalityErrorConvergenceCheck::SetCurrAcceptableF. The
recorded value feeds the acceptable_obj_change_tol stability
cross-check on subsequent iterates. Default no-op for policies
that don’t track acceptable points.Auto Trait Implementations§
impl Freeze for OptErrorConvCheck
impl RefUnwindSafe for OptErrorConvCheck
impl Send for OptErrorConvCheck
impl Sync for OptErrorConvCheck
impl Unpin for OptErrorConvCheck
impl UnsafeUnpin for OptErrorConvCheck
impl UnwindSafe for OptErrorConvCheck
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<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