protected override PackingPosition FindPositionForItem(BinPacking3D bp, PackingItem item, bool useStackingConstraints)
 {
     return(bp.FindPositionBySliding(item, rotated: false));
 }
Exemplo n.º 2
0
 protected override PackingPosition FindPositionForItem(BinPacking3D bp, PackingItem item, bool useStackingConstraints)
 {
     return(bp.FindExtremePointForItem(item, rotated: false, stackingConstraints: useStackingConstraints));
 }
        public static IList <Tuple <BinPacking3D, PackingPosition, int> > GetResidualSpaceAllPoints(Solution solution, PackingItem item)
        {
            var result = new List <Tuple <BinPacking3D, PackingPosition, int> >();

            foreach (BinPacking3D bp in solution.Bins)
            {
                foreach (var ep in bp.ExtremePoints)
                {
                    var rs = bp.ResidualSpace[ep];
                    if (rs.Item1 < item.Width || rs.Item2 < item.Height || rs.Item3 < item.Depth)
                    {
                        continue;
                    }
                    result.Add(Tuple.Create(bp, ep, GetResidualMerit(rs, item, ep)));
                }
            }
            return(result);
        }
 private static int GetResidualMerit(Tuple <int, int, int> rs, PackingItem item, PackingPosition ep)
 {
     return((rs.Item1 - item.Width) +
            (rs.Item2 - item.Height) +
            (rs.Item3 - item.Depth));
 }
 protected abstract PackingPosition FindPositionForItem(BinPacking3D bp, PackingItem item, bool useStackingConstraints);
Exemplo n.º 6
0
 protected PackingItem(PackingItem original, Cloner cloner)
   : base(original, cloner) {
   RegisterEvents();
 }
Exemplo n.º 7
0
 protected PackingItem(PackingItem original, Cloner cloner)
     : base(original, cloner)
 {
     RegisterEvents();
 }
 protected override PackingPosition FindPositionForItem(BinPacking3D bp, PackingItem item, bool useStackingConstraints) {
   return bp.FindExtremePointForItem(item, rotated: false, stackingConstraints: useStackingConstraints);
 }
 protected override PackingPosition FindPositionForItem(BinPacking3D bp, PackingItem item, bool useStackingConstraints) {
   return bp.FindPositionBySliding(item, rotated: false);
 }