Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/07/13 01:20:12 (11 years ago)
Author:
jhelm
Message:

#1966: More refactoring; Added more sophisticated structures for packing-plan and bin-packing representation; Transferred parts of the decoding-algorithms to these structures; Did some more refactoring and cleanup;

File:
1 edited

Legend:

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

    r9593 r9596  
    3838
    3939namespace HeuristicLab.Problems.BinPacking.Decoders {
    40   [Item("Identical bin, three dimensional, direct permutation decoder", "<Description missing...>")]
     40  [Item("Identical bin, three dimensional, PackingSequence-decoder", "<Description missing...>")]
    4141  [StorableClass]
    42   public class DeepestBottomLeftPackingSequenceDecoder : PackingSolutionDecoder<
    43       ThreeDimensionalPacking,
    44       CuboidPackingBin,
    45       CuboidPackingItem>, I3DPSDecoder {
    46 
    47     public DeepestBottomLeftPackingSequenceDecoder()
    48       : base() {
    49         //EncodedSolutionParameter.ActualName = "EncodedSolution";
    50     }
     42  public class DeepestBottomLeftPackingSequenceDecoder : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>, I3DPSDecoder {
     43    public DeepestBottomLeftPackingSequenceDecoder(): base() {}
    5144    [StorableConstructor]
    5245    protected DeepestBottomLeftPackingSequenceDecoder(bool deserializing) : base(deserializing) { }
     
    5851    }
    5952
    60 
    6153    public override PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
    62 
    6354      var solution = encodedSolution as PackingSequenceEncoding;
    6455      if (solution == null) throw new InvalidOperationException("Encoding is not of type PackingSequence");
    65 
    66       PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> result =
    67         new PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>(binMeasures);
    68 
    69       result.BinPackings = ThreeDimensionalPackingFunctions.DeepestLeftBottomPacking(solution, binMeasures, itemMeasures);
    70 
     56      PackingPlan3D result = new PackingPlan3D(binMeasures);
     57      result.Pack(solution, itemMeasures);
    7158      return result;
    7259    }
Note: See TracChangeset for help on using the changeset viewer.