Skip to main content

AdaptiveMuUpdate

Struct AdaptiveMuUpdate 

Source
pub struct AdaptiveMuUpdate {
Show 27 fields pub mu_oracle: MuOracleKind, pub adaptive_mu_globalization: AdaptiveMuGlobalization, pub adaptive_mu_kkt_norm: AdaptiveMuKktNorm, pub adaptive_mu_safeguard_factor: Number, pub adaptive_mu_kkterror_red_iters: usize, pub adaptive_mu_kkterror_red_fact: Number, pub filter_max_margin: Number, pub filter_margin_fact: Number, pub mu_min: Number, pub mu_max: Number, pub mu_max_fact: Number, pub tau_min: Number, pub mu_init: Number, pub barrier_tol_factor: Number, pub mu_linear_decrease_factor: Number, pub mu_superlinear_decrease_power: Number, pub adaptive_mu_monotone_init_factor: Number, pub restore_accepted_iterate: bool, pub sigma_max: Number, pub sigma_min: Number, pub qf_norm_type: NormType, pub qf_centrality_type: CentralityType, pub qf_balancing_term: BalancingTermType, pub qf_max_section_steps: i32, pub qf_section_sigma_tol: Number, pub qf_section_qf_tol: Number, pub probing_iterate_quality_factor: Number, /* private fields */
}

Fields§

§mu_oracle: MuOracleKind§adaptive_mu_globalization: AdaptiveMuGlobalization§adaptive_mu_kkt_norm: AdaptiveMuKktNorm§adaptive_mu_safeguard_factor: Number§adaptive_mu_kkterror_red_iters: usize§adaptive_mu_kkterror_red_fact: Number§filter_max_margin: Number§filter_margin_fact: Number§mu_min: Number§mu_max: Number

Upper bound on μ. Sentinel -1.0 means “not yet computed; init lazily on the first update_barrier_parameter call to mu_max_fact * curr_avrg_compl()”. Mirrors IpAdaptiveMuUpdate.cpp:160-165 (load step) and IpAdaptiveMuUpdate.cpp:267-274 (lazy init).

§mu_max_fact: Number

mu_max_fact (default 1e3) — factor for lazy init of mu_max. Upstream IpAdaptiveMuUpdate.cpp:RegisterOptions line 42. Ignored if the user explicitly sets mu_max to a non-sentinel value.

§tau_min: Number

tau_min from IpAdaptiveMuUpdate.cpp:RegisterOptions. Used to derive curr_tau = max(tau_min, 1 - mu) after each update, mirroring upstream’s IpAdaptiveMuUpdate.cpp:UpdateBarrierParameter at the post-oracle update.

§mu_init: Number

Initial mu seed — mu_init from IpoptAlgorithm registered options. Used to seed curr_mu in initialize.

§barrier_tol_factor: Number

barrier_tol_factor (default 10) from upstream IpMonotoneMuUpdate::RegisterOptions. Threshold for fixed-mode barrier subproblem completion: reduce μ when curr_barrier_error ≤ barrier_tol_factor · μ.

§mu_linear_decrease_factor: Number

mu_linear_decrease_factor (default 0.2) — fixed-mode update uses min(linear · μ, μ^superlinear_power).

§mu_superlinear_decrease_power: Number

mu_superlinear_decrease_power (default 1.5).

§adaptive_mu_monotone_init_factor: Number

adaptive_mu_monotone_init_factor (default 0.8). Used by new_fixed_mu when no fix_mu_oracle_ is configured.

§restore_accepted_iterate: bool

adaptive_mu_restore_previous_iterate (default false).

§sigma_max: Number

sigma_max / sigma_min forwarded to QualityFunctionMuOracle on every free-mode call. Defaults from IpQualityFunctionMuOracle.cpp:RegisterOptions.

§sigma_min: Number§qf_norm_type: NormType

quality_function_norm_type (default 2-norm-squared) — norm used to aggregate the three KKT components inside the quality function. Forwarded to QualityFunctionMuOracle on every free-mode call. Mirrors IpQualityFunctionMuOracle.cpp:RegisterOptions.

§qf_centrality_type: CentralityType

quality_function_centrality (default none) — penalty term added to the quality function for centrality deviation.

§qf_balancing_term: BalancingTermType

quality_function_balancing_term (default none) — penalty term added to the quality function when the complementarity is far smaller than the infeasibilities.

§qf_max_section_steps: i32

quality_function_max_section_steps (default 8) — cap on golden-section iterations when picking σ.

§qf_section_sigma_tol: Number

quality_function_section_sigma_tol (default 1e-2) — width tolerance in σ-space for the golden-section search.

§qf_section_qf_tol: Number

quality_function_section_qf_tol (default 0.0) — relative flatness tolerance for the golden-section search.

§probing_iterate_quality_factor: Number

probing_iterate_quality_factor (default 1e4, pounce-specific; see pounce#58). When the probing (Mehrotra) μ-oracle is about to read curr_avrg_compl() for its mu_curr input, a single imbalanced (s_i, z_i) pair can inflate the average 5+ orders above the stored data.curr_mu. Probing then mathematically correctly returns σ·mu_curr ≫ previous μ, which throws the iterate out of the convergence neighborhood. This guard short-circuits that case: when curr_avrg_compl / curr_mu > probing_iterate_quality_factor, we signal restoration via [IpoptData::request_resto] and keep μ unchanged. Set to 0 or any non-positive value to disable.

Implementations§

Source§

impl AdaptiveMuUpdate

Source

pub fn new() -> Self

Source

pub fn probing_iterate_guard_fires( factor: Number, curr_mu: Number, avrg_compl: Number, ) -> bool

Pure-arithmetic predicate behind the probing-oracle iterate- quality guard (pounce#58). Returns true when the ratio avrg_compl / curr_mu exceeds factor. The two non-strict gates (factor > 0, curr_mu > 0) keep the predicate well-defined when the guard is disabled or when an unusual μ-strategy zeroes curr_mu.

Source

pub fn lower_mu_safeguard( &mut self, dual_inf: Number, primal_inf: Number, min_ref_val: Number, ) -> Number

Scalar core of AdaptiveMuUpdate::lower_mu_safeguard (IpAdaptiveMuUpdate.cpp:753-786):

  init_dual_inf   ← max(1, dual_inf)   if not yet set
  init_primal_inf ← max(1, primal_inf) if not yet set
  lower = max(safeguard_factor * dual_inf / init_dual_inf,
              safeguard_factor * primal_inf / init_primal_inf)
  if globalization == KKT_ERROR: lower = min(lower, min_ref_val)
Source

pub fn reset_init_inf(&mut self)

Trait Implementations§

Source§

impl Default for AdaptiveMuUpdate

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl MuUpdate for AdaptiveMuUpdate

Source§

fn initialize(&mut self, data: &IpoptDataHandle)

Port of IpAdaptiveMuUpdate.cpp:InitializeImpl. Seeds curr_mu = mu_init, curr_tau = max(tau_min, 1 - mu_init), resets the globalization state, and starts in free-μ mode (SetFreeMuMode(true) at line 239).

Source§

fn update_barrier_parameter( &mut self, data: &IpoptDataHandle, cq: &IpoptCqHandle, nlp: Option<&Rc<RefCell<dyn IpoptNlp>>>, pd_search_dir: Option<&mut PdSearchDirCalc>, ) -> Number

Adaptive μ update — port of UpdateBarrierParameter (IpAdaptiveMuUpdate.cpp:252-444). Runs the FreeMuMode / FixedMuMode state machine:

  • FreeMuMode: ask the configured oracle for a candidate (LOQO closed-form, Probing predictor solve, or QualityFunction golden-section). If progress is sufficient, stay in free mode and remember the iterate; otherwise switch to fixed mode at new_fixed_mu.
  • FixedMuMode: monotone Fiacco-McCormick reduction (min(linear · μ, μ^superlinear_power)). Switch back to free mode once the globalization criterion is satisfied again.

Probing / QualityFunction silently fall back to LOQO when nlp / pd_search_dir are unavailable (mirrors upstream lines 402-408).

Note: line-search reset (upstream’s linesearch_->Reset() at lines 339, 386, 431) is not yet wired here — that handle is not part of the MuUpdate trait surface. This is a deliberate v1.0 deviation; it primarily affects the watchdog counter, not convergence.

Source§

fn terminates_on_tiny_step(&self) -> bool

Whether a flagged tiny step with μ unable to decrease should terminate the algorithm with STOP_AT_TINY_STEP. Upstream IpMonotoneMuUpdate.cpp throws TINY_STEP_DETECTED in exactly that case; IpAdaptiveMuUpdate.cpp instead routes the tiny-step flag through its force_no_progress path — it fixes μ and keeps iterating, never self-terminating. Default false matches the adaptive behaviour; MonotoneMuUpdate overrides to true.

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> 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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