Skip to main content

IpoptData

Struct IpoptData 

Source
pub struct IpoptData {
Show 27 fields pub curr: Option<IteratesVector>, pub trial: Option<IteratesVector>, pub delta: Option<IteratesVector>, pub delta_aff: Option<IteratesVector>, pub delta_cen: Option<IteratesVector>, pub w: Option<Rc<dyn SymMatrix>>, pub iter_count: Index, pub curr_mu: Number, pub curr_tau: Number, pub tol: Number, pub perturbations: PdPerturbations, pub kkt_debug: Option<KktDebug>, pub info_alpha_primal: Number, pub info_alpha_dual: Number, pub info_regu_x: Number, pub info_skip_output: bool, pub info_string: String, pub tiny_step_flag: bool, pub request_resto: bool, pub request_ls_reset: bool, pub request_tiny_step_stop: bool, pub info_alpha_primal_char: char, pub info_ls_count: Index, pub info_last_output: Number, pub info_iters_since_header: Index, pub timing: Rc<TimingStatistics>, pub deadline: Option<Deadline>,
}
Expand description

Mutable state passed down through the algorithm. Owned by IpoptAlgorithm; strategies access via Rc<RefCell<IpoptData>>.

Fields§

§curr: Option<IteratesVector>§trial: Option<IteratesVector>§delta: Option<IteratesVector>§delta_aff: Option<IteratesVector>§delta_cen: Option<IteratesVector>

Pure centering step — solution of the primal-dual system with RHS (0, 0, 0, 0, μ̄·1, μ̄·1, μ̄·1, μ̄·1) (where μ̄ = avrg_compl) per upstream IpQualityFunctionMuOracle.cpp:227-247. Used by the quality-function oracle to assemble σ-step trial points without re-factorising for each candidate σ.

§w: Option<Rc<dyn SymMatrix>>

Hessian of the Lagrangian for the current iterate. Set by HessianUpdater (exact or quasi-Newton). Mirrors IpIpoptData::W_.

§iter_count: Index§curr_mu: Number§curr_tau: Number§tol: Number§perturbations: PdPerturbations§kkt_debug: Option<KktDebug>

KKT-factorization diagnostics for the debugger (set after a search-direction solve when a debugger is installed). The full matrix triplets and LDLᵀ factor are captured here whenever the debugger is stepping (see DebugHook::wants_kkt_capture) and dropped when it detaches, so viz kkt / viz L always have the previous iteration’s system to look back at without paying the O(nnz) assembly during a free run.

§info_alpha_primal: Number

Set after a successful trial-acceptance step in the line search. Cleared on accept.

§info_alpha_dual: Number§info_regu_x: Number

Mirrors IpIpoptData::info_regu_x_.

§info_skip_output: bool

Mirrors IpIpoptData::info_skip_output_.

§info_string: String

Mirrors IpIpoptData::info_string_. Free-form text the iteration output appends to its line.

§tiny_step_flag: bool

Mirrors IpIpoptData::tiny_step_flag_. Set by the line search when an alpha→0 trial is detected; the main loop reads it on the next pass to decide between “tiny step accept” and bail.

§request_resto: bool

Emergency restoration request from the μ-update layer. Set by [AdaptiveMuUpdate] when the probing oracle’s input iterate is corrupted (curr_avrg_complcurr_mu) so the main loop invokes restoration instead of letting the oracle snap μ up many orders of magnitude. Pounce-specific guard; no upstream counterpart. See pounce#58.

§request_ls_reset: bool

Line-search reset request from the μ-update layer (pounce#510). Upstream’s μ updates hold a linesearch_ handle and call linesearch_->Reset() themselves at fixed points (IpAdaptiveMuUpdate.cpp:339, 386, 431, IpMonotoneMuUpdate.cpp:165); pounce’s MuUpdate trait has no such handle, so the updates raise this flag instead and the main loop performs the reset immediately after update_barrier_parameter returns. Consuming the flag clears it.

§request_tiny_step_stop: bool

Tiny-step termination request from the μ-update layer (pounce#512). Upstream signals “problem solved to best possible numerical accuracy” by throwing TINY_STEP_DETECTED from inside UpdateBarrierParameter; a Rust port returns a μ instead, so the two throw sites in IpAdaptiveMuUpdate.cpp (:330-333 fixed mode, :377-380 on the free→fixed switch) raise this flag and the main loop turns it into SolverReturn::StopAtTinyStep.

The flag exists because the throw’s exact branch matters: “a tiny step was flagged and μ came back unchanged” is also true on adaptive paths where upstream does not throw (the no-bounds short-circuit, and a free-mode oracle that happens to re-pick the current μ), so it cannot be reconstructed from the μ values alone. MonotoneMuUpdate has a single throw site covering its whole update and is served by the main loop’s terminates_on_tiny_step() μ-comparison instead.

§info_alpha_primal_char: char

One-char marker the iteration output puts in front of alpha_primal (e.g. 'f' for filter, 'r' for restoration, 'h' for the very first iterate). Mirrors IpIpoptData::info_alpha_primal_char_.

§info_ls_count: Index

Number of trial points evaluated in the most recent line search. Mirrors IpIpoptData::info_ls_count_.

§info_last_output: Number

The wall-clock at the last OrigIterationOutput::WriteOutput pass. Phase 7 uses this to decide whether to re-print the header. Mirrors IpIpoptData::info_last_output_.

§info_iters_since_header: Index

Iterations since the iteration header was last printed. Phase 7 reprints every print_frequency_iter lines. Mirrors IpIpoptData::info_iters_since_header_.

§timing: Rc<TimingStatistics>

Shared per-subsystem timing accumulator. Mirrors upstream’s IpoptData::TimingStats_. IpoptApplication constructs a single instance per solve and shares it (via Rc) with the algorithm, NLP, and KKT solver so each can record its own contribution. Defaults to a fresh empty instance for the structural unit tests that don’t go through IpoptApplication.

§deadline: Option<Deadline>

Shared wall/CPU-time deadline for the whole solve (pounce#242). IpoptApplication installs one at solve start from the max_wall_time / max_cpu_time options, and the restoration inner IPM copies the same deadline onto its own IpoptData so the nested solve is bounded by the caller’s global budget rather than running unbounded (its fresh timing.overall_alg is never started). When present it is the authoritative time gate — checked at the granularity of the expensive inner steps (KKT factorization, each line-search trial), not only between outer iterations. None for direct-driver / unit-test paths, which fall back to the overall_alg timer in crate::conv_check.

Implementations§

Source§

impl IpoptData

Source

pub fn new() -> Self

Source

pub fn append_info_string(&mut self, s: &str)

Append text to info_string. Mirrors IpIpoptData::Append_info_string.

Source

pub fn reset_info(&mut self)

Reset per-iteration info fields. Mirrors the top of IpoptAlgorithm::Optimize’s loop body.

Source

pub fn accept_trial_point(&mut self)

Replace curr with the previously-set trial. Mirrors IpIpoptData::AcceptTrialPoint, which DBG_ASSERTs a trial is staged before promoting it (upstream always runs a line search that stages one). pounce additionally supports a bookkeeping-only iterate() path (no NLP + no search_dir, per the module docs) that runs the per-iteration bookkeeping without computing a step, so trial may be unset here. Promoting None would null out curr and make the next iteration’s CQ accessor (IpoptCq::curr_iv) hit unreachable!; preserve curr when nothing is staged.

Source

pub fn set_trial(&mut self, trial: IteratesVector)

Set the trial iterate from a primal step delta_x/delta_s scaled by alpha_p and a dual step scaled by alpha_d. Phase 5 ships only the structural plumbing; the actual arithmetic is implemented once the line search lands in Phase 7.

Source

pub fn set_curr(&mut self, curr: IteratesVector)

Source

pub fn set_delta(&mut self, d: IteratesVector)

Source

pub fn set_delta_aff(&mut self, d: IteratesVector)

Source

pub fn set_delta_cen(&mut self, d: IteratesVector)

Trait Implementations§

Source§

impl Default for IpoptData

Source§

fn default() -> Self

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

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

Source§

fn by_ref(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

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