Ignore:
Timestamp:
07/20/16 14:02:36 (5 years ago)
Author:
gkronber
Message:

#1966: refactoring of bin packing implementation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/DBL/DeepestBottomLeftPackingSequenceDecoder.cs

    r14049 r14128  
    2424using HeuristicLab.Core;
    2525using HeuristicLab.Common;
    26 using HeuristicLab.Encodings.PackingEncoding.PackingSequence;
    2726using HeuristicLab.Problems.BinPacking;
    2827using HeuristicLab.Encodings.PackingEncoding;
     28using HeuristicLab.Encodings.PermutationEncoding;
    2929
    3030namespace HeuristicLab.Problems.BinPacking3D {
     
    3232  [StorableClass]
    3333  public class DeepestBottomLeftPackingSequenceDecoder : PackingSolutionDecoder<PackingPosition, PackingShape, PackingItem>, I3DPSDecoder {
    34     public DeepestBottomLeftPackingSequenceDecoder(): base() {}
     34    public DeepestBottomLeftPackingSequenceDecoder() : base() { }
    3535    [StorableConstructor]
    3636    protected DeepestBottomLeftPackingSequenceDecoder(bool deserializing) : base(deserializing) { }
     
    4343
    4444    public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    45       var solution = encodedSolution as PackingSequenceEncoding;
    46       if (solution == null) throw new InvalidOperationException("Encoding is not of type PackingSequence");
     45      var solution = encodedSolution as Permutation;
     46      if (solution == null) throw new InvalidOperationException("Encoding is not of type Permutation");
    4747      Solution result = new Solution(binMeasures);
    4848      result.Pack(solution, itemMeasures);
Note: See TracChangeset for help on using the changeset viewer.