Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/21/16 14:33:53 (8 years ago)
Author:
gkronber
Message:

#1966: implemented 3d bin packing problems (using permutation and integer vector encoding) based on the 2d implementations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/IntegerVectorEncoding/IntegerVectorDecoderBase.cs

    r14151 r14153  
    3939
    4040
    41     public Solution Decode(IntegerVector intVec, PackingShape binShape, IList<PackingItem> items) {
     41    public virtual Solution Decode(IntegerVector intVec, PackingShape binShape, IList<PackingItem> items) {
    4242      var sequenceMatrix = IntegerVectorProblem.GenerateSequenceMatrix(intVec);
    4343      Solution result = CreateSolution(binShape);
     
    5454      var temp = new List<int>(remainingIDs);
    5555      foreach (int id in temp) {
    56         foreach (var bp in result.BinPackings) {
     56        foreach (BinPacking2D bp in result.BinPackings) {
    5757          var position = FindPositionForItem(bp, items[id]);
    5858          if (position != null) {
     
    7070      result.UpdateBinPackings();
    7171
    72       // gkronber: original implementation also updates the encoded solution
     72      // gkronber: original implementation by Helm also updates the encoded solution (TODO)
    7373      // var newSolution = new int[intVec.Length];
    7474      // int binIndex = 0;
     
    8484
    8585    protected abstract Solution CreateSolution(PackingShape binShape);
    86     protected abstract PackingPosition FindPositionForItem(BinPacking.BinPacking<PackingPosition, PackingShape, PackingItem> bp, PackingItem item);
    87     protected abstract BinPacking.BinPacking<PackingPosition, PackingShape, PackingItem> CreatePacking(Solution partialSolution, ref IList<int> remainingIDs, IList<PackingItem> items);
     86    protected abstract PackingPosition FindPositionForItem(BinPacking2D bp, PackingItem item);
     87    protected abstract BinPacking2D CreatePacking(Solution partialSolution, ref IList<int> remainingIDs, IList<PackingItem> items);
    8888  }
    8989}
Note: See TracChangeset for help on using the changeset viewer.