#[non_exhaustive]pub struct Solution {
pub status: ApplicationReturnStatus,
pub success: bool,
pub x: Vec<f64>,
pub objective: f64,
pub multipliers: Vec<f64>,
pub g: Vec<f64>,
pub z_l: Vec<f64>,
pub z_u: Vec<f64>,
pub stats: SolveStatistics,
}Expand description
The outcome of Nlp::solve.
The vector fields (x, multipliers, g, z_l, z_u) are filled
by the solver’s finalize_solution callback. They stay empty
when the solve aborts before finalization, so check
success/status before indexing.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.status: ApplicationReturnStatusSolver status; success is the convenient boolean.
success: booltrue for SolveSucceeded / SolvedToAcceptableLevel.
x: Vec<f64>Optimal variables (length n).
objective: f64Objective at the solution.
multipliers: Vec<f64>Constraint multipliers λ (length n_constraints).
g: Vec<f64>Constraint values g(x) at the solution (length n_constraints).
z_l: Vec<f64>Lower-bound multipliers z_L (length n).
z_u: Vec<f64>Upper-bound multipliers z_U (length n).
stats: SolveStatisticsPer-solve statistics: wall time (total_wallclock_time_secs),
iteration_count, evaluation counts, final scaled and unscaled
infeasibilities, final barrier final_mu, restoration counters.
stats.iterations holds the per-iteration trajectory and is
non-empty only when Nlp::capture_iterations was requested.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Solution
impl RefUnwindSafe for Solution
impl Send for Solution
impl Sync for Solution
impl Unpin for Solution
impl UnsafeUnpin for Solution
impl UnwindSafe for Solution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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