protected override BinPacking3D CreatePacking( Solution partialSolution, ref IList <int> remainingIDs, IList <PackingItem> items, bool useStackingConstraints) { var bp = new BinPacking3D(partialSolution.BinShape); bp.SlidingBasedPacking(ref remainingIDs, items); return(bp); }
public Solution Decode(Permutation permutation, PackingShape binShape, IList <PackingItem> items, bool useStackingConstraints) { Solution result = new Solution(binShape, useExtremePoints: false, stackingConstraints: useStackingConstraints); IList <int> remainingIDs = new List <int>(permutation); while (remainingIDs.Count > 0) { var bp = new BinPacking3D(binShape); bp.SlidingBasedPacking(ref remainingIDs, items, useStackingConstraints); result.Bins.Add(bp); } result.UpdateBinPackings(); return(result); }