pub struct ThreeDSolution {
pub algorithm: String,
pub exact: bool,
pub lower_bound: Option<f64>,
pub guillotine: bool,
pub bin_count: usize,
pub total_waste_volume: u64,
pub total_cost: f64,
pub layouts: Vec<BinLayout3D>,
pub bin_requirements: Vec<BinRequirement3D>,
pub unplaced: Vec<BoxDemand3D>,
pub metrics: SolverMetrics3D,
}Expand description
A complete solution returned by solve_3d.
Fields§
§algorithm: StringName of the algorithm that produced this solution. When the user
passes ThreeDAlgorithm::Auto, this is the leaf algorithm name
(e.g. "extreme_points_residual_space"), never the literal string
"auto". Mirrors the 1D / 2D convention.
exact: boolWhether the solution is proven optimal. Set to true only by
branch_and_bound when the search exhausts the tree below
branch_and_bound_node_limit. Every other algorithm leaves this
as false.
lower_bound: Option<f64>Optional lower bound on the optimal objective (number of bins).
Populated only by branch_and_bound from the L0/L1/L2 bounds it
computes; None for every other algorithm in v1.
guillotine: boolWhether the layouts are guillotine-compatible. Set to true by
guillotine_3d* and by layer_building_guillotine; false by
every other algorithm.
bin_count: usizeNumber of bins consumed.
total_waste_volume: u64Total wasted volume across all bins.
total_cost: f64Total material cost across all bins.
layouts: Vec<BinLayout3D>Per-bin layouts in descending order of utilization.
bin_requirements: Vec<BinRequirement3D>Per-bin requirement summary. Populated by solve_3d (not by the
individual algorithm) when at least one Bin3D.quantity cap is
set; otherwise an empty Vec. See “Inventory-aware re-solve” in
the spec for the relaxed-pass mechanic.
unplaced: Vec<BoxDemand3D>Boxes the solver was unable to place. Each entry is a
BoxDemand3D with quantity = 1 (one entry per unplaced
instance), matching how 2D returns unplaced: Vec<RectDemand2D>.
metrics: SolverMetrics3DMetrics captured while solving.
Trait Implementations§
Source§impl Clone for ThreeDSolution
impl Clone for ThreeDSolution
Source§fn clone(&self) -> ThreeDSolution
fn clone(&self) -> ThreeDSolution
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ThreeDSolution
impl Debug for ThreeDSolution
Source§impl<'de> Deserialize<'de> for ThreeDSolution
impl<'de> Deserialize<'de> for ThreeDSolution
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>,
Source§impl PartialEq for ThreeDSolution
impl PartialEq for ThreeDSolution
Source§impl Serialize for ThreeDSolution
impl Serialize for ThreeDSolution
impl StructuralPartialEq for ThreeDSolution
Auto Trait Implementations§
impl Freeze for ThreeDSolution
impl RefUnwindSafe for ThreeDSolution
impl Send for ThreeDSolution
impl Sync for ThreeDSolution
impl Unpin for ThreeDSolution
impl UnsafeUnpin for ThreeDSolution
impl UnwindSafe for ThreeDSolution
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,
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