Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/13/17 09:47:49 (7 years ago)
Author:
rhanghof
Message:

#2817:

  • Changed the calculation algorithm for creating extreme points by using line based projection
  • Changed the calculation of the residual spaces for line based projection
Location:
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPacker.cs

    r15488 r15520  
    8080      }
    8181      packingBin.PackItem(itemId, packingItem, position);
    82       extremePointCreator.UpdateExtremePoints(packingBin, packingItem, position);
    83       extremePointCreator.UpdateResidualSpace(packingBin, packingItem, position);
     82      extremePointCreator.UpdateBinPacking(packingBin, packingItem, position);
    8483    }
    85 
     84       
    8685    /// <summary>
    8786    /// This method tries to find a valid packing position for an given item in a given packing bin
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerResidualSpaceBestFit.cs

    r15488 r15520  
    101101      foreach (BinPacking3D bp in packingList) {
    102102        foreach (var ep in bp.ExtremePoints) {
    103           var rs = bp.ResidualSpace[ep];
    104           if (rs.Item1 < item.Width || rs.Item2 < item.Height || rs.Item3 < item.Depth) {
     103          var rs = bp.ResidualSpaces[ep];
     104          if (rs.Width < item.Width || rs.Height < item.Height || rs.Depth < item.Depth) {
    105105            continue;
    106106          }
     
    118118    /// <param name="ep"></param>
    119119    /// <returns></returns>
    120     private static int CalculateResidualMerit(Tuple<int, int, int> rs, PackingItem item, PackingPosition ep) {
    121       return ((rs.Item1 - item.Width) +
    122           (rs.Item2 - item.Height) +
    123           (rs.Item3 - item.Depth));
     120    private static int CalculateResidualMerit(ResidualSpace rs, PackingItem item, PackingPosition ep) {
     121      return ((rs.Width - item.Width) +
     122          (rs.Height - item.Height) +
     123          (rs.Depth - item.Depth));
    124124    }
    125125  }
Note: See TracChangeset for help on using the changeset viewer.