Skip to main content

IpoptData

Struct IpoptData 

Source
pub struct IpoptData {
Show 24 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 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>,
}
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.

§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.

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.

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