Skip to main content

IterRecord

Struct IterRecord 

Source
pub struct IterRecord {
Show 13 fields pub iter: i32, pub objective: f64, pub inf_pr: f64, pub inf_pr_internal: f64, pub inf_du: f64, pub mu: f64, pub d_norm: f64, pub regularization: f64, pub alpha_dual: f64, pub alpha_primal: f64, pub alpha_primal_char: char, pub ls_trials: i32, pub phase: IterPhase,
}
Expand description

One row of per-iteration data — same numbers that IpoptAlgorithm prints to stdout each iteration (the “iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls” line). Captured into SolveStatistics::iterations when a JSON / programmatic consumer needs the trajectory rather than just the final state.

Field semantics mirror upstream IpOrigIterationOutput.cpp:152 (Snprintf block) so a row in JSON round-trips back into the same console table verbatim.

Fields§

§iter: i32

Iteration index, starting at 0.

§objective: f64

Unscaled objective f(x_k) at the start of iter k.

§inf_pr: f64

Primal infeasibility exactly as the console table prints it in the inf_pr column: under the default inf_pr_output=original, the unscaled constraint violation of the user’s model (for restoration rows, of the original NLP at the restoration iterate’s x). See Self::inf_pr_internal for the residual the filter and the convergence test read (gh#979).

§inf_pr_internal: f64

The algorithm’s internal primal infeasibility ‖(c(x), d(x) − s)‖∞ in the scaled slack form, with the slack pushed off its bound — what the filter, the convergence test and the intermediate callback’s inf_pr see. On restoration rows it is the restoration NLP’s own residual. Differs from Self::inf_pr whenever a slack sits away from d(x) or scaling is active.

§inf_du: f64

Dual infeasibility (max-norm of grad-Lagrangian).

§mu: f64

Barrier parameter μ.

§d_norm: f64

||d_xs||_∞ of the search step. 0.0 on iter 0 (no step yet).

§regularization: f64

Hessian regularization δ_w applied this iter; 0.0 when no regularization was needed (printed as - in the console).

§alpha_dual: f64

Dual step length.

§alpha_primal: f64

Primal step length.

§alpha_primal_char: char

Single-character tag for the alpha-primal column (f, h, r for restoration etc.) — matches upstream’s per-iter tag.

§ls_trials: i32

Number of backtracking line-search trials this iter.

§phase: IterPhase

Which phase printed this row: the main IPM, or the restoration sub-solve (the console’s r-suffixed rows). A restoration row’s iter is the restoration solver’s counter, which continues the outer count, so the outer row that leaves restoration repeats the last restoration row’s index — exactly as the console does.

Trait Implementations§

Source§

impl Clone for IterRecord

Source§

fn clone(&self) -> IterRecord

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IterRecord

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for IterRecord

Source§

fn default() -> IterRecord

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

impl<'de> Deserialize<'de> for IterRecord

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<IterRecord, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for IterRecord

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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