Skip to main content

UserIterate

Struct UserIterate 

Source
pub struct UserIterate {
    pub x: Vec<f64>,
    pub z_l: Vec<f64>,
    pub z_u: Vec<f64>,
    pub g: Vec<f64>,
    pub lambda: Vec<f64>,
    pub scaling: Option<IterateScaling>,
    pub x_l_alg: Vec<f64>,
    pub x_u_alg: Vec<f64>,
    pub grad_lag_x: Vec<f64>,
}
Expand description

The materialised iterate of the user’s problem (full n, full m, original g order), and its window. Defined in pounce_nlp::live_iterate so the decorators that lift it one layer per intermediate_callback forward — presolve’s above all — can reach it; re-exported here, where callers have always found it.

The active-set SQP arm installs one at every fire. The interior-point arm installs one when the TNLP asks for it (pounce_nlp::tnlp::TNLP::wants_current_iterate), built by ipm_user_iterate. Iterate of a TNLP in that TNLP’s own index spaces (full n, full m, its g order), in the units finalize_solution reports: the unscaled-Lagrangian multipliers ∇f + Jᵀλ − z_L + z_U = 0.

Fields§

§x: Vec<f64>§z_l: Vec<f64>§z_u: Vec<f64>§g: Vec<f64>§lambda: Vec<f64>§scaling: Option<IterateScaling>

The scaling of the problem the algorithm solves, entry by entry in this iterate’s shape (see IterateScaling); what GetIpoptCurrentIterate / GetIpoptCurrentViolations with scaled = TRUE multiply by. None: not known (the scaled readers then report the unscaled values, scale 1).

§x_l_alg: Vec<f64>

The variable bounds the algorithm measures its slacks to, in this iterate’s units and shape: the declared box widened by bound_relax_factor (and moved by any safe-slack adjustment) for a column the algorithm holds; the declared bound for one it does not (a fixed variable: its value; a column presolve removed); ±∞ where the column has no such bound. Upstream’s compl_x_* is the algorithm’s slack·z, so it is measured to these. Empty: not known (the declared bounds are used). One residual difference: under honor_original_bounds (off by default) the reported x is projected into the declared box, so x − x_L^alg is the projected point’s slack, not the algorithm’s.

§x_u_alg: Vec<f64>§grad_lag_x: Vec<f64>

∇f + Jᵀλ − z_L + z_U at this iterate, unscaled, in this iterate’s shape, from evaluations the algorithm already made (its own ∇L on the interior-point and SQP arms; presolve layers evaluate the inner problem from the iteration’s record). 0 at a column the algorithm does not hold (upstream ResortX(…, usefixedvals=false)). Empty: not known (GetIpoptCurrentViolations then evaluates).

Trait Implementations§

Source§

impl Clone for UserIterate

Source§

fn clone(&self) -> UserIterate

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 UserIterate

Source§

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

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

impl Default for UserIterate

Source§

fn default() -> UserIterate

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