pub struct ExactResult {
pub status: SolutionStatus,
pub objective_value: f64,
pub best_bound: f64,
pub gap: f64,
pub nodes_explored: u64,
pub iterations: u64,
pub is_optimal: bool,
pub message: String,
}Expand description
Extended result information from exact solver.
Fields§
§status: SolutionStatusSolution status.
objective_value: f64Best objective value found (lower is better for minimization).
best_bound: f64Best bound on optimal value (for optimality gap calculation).
gap: f64Optimality gap: (objective - bound) / objective.
nodes_explored: u64Number of branch-and-bound nodes explored.
iterations: u64Number of simplex iterations.
is_optimal: boolWhether the solution is proven optimal.
message: StringSolver-specific status message.
Implementations§
Source§impl ExactResult
impl ExactResult
Sourcepub fn feasible(objective: f64, bound: f64) -> Self
pub fn feasible(objective: f64, bound: f64) -> Self
Create a result indicating feasible (but not proven optimal) solution.
Sourcepub fn infeasible() -> Self
pub fn infeasible() -> Self
Create a result indicating infeasibility.
Sourcepub fn timeout(best_objective: Option<f64>, best_bound: f64) -> Self
pub fn timeout(best_objective: Option<f64>, best_bound: f64) -> Self
Create a result indicating timeout.
Sourcepub fn with_stats(self, nodes: u64, iterations: u64) -> Self
pub fn with_stats(self, nodes: u64, iterations: u64) -> Self
Set solver statistics.
Trait Implementations§
Source§impl Clone for ExactResult
impl Clone for ExactResult
Source§fn clone(&self) -> ExactResult
fn clone(&self) -> ExactResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExactResult
impl Debug for ExactResult
Source§impl Default for ExactResult
impl Default for ExactResult
Source§fn default() -> ExactResult
fn default() -> ExactResult
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExactResult
impl RefUnwindSafe for ExactResult
impl Send for ExactResult
impl Sync for ExactResult
impl Unpin for ExactResult
impl UnwindSafe for ExactResult
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.