Skip to main content

MuUpdate

Trait MuUpdate 

Source
pub trait MuUpdate {
    // Required method
    fn update_barrier_parameter(
        &mut self,
        data: &IpoptDataHandle,
        cq: &IpoptCqHandle,
        nlp: Option<&Rc<RefCell<dyn IpoptNlp>>>,
        pd_search_dir: Option<&mut PdSearchDirCalc>,
    ) -> Number;

    // Provided methods
    fn initialize(&mut self, _data: &IpoptDataHandle) { ... }
    fn terminates_on_tiny_step(&self) -> bool { ... }
}

Required Methods§

Source

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

Compute the next mu after a successful iteration. Mirrors upstream’s MuUpdate::UpdateBarrierParameter. Implementations that need the iterate state (adaptive mu, oracles) read it via the supplied handles; pure scalar reductions like Fiacco-McCormick consult only data.curr_mu.

nlp and pd_search_dir are optional handles needed by the adaptive μ oracles that drive an affine-step / centring solve (probing, quality-function). When either is None the adaptive path silently falls back to the LOQO closed form — matching upstream’s “oracle returned no candidate” branch (IpAdaptiveMuUpdate.cpp:CalculateMuFromOracle:330-340).

Provided Methods§

Source

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

Initialize data.curr_mu and data.curr_tau before the first iteration. Mirrors upstream’s MuUpdate::InitializeImpl. Default is no-op so existing implementors don’t have to change.

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§