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 more