Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/12/17 14:10:55 (7 years ago)
Author:
dsouravl
Message:

#2762: worked on best fit heuristics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/2D/BinPacking2D.cs

    r14162 r14976  
    147147      }
    148148    }
     149    public override bool ExtremePointBasedPacking(int itemID, IList<PackingItem> items, bool stackingConstraints) {
     150      var item = items[itemID];
     151      var positionFound = FindExtremePointForItem(item, false, stackingConstraints);
     152      if (positionFound != null) {
     153        PackItem(itemID, item, positionFound);
     154        return true;
     155      }
     156      return false;
     157    }
     158   
    149159    public override void ExtremePointBasedPacking(ref IList<int> sequence, IList<PackingItem> items, bool stackingConstraints, Dictionary<int, bool> rotationArray) {
    150160      var temp = new List<int>(sequence);
     
    183193      throw new NotSupportedException();
    184194    }
    185 
    186195    protected override void InitializeOccupationLayers() {
    187196      for (int i = 0; i * 10 <= BinShape.Width; i += 1) {
Note: See TracChangeset for help on using the changeset viewer.