- Timestamp:
- 12/13/17 09:47:49 (7 years ago)
- 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 80 80 } 81 81 packingBin.PackItem(itemId, packingItem, position); 82 extremePointCreator.UpdateExtremePoints(packingBin, packingItem, position); 83 extremePointCreator.UpdateResidualSpace(packingBin, packingItem, position); 82 extremePointCreator.UpdateBinPacking(packingBin, packingItem, position); 84 83 } 85 84 86 85 /// <summary> 87 86 /// 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 101 101 foreach (BinPacking3D bp in packingList) { 102 102 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) { 105 105 continue; 106 106 } … … 118 118 /// <param name="ep"></param> 119 119 /// <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)); 124 124 } 125 125 }
Note: See TracChangeset
for help on using the changeset viewer.