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/EP/ExtremePointPackingSequenceDecoder3D.cs

    r9593 r9596  
    4141  [Item("Identical bin, three dimensional, extreme points based decoder for the PackingSequence encoding.", "<Description missing...>")]
    4242  [StorableClass]
    43   public class ExtremePointPackingSequenceDecoder3D : PackingSolutionDecoder<
    44       ThreeDimensionalPacking,
    45       CuboidPackingBin,
    46       CuboidPackingItem>, I3DPSDecoder {
    47 
    48     public ValueParameter<BoolValue> StackingConstraintsParameter {
    49       get { return (ValueParameter<BoolValue>)Parameters["StackingConstraint"]; }
    50     }
    51 
    52     public ExtremePointPackingSequenceDecoder3D ()
    53       : base() {
    54         Parameters.Add(new ValueParameter<BoolValue>("StackingConstraint", "A flag determining whether stackingconstraints should be enforced or not."));
    55     }
     43  public class ExtremePointPackingSequenceDecoder3D : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>, I3DPSDecoder {
     44    public ExtremePointPackingSequenceDecoder3D () : base() {}
    5645    [StorableConstructor]
    5746    protected ExtremePointPackingSequenceDecoder3D (bool deserializing) : base(deserializing) { }
     
    6554
    6655    public override PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
    67 
    6856      var solution = encodedSolution as PackingSequenceEncoding;
    6957      if (solution == null) throw new InvalidOperationException("Encoding is not of type PackingSequence");
    70 
    71       PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> result =
    72         new PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>(binMeasures);
    73 
    74       result.BinPackings = ThreeDimensionalPackingFunctions.ExtremePointBasedPacking(solution, itemMeasures, binMeasures, StackingConstraintsParameter.Value.Value);
    75 
     58      PackingPlan3D result = new PackingPlan3D(binMeasures, true, StackingConstraintsParameter.Value.Value);
     59      result.Pack(solution, itemMeasures);
    7660      return result;
    7761    }
Note: See TracChangeset for help on using the changeset viewer.