Ignore:
Timestamp:
12/13/17 09:47:49 (22 months 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
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.