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: NumberUpper 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: Numbermu_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: Numbertau_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: NumberInitial mu seed — mu_init from IpoptAlgorithm registered
options. Used to seed curr_mu in initialize.
barrier_tol_factor: Numberbarrier_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: Numbermu_linear_decrease_factor (default 0.2) — fixed-mode update
uses min(linear · μ, μ^superlinear_power).
mu_superlinear_decrease_power: Numbermu_superlinear_decrease_power (default 1.5).
adaptive_mu_monotone_init_factor: Numberadaptive_mu_monotone_init_factor (default 0.8). Used by
new_fixed_mu when no fix_mu_oracle_ is configured.
restore_accepted_iterate: booladaptive_mu_restore_previous_iterate (default false).
sigma_max: Numbersigma_max / sigma_min forwarded to
QualityFunctionMuOracle on every free-mode call. Defaults
from IpQualityFunctionMuOracle.cpp:RegisterOptions.
sigma_min: Number§qf_norm_type: NormTypequality_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: CentralityTypequality_function_centrality (default none) — penalty term
added to the quality function for centrality deviation.
qf_balancing_term: BalancingTermTypequality_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: i32quality_function_max_section_steps (default 8) — cap on
golden-section iterations when picking σ.
qf_section_sigma_tol: Numberquality_function_section_sigma_tol (default 1e-2) — width
tolerance in σ-space for the golden-section search.
qf_section_qf_tol: Numberquality_function_section_qf_tol (default 0.0) — relative
flatness tolerance for the golden-section search.
probing_iterate_quality_factor: Numberprobing_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
impl AdaptiveMuUpdate
pub fn new() -> Self
Sourcepub fn probing_iterate_guard_fires(
factor: Number,
curr_mu: Number,
avrg_compl: Number,
) -> bool
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.
Sourcepub fn lower_mu_safeguard(
&mut self,
dual_inf: Number,
primal_inf: Number,
min_ref_val: Number,
) -> Number
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)pub fn reset_init_inf(&mut self)
Trait Implementations§
Source§impl Default for AdaptiveMuUpdate
impl Default for AdaptiveMuUpdate
Source§impl MuUpdate for AdaptiveMuUpdate
impl MuUpdate for AdaptiveMuUpdate
Source§fn initialize(&mut self, data: &IpoptDataHandle)
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
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
fn terminates_on_tiny_step(&self) -> bool
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§
impl !RefUnwindSafe for AdaptiveMuUpdate
impl !Send for AdaptiveMuUpdate
impl !Sync for AdaptiveMuUpdate
impl !UnwindSafe for AdaptiveMuUpdate
impl Freeze for AdaptiveMuUpdate
impl Unpin for AdaptiveMuUpdate
impl UnsafeUnpin for AdaptiveMuUpdate
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