pub struct MonotoneMuUpdate {
pub mu_init: Number,
pub mu_min: Number,
pub mu_max: Number,
pub mu_linear_decrease_factor: Number,
pub mu_superlinear_decrease_power: Number,
pub tau_min: Number,
pub barrier_tol_factor: Number,
pub mu_target: Number,
pub mu_allow_fast_monotone_decrease: bool,
pub compl_inf_tol: Number,
pub first_iter_resto: bool,
}Fields§
§mu_init: Number§mu_min: Number§mu_max: NumberUpper bound on μ from IpMonotoneMuUpdate.cpp:RegisterOptions.
Used to clamp mu_init at MuUpdate::initialize so the
barrier doesn’t start above the registered ceiling regardless
of what the user set. Default 1e5 mirrors upstream.
mu_linear_decrease_factor: Number§mu_superlinear_decrease_power: Number§tau_min: Number§barrier_tol_factor: Numberbarrier_tol_factor from IpMonotoneMuUpdate.cpp:RegisterOptions.
μ only decreases when the barrier subproblem error drops below
barrier_tol_factor · μ.
mu_target: Numbermu_target floor — μ never goes below this regardless of the
reduction formula. Defaults to 0 (the floor is mu_min).
mu_allow_fast_monotone_decrease: boolmu_allow_fast_monotone_decrease from
IpMonotoneMuUpdate.cpp:RegisterOptions. When true (the
upstream default), the reduction loop keeps iterating while
the sub-error stays below barrier_tol_factor · μ, allowing
multiple consecutive μ reductions in one outer call. When
false, the loop exits after the first successful reduction —
useful on stiff problems where a runaway μ collapse destroys
the line search.
compl_inf_tol: NumberComplementarity tolerance — option compl_inf_tol, default 1e-4
per IpAlgorithmRegOp.cpp. Enters the dynamic μ floor via
min(tol, compl_inf_tol) / (barrier_tol_factor + 1) per
IpMonotoneMuUpdate.cpp:CalcNewMuAndTau:215. Without this floor,
μ can collapse to the absolute floor (mu_min) while primal
infeasibility is still large — observed on SSINE/DECONVBNE.
first_iter_resto: boolfirst_iter_resto_ flag from
Algorithm/IpMonotoneMuUpdate.cpp:118-121,144,196. When set,
the very next call to Self::update_barrier_parameter skips
the μ-reduction loop entirely and clears the flag. Wired by
the restoration sub-builder for the inner IPM (prefix
"resto.") so the inner doesn’t immediately collapse μ on
iteration 0 — it must use the resto_mu value that
[crate::resto::init::RestoIterateInitializer::SetInitialIterates]
seeded into data.curr_mu.
Implementations§
Source§impl MonotoneMuUpdate
impl MonotoneMuUpdate
pub fn new() -> Self
Sourcepub fn with_first_iter_resto(self, b: bool) -> Self
pub fn with_first_iter_resto(self, b: bool) -> Self
Builder helper for the first_iter_resto_ flag. Mirrors the
upstream prefix == "resto." branch in
IpMonotoneMuUpdate.cpp:InitializeImpl.
Sourcepub fn with_mu_min(self, mu_min: Number) -> Self
pub fn with_mu_min(self, mu_min: Number) -> Self
Builder for the mu_min floor. The restoration inner IPM uses
100 * outer_mu_min per upstream IpAdaptiveMuUpdate.cpp:206-211
(and the analogous monotone path); without the conservative
floor, near-feasible iterates collapse μ to the absolute floor
in a single step and the next direction is dominated by the
penalty/proximity terms instead of the barrier, which destroys
near-feasibility (DECONVBNE).
Sourcepub fn compute_tau(&self, mu: Number) -> Number
pub fn compute_tau(&self, mu: Number) -> Number
Fraction-to-the-bound parameter tau from upstream
IpMonotoneMuUpdate.cpp:Update:
tau = max(tau_min, 1 - mu)Returns a value in [tau_min, 1).
Sourcepub fn compute_next_mu(&self, curr_mu: Number) -> Number
pub fn compute_next_mu(&self, curr_mu: Number) -> Number
Pure scalar reduction used by the trait impl. Exposed so unit
tests can drive the formula without standing up an
IpoptData/IpoptCq fixture.
Trait Implementations§
Source§impl Default for MonotoneMuUpdate
impl Default for MonotoneMuUpdate
Source§impl MuUpdate for MonotoneMuUpdate
impl MuUpdate for MonotoneMuUpdate
Source§fn terminates_on_tiny_step(&self) -> bool
fn terminates_on_tiny_step(&self) -> bool
Monotone μ throws TINY_STEP_DETECTED when a tiny step is
flagged and μ is already at its floor — see
IpMonotoneMuUpdate.cpp. The main loop realises that throw as a
STOP_AT_TINY_STEP termination.
Source§fn initialize(&mut self, data: &IpoptDataHandle)
fn initialize(&mut self, data: &IpoptDataHandle)
Port of IpMonotoneMuUpdate.cpp:InitializeImpl. Seeds
curr_mu = min(mu_init, mu_max),
curr_tau = max(tau_min, 1 - curr_mu).
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
Port of IpMonotoneMuUpdate.cpp:UpdateBarrierParameter.
Reduces μ only while the barrier-subproblem error is below
barrier_tol_factor · μ (or a tiny step was just detected).
Each successful reduction also refreshes curr_tau and the new
μ in data. Returns the post-update μ.
Auto Trait Implementations§
impl Freeze for MonotoneMuUpdate
impl RefUnwindSafe for MonotoneMuUpdate
impl Send for MonotoneMuUpdate
impl Sync for MonotoneMuUpdate
impl Unpin for MonotoneMuUpdate
impl UnsafeUnpin for MonotoneMuUpdate
impl UnwindSafe for MonotoneMuUpdate
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