pub struct OptErrorConvCheck {Show 19 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,
}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.
Implementations§
Trait Implementations§
Source§impl ConvCheck for OptErrorConvCheck
impl ConvCheck for OptErrorConvCheck
fn check_convergence( &mut self, nlp_err: Number, iter_count: Index, ) -> ConvergenceStatus
Source§fn check_convergence_with_state(
&mut self,
nlp_err: Number,
iter_count: Index,
data: &IpoptDataHandle,
cq: &IpoptCqHandle,
) -> ConvergenceStatus
fn check_convergence_with_state( &mut self, nlp_err: Number, iter_count: Index, data: &IpoptDataHandle, cq: &IpoptCqHandle, ) -> ConvergenceStatus
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.Source§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 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
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