Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/15/17 12:30:13 (7 years ago)
Author:
rhanghof
Message:

#2817:
-Added unit tests
-Refactoring of bp 3D

Location:
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer
Files:
4 edited

Legend:

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

    r15471 r15473  
    5454    /// <param name="packingItem"></param>
    5555    /// <param name="position"></param>
    56     protected void PackItem(ref BinPacking3D packingBin, int itemId, PackingItem packingItem, PackingPosition position, bool useStackingConstraints) {
     56    protected virtual void PackItem(BinPacking3D packingBin, int itemId, PackingItem packingItem, PackingPosition position, bool useStackingConstraints) {
    5757
    5858      packingBin.PackItem(itemId, packingItem, position);
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFirstFit.cs

    r15471 r15473  
    6767        // if a valid packing position could be found, the current item can be added to the given bin
    6868        if (position != null) {
    69           PackItem(ref packingBin, itemId, items[itemId], position, useStackingConstraints);
     69          PackItem(packingBin, itemId, items[itemId], position, useStackingConstraints);
    7070          remainingIds.Remove(itemId);
    7171        }
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFreeVolumeBestFit.cs

    r15471 r15473  
    6464          var bin = packingBin;
    6565          if (positionFound) {
    66             PackItem(ref bin, remainingId, item, position, useStackingConstraints);
     66            PackItem(bin, remainingId, item, position, useStackingConstraints);
    6767            break;
    6868          }
     
    7777          }
    7878
    79           PackItem(ref packingBin, remainingId, item, position, useStackingConstraints);
     79          PackItem(packingBin, remainingId, item, position, useStackingConstraints);
    8080          packingList.Add(packingBin);
    8181        }
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerResidualSpaceBestFit.cs

    r15471 r15473  
    5656          if (point.Item1.IsPositionFeasible(item, point.Item2, useStackingConstraints)) {
    5757            var binPacking = point.Item1;
    58             PackItem(ref binPacking, remainingId, item, point.Item2, useStackingConstraints);
     58            PackItem(binPacking, remainingId, item, point.Item2, useStackingConstraints);
    5959            packed = true;
    6060            break;
     
    6666          var position = FindPackingPositionForItem(binPacking, item, useStackingConstraints, rotated);
    6767          if (position != null) {
    68             PackItem(ref binPacking, remainingId, item, position, useStackingConstraints);
     68            PackItem(binPacking, remainingId, item, position, useStackingConstraints);
    6969          } else {
    7070            throw new InvalidOperationException("Item " + remainingId + " cannot be packed in an empty bin.");
Note: See TracChangeset for help on using the changeset viewer.