Changeset 9596 for branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/2D/EP
- Timestamp:
- 06/07/13 01:20:12 (11 years ago)
- Location:
- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/2D/EP
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/2D/EP/ExtremePointGroupingVectorDecoder2D.cs
r9593 r9596 41 41 [Item("Identical bin, two dimensional, extreme points based decoder for the GroupingVector encoding.", "<Description missing...>")] 42 42 [StorableClass] 43 public class ExtremePointGroupingVectorDecoder2D : PackingSolutionDecoder< 44 TwoDimensionalPacking, 45 RectangularPackingBin, 46 RectangularPackingItem>, I2DGVDecoder { 47 48 public ExtremePointGroupingVectorDecoder2D () 49 : base() { 50 } 43 public class ExtremePointGroupingVectorDecoder2D : PackingSolutionDecoder<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem>, I2DGVDecoder { 44 public ExtremePointGroupingVectorDecoder2D () : base() {} 51 45 [StorableConstructor] 52 46 protected ExtremePointGroupingVectorDecoder2D (bool deserializing) : base(deserializing) { } … … 59 53 60 54 public static PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem> Decode(GroupingVectorEncoding solution, RectangularPackingBin binMeasures, ItemList<RectangularPackingItem> itemMeasures) { 61 PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem> result = 62 new PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem>(binMeasures); 63 64 result.BinPackings = TwoDimensionalPackingFunctions.ExtremePointBasedPacking(solution, itemMeasures, binMeasures);//ExtremPointsFunctions2D.ExtremePointBasedPacking(solution, itemMeasures, binMeasures); 65 55 PackingPlan2D result = new PackingPlan2D(binMeasures, true, false); 56 result.Pack(solution, itemMeasures); 66 57 return result; 67 58 } 68 59 69 60 public override PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingBin binMeasures, ItemList<RectangularPackingItem> itemMeasures) { 70 71 61 var solution = encodedSolution as GroupingVectorEncoding; 72 62 if (solution == null) throw new InvalidOperationException("Encoding is not of type GroupingVector"); 73 74 63 return Decode(solution, binMeasures, itemMeasures); 75 64 } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/2D/EP/ExtremePointMultiComponentVectorDecoder2D.cs
r9593 r9596 42 42 [Item("Identical bin, two dimensional, extreme points based decoder for the MultiComponentVector encoding.", "<Description missing...>")] 43 43 [StorableClass] 44 public class ExtremePointMultiComponentVectorDecoder2D : PackingSolutionDecoder< 45 TwoDimensionalPacking, 46 RectangularPackingBin, 47 RectangularPackingItem>, I2DMCVDecoder { 48 49 public ExtremePointMultiComponentVectorDecoder2D () 50 : base() { 51 } 44 public class ExtremePointMultiComponentVectorDecoder2D : PackingSolutionDecoder<TwoDimensionalPacking,RectangularPackingBin, RectangularPackingItem>, I2DMCVDecoder { 45 public ExtremePointMultiComponentVectorDecoder2D () : base() {} 52 46 [StorableConstructor] 53 47 protected ExtremePointMultiComponentVectorDecoder2D (bool deserializing) : base(deserializing) { } … … 60 54 61 55 public static PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem> Decode(MultiComponentVectorEncoding solution, RectangularPackingBin binMeasures, ItemList<RectangularPackingItem> itemMeasures) { 62 PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem> result = 63 new PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem>(binMeasures); 64 65 result.BinPackings = TwoDimensionalPackingFunctions.ExtremePointBasedPacking(solution, itemMeasures, binMeasures);//ExtremPointsFunctions2D.ExtremePointBasedPacking(solution, itemMeasures, binMeasures); 66 56 PackingPlan2D result = new PackingPlan2D(binMeasures, true, false); 57 result.Pack(solution, itemMeasures); 67 58 return result; 68 59 } 69 60 70 61 public override PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingBin binMeasures, ItemList<RectangularPackingItem> itemMeasures) { 71 72 62 var solution = encodedSolution as MultiComponentVectorEncoding; 73 63 if (solution == null) throw new InvalidOperationException("Encoding is not of type MultiComponentVector"); 74 75 64 return Decode(solution, binMeasures, itemMeasures); 76 65 } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Decoders/2D/EP/ExtremePointPackingSequenceDecoder2D.cs
r9593 r9596 40 40 [Item("Identical bin, two dimensional, extreme points based decoder for the PackingSequence encoding.", "<Description missing...>")] 41 41 [StorableClass] 42 public class ExtremePointPackingSequenceDecoder2D : PackingSolutionDecoder< 43 TwoDimensionalPacking, 44 RectangularPackingBin, 45 RectangularPackingItem>, I2DPSDecoder { 46 47 public ExtremePointPackingSequenceDecoder2D () 48 : base() { 49 } 42 public class ExtremePointPackingSequenceDecoder2D : PackingSolutionDecoder<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem>, I2DPSDecoder { 43 public ExtremePointPackingSequenceDecoder2D () : base() {} 50 44 [StorableConstructor] 51 45 protected ExtremePointPackingSequenceDecoder2D (bool deserializing) : base(deserializing) { } … … 59 53 60 54 public override PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingBin binMeasures, ItemList<RectangularPackingItem> itemMeasures) { 61 62 55 var solution = encodedSolution as PackingSequenceEncoding; 63 56 if (solution == null) throw new InvalidOperationException("Encoding is not of type PackingSequence"); 64 65 PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem> result = 66 new PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem>(binMeasures); 67 68 result.BinPackings = TwoDimensionalPackingFunctions.ExtremePointBasedPacking(solution, itemMeasures, binMeasures);//ExtremPointsFunctions2D.ExtremePointBasedPacking(solution, itemMeasures, binMeasures); 69 57 PackingPlan2D result = new PackingPlan2D(binMeasures, true, false); 58 result.Pack(solution, itemMeasures); 70 59 return result; 71 60 }
Note: See TracChangeset
for help on using the changeset viewer.