Changeset 14977


Ignore:
Timestamp:
05/12/17 14:55:52 (4 years ago)
Author:
dsouravl
Message:

#2762: worked on best fit heuristics, update of residual space heuristic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/3D/BinPacking3D.cs

    r14976 r14977  
    349349      foreach (var ep in ExtremePoints) {
    350350        if (ep.Z >= pos.Z && ep.Z <= pos.Z + item.Depth) {
    351           if (ep.X <= pos.X && ep.Y >= pos.Y && ep.Y <= pos.Y + item.Height) {
     351          if (ep.X <= pos.X && ep.Y > pos.Y && ep.Y < pos.Y + item.Height) {
    352352            var diff = pos.X - ep.X;
    353353            var newRSX = ResidualSpace[ep].Item1 < diff ? ResidualSpace[ep].Item1 : diff;
    354354            ResidualSpace[ep] = Tuple.Create(newRSX, ResidualSpace[ep].Item2, ResidualSpace[ep].Item3);
    355355          }
    356           if (ep.Y <= pos.Y && ep.X >= pos.X && ep.X <= pos.X + item.Width) {
     356          if (ep.Y <= pos.Y && ep.X > pos.X && ep.X < pos.X + item.Width) {
    357357            var diff = pos.Y - ep.Y;
    358358            var newRSY = ResidualSpace[ep].Item2 < diff ? ResidualSpace[ep].Item2 : diff;
     
    361361        }
    362362        if (ep.Z <= pos.Z &&
    363           ep.Y >= pos.Y && ep.Y <= pos.Y + item.Height &&
    364           ep.X >= pos.X && ep.X <= pos.X + item.Width) {
     363          ep.Y > pos.Y && ep.Y < pos.Y + item.Height &&
     364          ep.X > pos.X && ep.X < pos.X + item.Width) {
    365365            var diff = pos.Z - ep.Z;
    366366            var newRSZ = ResidualSpace[ep].Item3 < diff ? ResidualSpace[ep].Item3 : diff;
Note: See TracChangeset for help on using the changeset viewer.