pub struct OneDSolution {
pub algorithm: String,
pub exact: bool,
pub lower_bound: Option<f64>,
pub stock_count: usize,
pub total_waste: u64,
pub total_cost: f64,
pub layouts: Vec<StockLayout1D>,
pub stock_requirements: Vec<StockRequirement1D>,
pub unplaced: Vec<CutAssignment1D>,
pub metrics: SolverMetrics1D,
}Expand description
A complete solution returned by solve_1d.
Fields§
§algorithm: StringName of the algorithm that produced this solution.
exact: boolWhether the solution is proven optimal.
lower_bound: Option<f64>Optional lower bound on the optimal objective.
stock_count: usizeNumber of stock pieces consumed.
total_waste: u64Total wasted length across all layouts.
total_cost: f64Total material cost across all layouts.
layouts: Vec<StockLayout1D>Per-stock layouts in descending order of utilization.
stock_requirements: Vec<StockRequirement1D>Per-stock requirement summary, including any shortage against declared availability.
unplaced: Vec<CutAssignment1D>Cuts the solver was unable to place.
metrics: SolverMetrics1DMetrics captured while solving.
Trait Implementations§
Source§impl Clone for OneDSolution
impl Clone for OneDSolution
Source§fn clone(&self) -> OneDSolution
fn clone(&self) -> OneDSolution
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 OneDSolution
impl Debug for OneDSolution
Source§impl<'de> Deserialize<'de> for OneDSolution
impl<'de> Deserialize<'de> for OneDSolution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for OneDSolution
impl PartialEq for OneDSolution
Source§impl Serialize for OneDSolution
impl Serialize for OneDSolution
impl StructuralPartialEq for OneDSolution
Auto Trait Implementations§
impl Freeze for OneDSolution
impl RefUnwindSafe for OneDSolution
impl Send for OneDSolution
impl Sync for OneDSolution
impl Unpin for OneDSolution
impl UnsafeUnpin for OneDSolution
impl UnwindSafe for OneDSolution
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 more