Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/14/17 15:31:22 (7 years ago)
Author:
rhanghof
Message:

#2817

  • Added some unit tests
  • Enhanced the documentation
Location:
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer
Files:
5 edited

Legend:

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

    r15462 r15471  
    4444    /// <param name="items">A list of packing items which should be assigned to a bin</param>
    4545    /// <param name="useStackingConstraints">Flag for using stacking constraints</param>
    46     /// <returns></returns>
     46    /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
    4747    public abstract IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints);
    48 
    4948   
    50 
    5149    /// <summary>
    5250    /// Pack a given item into a given bin and updates the residual space and the extreme points
     
    7876        packingItem.TargetBin, packingItem.Weight, packingItem.Material);
    7977
    80       // The extremepoints are sortet by Z, X, Y
    81 
     78      // The extremepoints are sortet by Y / Z / X
    8279      return packingBin.ExtremePoints.Where(x => packingBin.IsPositionFeasible(newItem, x, useStackingConstraints)).FirstOrDefault();
    8380    }
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFactory.cs

    r15463 r15471  
    1616    /// </summary>
    1717    /// <param name="fittingMethod"></param>
    18     /// <returns></returns>
     18    /// <returns>Returns a new BinPacker depending on the given fitting method</returns>
    1919    public static BinPacker CreateBinPacker(FittingMethod fittingMethod) {
    2020      BinPacker binPacker = null;
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFirstFit.cs

    r15462 r15471  
    3838
    3939    /// <summary>
    40     /// Packs the items of the object by using a first fit algorithm into an amount of bins and returns them
     40    /// Packs the items of the object by using a first fit algorithm into an amount of bins and returns them.
    4141    /// </summary>
    4242    /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerFreeVolumeBestFit.cs

    r15462 r15471  
    3636    public BinPackerFreeVolumeBestFit() : base() { }
    3737
     38    /// <summary>
     39    /// Packs all items by using a free volume best fit strategy.
     40    /// If there is no bin packing item, a new one will be created an the current item will be packed into it.
     41    /// If there exists at least on bin packing item in the packing list they are being sortet by their free volume ascending.
     42    /// The current item will be packed into the bin packing with the fewest free volume and enought space for placing it.
     43    /// If an item could not be placed in any bin packing, a new one will be created for the item.
     44    /// </summary>
     45    /// <param name="sortedItems"></param>
     46    /// <param name="binShape"></param>
     47    /// <param name="items"></param>
     48    /// <param name="useStackingConstraints"></param>
     49    /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
    3850    public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints) {
    3951      IList<BinPacking3D> packingList = new List<BinPacking3D>();
    4052      IList<int> remainingIds = new List<int>(sortedItems);
    41 
    4253
    4354      foreach (int remainingId in remainingIds) {
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Packer/BinPackerResidualSpaceBestFit.cs

    r15462 r15471  
    3434  public class BinPackerResidualSpaceBestFit : BinPacker {
    3535
    36     public BinPackerResidualSpaceBestFit() : base() { }/*
    37     public BinPackerResidualSpaceBestFit(Permutation permutation, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints)
    38       : base(permutation, binShape, items, useStackingConstraints) { }
    39       */
     36    public BinPackerResidualSpaceBestFit() : base() { }
     37
    4038    /// <summary>
    4139    /// Packs the items into the bins by using a best fit residual space algorithm.
     
    4341    /// Each residual space belongs to an extreme point.
    4442    /// </summary>
    45     /// <returns></returns>
     43    /// <returns>Returns a collection of bin packing 3d objects. Each object represents a bin and the packed items</returns>
    4644    public override IList<BinPacking3D> PackItems(Permutation sortedItems, PackingShape binShape, IList<PackingItem> items, bool useStackingConstraints) {
    4745      IList<BinPacking3D> packingList = new List<BinPacking3D>();
Note: See TracChangeset for help on using the changeset viewer.