Changeset 14045
- Timestamp:
- 07/12/16 18:23:13 (8 years ago)
- Location:
- branches/HeuristicLab.BinPacking
- Files:
-
- 49 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/BinPacking2D.cs
r14040 r14045 28 28 using HeuristicLab.Common; 29 29 using HeuristicLab.Problems.BinPacking.Dimensions; 30 using HeuristicLab.Problems.BinPacking.PackingBin; 30 31 using HeuristicLab.Problems.BinPacking.Shapes; 31 32 32 33 namespace HeuristicLab.Encodings.PackingEncoding.PackingPlan { 33 34 [Item("BinPacking2D", "Represents a single-bin packing for a 2D bin-packing problem.")] 34 35 [StorableClass] 35 public class BinPacking2D : BinPacking<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> {36 37 public BinPacking2D(RectangularPacking BinbinMeasures)36 public class BinPacking2D : BinPacking<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> { 37 38 public BinPacking2D(RectangularPackingShape binMeasures) 38 39 : base(binMeasures) { 39 40 ExtremePoints = new SortedSet<TwoDimensionalPacking>(new EPComparer2D()); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Decoders/BL/BottomLeftGroupingVectorDecoder.cs
r13607 r14045 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Problems.BinPacking.Dimensions; 26 using HeuristicLab.Problems.BinPacking.PackingBin; 26 27 27 using HeuristicLab.Problems.BinPacking.PackingItem; 28 28 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; … … 31 31 using HeuristicLab.Encodings.PackingEncoding.GroupingVector; 32 32 using HeuristicLab.Problems.BinPacking2D; 33 using HeuristicLab.Problems.BinPacking.Shapes; 33 34 34 35 namespace HeuristicLab.Problems.BinPacking.Decoders { 35 36 [Item("Identical bin two dimensional grouping vector decoder", "<Description missing...>")] 36 37 [StorableClass] 37 public class BottomLeftGroupingVectorDecoder : PackingSolutionDecoder<TwoDimensionalPacking, RectangularPacking Bin,RectangularPackingItem>, I2DGVDecoder {38 public class BottomLeftGroupingVectorDecoder : PackingSolutionDecoder<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem>, I2DGVDecoder { 38 39 public BottomLeftGroupingVectorDecoder() : base() {} 39 40 [StorableConstructor] … … 46 47 } 47 48 48 public override PackingPlan<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingBinbinMeasures, ItemList<RectangularPackingItem> itemMeasures) {49 public override PackingPlan<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) { 49 50 var solution = encodedSolution as GroupingVectorEncoding; 50 51 if (solution == null) throw new InvalidOperationException("Encoding is not of type GroupingVector"); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Decoders/BL/BottomLeftMultiComponentVectorDecoder.cs
r13606 r14045 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Problems.BinPacking.Dimensions; 26 using HeuristicLab.Problems.BinPacking.PackingBin;27 26 using HeuristicLab.Problems.BinPacking.PackingItem; 28 27 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; … … 31 30 using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector; 32 31 using HeuristicLab.Problems.BinPacking2D; 32 using HeuristicLab.Problems.BinPacking.Shapes; 33 33 34 34 namespace HeuristicLab.Problems.BinPacking.Decoders { 35 35 [Item("Identical bin two dimensional multi component vector decoder", "<Description missing...>")] 36 36 [StorableClass] 37 public class BottomLeftMultiComponentVectorDecoder : PackingSolutionDecoder<TwoDimensionalPacking,RectangularPacking Bin, RectangularPackingItem>, I2DMCVDecoder {37 public class BottomLeftMultiComponentVectorDecoder : PackingSolutionDecoder<TwoDimensionalPacking,RectangularPackingShape, RectangularPackingItem>, I2DMCVDecoder { 38 38 public BottomLeftMultiComponentVectorDecoder() : base() {} 39 39 [StorableConstructor] … … 46 46 } 47 47 48 public override PackingPlan<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingBinbinMeasures, ItemList<RectangularPackingItem> itemMeasures) {48 public override PackingPlan<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) { 49 49 var solution = encodedSolution as MultiComponentVectorEncoding; 50 50 if (solution == null) throw new InvalidOperationException("Encoding is not of type MultiComponent Vector"); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Decoders/BL/BottomLeftPackingSequenceDecoder.cs
r13607 r14045 25 25 using HeuristicLab.Core; 26 26 using HeuristicLab.Problems.BinPacking.Dimensions; 27 using HeuristicLab.Problems.BinPacking.PackingBin; 27 28 28 using HeuristicLab.Problems.BinPacking.PackingItem; 29 29 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; … … 32 32 using HeuristicLab.Problems.BinPacking.Interfaces; 33 33 using HeuristicLab.Problems.BinPacking2D; 34 using HeuristicLab.Problems.BinPacking.Shapes; 34 35 35 36 namespace HeuristicLab.Problems.BinPacking.Decoders { 36 37 [Item("Identical bin, two dimensional, direct permutation decoder", "<Description missing...>")] 37 38 [StorableClass] 38 public class BottomLeftPackingSequenceDecoder : PackingSolutionDecoder<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem>, I2DPSDecoder {39 public class BottomLeftPackingSequenceDecoder : PackingSolutionDecoder<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem>, I2DPSDecoder { 39 40 40 41 public BottomLeftPackingSequenceDecoder(): base() { } … … 48 49 } 49 50 50 public override PackingPlan<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingBinbinMeasures, ItemList<RectangularPackingItem> itemMeasures) {51 public override PackingPlan<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) { 51 52 var solution = encodedSolution as PackingSequenceEncoding; 52 53 if (solution == null) throw new InvalidOperationException("Encoding is not of type PackingSequence"); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Decoders/EP/ExtremePointGroupingVectorDecoder2D.cs
r13607 r14045 25 25 using HeuristicLab.Core; 26 26 using HeuristicLab.Problems.BinPacking.Dimensions; 27 using HeuristicLab.Problems.BinPacking.PackingBin; 27 28 28 using HeuristicLab.Problems.BinPacking.PackingItem; 29 29 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; … … 32 32 using HeuristicLab.Encodings.PackingEncoding.GroupingVector; 33 33 using HeuristicLab.Problems.BinPacking2D; 34 using HeuristicLab.Problems.BinPacking.Shapes; 34 35 35 36 namespace HeuristicLab.Problems.BinPacking.Decoders { 36 37 [Item("Identical bin, two dimensional, extreme points based decoder for the GroupingVector encoding.", "<Description missing...>")] 37 38 [StorableClass] 38 public class ExtremePointGroupingVectorDecoder2D : PackingSolutionDecoder<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem>, I2DGVDecoder {39 public class ExtremePointGroupingVectorDecoder2D : PackingSolutionDecoder<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem>, I2DGVDecoder { 39 40 public ExtremePointGroupingVectorDecoder2D () : base() {} 40 41 [StorableConstructor] … … 47 48 } 48 49 49 public static PackingPlan<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> Decode(GroupingVectorEncoding solution, RectangularPackingBinbinMeasures, ItemList<RectangularPackingItem> itemMeasures) {50 public static PackingPlan<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> Decode(GroupingVectorEncoding solution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) { 50 51 PackingPlan2D result = new PackingPlan2D(binMeasures, true, false); 51 52 result.Pack(solution, itemMeasures); … … 53 54 } 54 55 55 public override PackingPlan<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingBinbinMeasures, ItemList<RectangularPackingItem> itemMeasures) {56 public override PackingPlan<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) { 56 57 var solution = encodedSolution as GroupingVectorEncoding; 57 58 if (solution == null) throw new InvalidOperationException("Encoding is not of type GroupingVector"); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Decoders/EP/ExtremePointMultiComponentVectorDecoder2D.cs
r13607 r14045 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Problems.BinPacking.Dimensions; 26 using HeuristicLab.Problems.BinPacking.PackingBin; 26 27 27 using HeuristicLab.Problems.BinPacking.PackingItem; 28 28 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; … … 31 31 using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector; 32 32 using HeuristicLab.Problems.BinPacking2D; 33 using HeuristicLab.Problems.BinPacking.Shapes; 33 34 34 35 namespace HeuristicLab.Problems.BinPacking.Decoders { 35 36 [Item("Identical bin, two dimensional, extreme points based decoder for the MultiComponentVector encoding.", "<Description missing...>")] // TODO 36 37 [StorableClass] 37 public class ExtremePointMultiComponentVectorDecoder2D : PackingSolutionDecoder<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem>, I2DMCVDecoder {38 public class ExtremePointMultiComponentVectorDecoder2D : PackingSolutionDecoder<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem>, I2DMCVDecoder { 38 39 public ExtremePointMultiComponentVectorDecoder2D () : base() {} 39 40 [StorableConstructor] … … 46 47 } 47 48 48 public static PackingPlan<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> Decode(MultiComponentVectorEncoding solution, RectangularPackingBinbinMeasures, ItemList<RectangularPackingItem> itemMeasures) {49 public static PackingPlan<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> Decode(MultiComponentVectorEncoding solution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) { 49 50 PackingPlan2D result = new PackingPlan2D(binMeasures, true, false); 50 51 result.Pack(solution, itemMeasures); … … 52 53 } 53 54 54 public override PackingPlan<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingBinbinMeasures, ItemList<RectangularPackingItem> itemMeasures) {55 public override PackingPlan<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) { 55 56 var solution = encodedSolution as MultiComponentVectorEncoding; 56 57 if (solution == null) throw new InvalidOperationException("Encoding is not of type MultiComponentVector"); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Decoders/EP/ExtremePointPackingSequenceDecoder2D.cs
r13607 r14045 25 25 using HeuristicLab.Core; 26 26 using HeuristicLab.Problems.BinPacking.Dimensions; 27 using HeuristicLab.Problems.BinPacking.PackingBin;28 27 using HeuristicLab.Problems.BinPacking.PackingItem; 29 28 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; … … 32 31 using HeuristicLab.Problems.BinPacking.Interfaces; 33 32 using HeuristicLab.Problems.BinPacking2D; 33 using HeuristicLab.Problems.BinPacking.Shapes; 34 34 35 35 namespace HeuristicLab.Problems.BinPacking.Decoders { 36 36 [Item("Identical bin, two dimensional, extreme points based decoder for the PackingSequence encoding.", "<Description missing...>")] // TODO 37 37 [StorableClass] 38 public class ExtremePointPackingSequenceDecoder2D : PackingSolutionDecoder<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem>, I2DPSDecoder {38 public class ExtremePointPackingSequenceDecoder2D : PackingSolutionDecoder<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem>, I2DPSDecoder { 39 39 public ExtremePointPackingSequenceDecoder2D () : base() {} 40 40 [StorableConstructor] … … 48 48 49 49 50 public override PackingPlan<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingBinbinMeasures, ItemList<RectangularPackingItem> itemMeasures) {50 public override PackingPlan<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) { 51 51 var solution = encodedSolution as PackingSequenceEncoding; 52 52 if (solution == null) throw new InvalidOperationException("Encoding is not of type PackingSequence"); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/HeuristicLab.Problems.BinPacking2D-3.3.csproj
r13611 r14045 177 177 <Compile Include="Properties\AssemblyInfo.cs" /> 178 178 <Compile Include="RectangularIdenticalBinPackingProblem.cs" /> 179 <Compile Include="RectangularPackingBin.cs" />180 179 <Compile Include="RectangularPackingItem.cs" /> 181 180 <Compile Include="RectangularPackingShape.cs" /> -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/MoveEvaluators/PackingMoveEvaluator2DGV.cs
r13607 r14045 26 26 using HeuristicLab.Problems.BinPacking.Dimensions; 27 27 using HeuristicLab.Problems.BinPacking.Interfaces; 28 using HeuristicLab.Problems.BinPacking.PackingBin; 28 29 29 using HeuristicLab.Problems.BinPacking.PackingItem; 30 using HeuristicLab.Problems.BinPacking.Shapes; 30 31 using HeuristicLab.Problems.BinPacking2D.Interfaces; 31 32 … … 33 34 [Item("GroupingVectorMoveEvaluator2D", "Class for evaluating packing moves for 2dimensional problems.")] 34 35 [StorableClass] 35 public class PackingMoveEvaluator2DGV : PackingMoveEvaluator<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem>, ISingleObjectiveMoveEvaluator, IGroupingVectorMoveOperator, I2DOperator {36 public class PackingMoveEvaluator2DGV : PackingMoveEvaluator<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem>, ISingleObjectiveMoveEvaluator, IGroupingVectorMoveOperator, I2DOperator { 36 37 [StorableConstructor] 37 38 protected PackingMoveEvaluator2DGV(bool deserializing) : base(deserializing) { } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/MoveEvaluators/PackingMoveEvaluator2DMCV.cs
r13607 r14045 26 26 using HeuristicLab.Problems.BinPacking.Dimensions; 27 27 using HeuristicLab.Problems.BinPacking.Interfaces; 28 using HeuristicLab.Problems.BinPacking.PackingBin; 28 29 29 using HeuristicLab.Problems.BinPacking.PackingItem; 30 using HeuristicLab.Problems.BinPacking.Shapes; 30 31 using HeuristicLab.Problems.BinPacking2D.Interfaces; 31 32 … … 33 34 [Item("MultiComponentVectorMoveEvaluator2D", "Class for evaluating packing moves for 2dimensional problems.")] 34 35 [StorableClass] 35 public class PackingMoveEvaluator2DMCV : PackingMoveEvaluator<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem>, ISingleObjectiveMoveEvaluator, IMultiComponentVectorMoveOperator, I2DOperator {36 public class PackingMoveEvaluator2DMCV : PackingMoveEvaluator<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem>, ISingleObjectiveMoveEvaluator, IMultiComponentVectorMoveOperator, I2DOperator { 36 37 [StorableConstructor] 37 38 protected PackingMoveEvaluator2DMCV(bool deserializing) : base(deserializing) { } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/MoveEvaluators/PackingMoveEvaluator2DPS.cs
r13607 r14045 26 26 using HeuristicLab.Problems.BinPacking.Dimensions; 27 27 using HeuristicLab.Problems.BinPacking.Interfaces; 28 using HeuristicLab.Problems.BinPacking.PackingBin; 28 29 29 using HeuristicLab.Problems.BinPacking.PackingItem; 30 using HeuristicLab.Problems.BinPacking.Shapes; 30 31 using HeuristicLab.Problems.BinPacking2D.Interfaces; 31 32 … … 33 34 [Item("PackingSequenceMoveEvaluator2D", "Class for evaluating packing moves for 2dimensional problems.")] 34 35 [StorableClass] 35 public class PackingMoveEvaluator2DPS : PackingMoveEvaluator<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem>, ISingleObjectiveMoveEvaluator, IPackingSequenceMoveOperator, I2DOperator {36 public class PackingMoveEvaluator2DPS : PackingMoveEvaluator<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem>, ISingleObjectiveMoveEvaluator, IPackingSequenceMoveOperator, I2DOperator { 36 37 [StorableConstructor] 37 38 protected PackingMoveEvaluator2DPS(bool deserializing) : base(deserializing) { } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/PackingPlan2D.cs
r13611 r14045 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 using HeuristicLab.Problems.BinPacking.Dimensions; 27 using HeuristicLab.Problems.BinPacking.PackingBin; 27 28 28 using HeuristicLab.Problems.BinPacking.PackingItem; 29 using HeuristicLab.Problems.BinPacking.Shapes; 29 30 30 31 namespace HeuristicLab.Problems.BinPacking2D { 31 32 [Item("PackingPlan2D", "Represents a solution for a 2D bin packing problem.")] 32 33 [StorableClass] 33 public class PackingPlan2D : PackingPlan<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> {34 public PackingPlan2D(RectangularPacking BinbinMeasures) : this(binMeasures, false, false) { }35 public PackingPlan2D(RectangularPacking BinbinMeasures, bool useExtremePoints, bool stackingConstraints) : base(binMeasures, useExtremePoints, stackingConstraints) { }34 public class PackingPlan2D : PackingPlan<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> { 35 public PackingPlan2D(RectangularPackingShape binMeasures) : this(binMeasures, false, false) { } 36 public PackingPlan2D(RectangularPackingShape binMeasures, bool useExtremePoints, bool stackingConstraints) : base(binMeasures, useExtremePoints, stackingConstraints) { } 36 37 [StorableConstructor] 37 38 protected PackingPlan2D(bool deserializing) : base(deserializing) { } … … 42 43 return new PackingPlan2D(this, cloner); 43 44 } 44 public override BinPacking<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> NewBinPacking() {45 public override BinPacking<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> NewBinPacking() { 45 46 return new Encodings.PackingEncoding.PackingPlan.BinPacking2D(BinMeasures); 46 47 } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/PackingRatioRectangularIdenticalBinEvaluator.cs
r13606 r14045 25 25 using HeuristicLab.Common; 26 26 using HeuristicLab.Problems.BinPacking.PackingItem; 27 using HeuristicLab.Problems.BinPacking.PackingBin;28 27 using HeuristicLab.Problems.BinPacking.Dimensions; 28 using HeuristicLab.Problems.BinPacking.Shapes; 29 29 30 30 namespace HeuristicLab.Problems.BinPacking.Evaluators { 31 31 [Item("Packing-Ratio Rectangular Identical-Bin Evaluator", "Represents an evaluation-algorithm for rectangular-shaped bin-packing problems with identical bins which calculates the ratio between packed and unpacked space. Found in Falkenauer:1996")] 32 32 [StorableClass] 33 public class PackingRatioRectangularIdenticalBinEvaluator : PackingRatioRegularIdenticalBinEvaluator<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> {33 public class PackingRatioRectangularIdenticalBinEvaluator : PackingRatioRegularIdenticalBinEvaluator<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> { 34 34 35 35 [StorableConstructor] -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/RectangularIdenticalBinPackingProblem.cs
r14040 r14045 22 22 using HeuristicLab.Problems.BinPacking.Dimensions; 23 23 using HeuristicLab.Problems.BinPacking.Interfaces; 24 using HeuristicLab.Problems.BinPacking.PackingBin; 24 25 25 using HeuristicLab.Problems.BinPacking.PackingItem; 26 26 using HeuristicLab.Core; … … 36 36 using HeuristicLab.Data; 37 37 using System; 38 using HeuristicLab.Problems.BinPacking.Shapes; 38 39 39 40 namespace HeuristicLab.Problems.BinPacking.Problem { … … 42 43 [Creatable(CreatableAttribute.Categories.CombinatorialProblems, Priority = 300)] 43 44 // TODO: only support 2d BPPData 44 public class RectangularIdenticalBinPackingProblem : BinPackingProblem<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem>, IProblemInstanceConsumer<BPPData>, IProblemInstanceExporter<BPPData> {45 public class RectangularIdenticalBinPackingProblem : BinPackingProblem<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem>, IProblemInstanceConsumer<BPPData>, IProblemInstanceExporter<BPPData> { 45 46 46 47 #region Default Instance … … 101 102 } 102 103 public RectangularIdenticalBinPackingProblem() : base( 103 new PackingPlanEvaluationAlgorithm<Permutation, TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem>()) {104 new PackingPlanEvaluationAlgorithm<Permutation, TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem>()) { 104 105 } 105 106 … … 107 108 public void Load(BPPData data) { 108 109 var realData = data as RealBPPData; 109 var binData = new RectangularPacking Bin(data.BinMeasures[0], data.BinMeasures[1]);110 var binData = new RectangularPackingShape(data.BinMeasures[0], data.BinMeasures[1]); 110 111 111 112 var itemData = new ItemList<RectangularPackingItem>(data.Items); 112 113 for (int j = 0; j < data.Items; j++) { 113 var bin = new RectangularPacking Bin(data.BinMeasures[0], data.BinMeasures[1]);114 var bin = new RectangularPackingShape(data.BinMeasures[0], data.BinMeasures[1]); 114 115 var item = new RectangularPackingItem(data.ItemMeasures[j][0], data.ItemMeasures[j][1], bin); 115 116 if (realData != null) { -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/RectangularPackingItem.cs
r14039 r14045 28 28 using HeuristicLab.Data; 29 29 using HeuristicLab.Parameters; 30 using HeuristicLab.Problems.BinPacking.PackingBin; 30 31 31 32 32 namespace HeuristicLab.Problems.BinPacking.PackingItem { … … 35 35 public class RectangularPackingItem : RectangularPackingShape, IPackingItem { 36 36 37 public RectangularPacking BinTargetBin {38 get { return ((IValueParameter<RectangularPacking Bin>)Parameters["TargetBin"]).Value; }39 set { ((IValueParameter<RectangularPacking Bin>)Parameters["TargetBin"]).Value = value; }37 public RectangularPackingShape TargetBin { 38 get { return ((IValueParameter<RectangularPackingShape>)Parameters["TargetBin"]).Value; } 39 set { ((IValueParameter<RectangularPackingShape>)Parameters["TargetBin"]).Value = value; } 40 40 } 41 41 … … 62 62 public RectangularPackingItem() 63 63 : base() { 64 Parameters.Add(new ValueParameter<RectangularPacking Bin>("TargetBin"));64 Parameters.Add(new ValueParameter<RectangularPackingShape>("TargetBin")); 65 65 Parameters.Add(new FixedValueParameter<DoubleValue>("Weight")); 66 66 Parameters.Add(new FixedValueParameter<IntValue>("Material")); 67 67 } 68 68 69 public RectangularPackingItem(int width, int height, RectangularPacking BintargetBin)69 public RectangularPackingItem(int width, int height, RectangularPackingShape targetBin) 70 70 : this() { 71 71 this.Width = width; 72 72 this.Height = height; 73 this.TargetBin = (RectangularPacking Bin)targetBin.Clone();73 this.TargetBin = (RectangularPackingShape)targetBin.Clone(); 74 74 } 75 75 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/RectangularPackingShape.cs
r14043 r14045 33 33 [Item("RectangularPackingShape", "Represents the rectangular measures (width, height) of a two-dimensional bin-packing object.")] 34 34 [StorableClass] 35 public abstractclass RectangularPackingShape : PackingShape<TwoDimensionalPacking>, IComparable<RectangularPackingShape> {35 public class RectangularPackingShape : PackingShape<TwoDimensionalPacking>, IComparable<RectangularPackingShape> { 36 36 public int Height { 37 37 get { return ((IFixedValueParameter<IntValue>)Parameters["Height"]).Value.Value; } … … 49 49 : base(original, cloner) { 50 50 } 51 p rotectedRectangularPackingShape()51 public RectangularPackingShape() 52 52 : base() { 53 53 Parameters.Add(new FixedValueParameter<IntValue>("Width")); 54 54 Parameters.Add(new FixedValueParameter<IntValue>("Height")); 55 55 } 56 p rotectedRectangularPackingShape(int width, int height)56 public RectangularPackingShape(int width, int height) 57 57 : this() { 58 58 this.Height = height; 59 59 this.Width = width; 60 } 61 62 public override IDeepCloneable Clone(Cloner cloner) { 63 return new RectangularPackingShape(this, cloner); 60 64 } 61 65 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/BinPacking3D.cs
r14038 r14045 27 27 using HeuristicLab.Common; 28 28 using HeuristicLab.Problems.BinPacking.Dimensions; 29 using HeuristicLab.Problems.BinPacking. PackingBin;29 using HeuristicLab.Problems.BinPacking.Shapes; 30 30 31 31 namespace HeuristicLab.Encodings.PackingEncoding.PackingPlan { 32 32 [Item("BinPacking3D", "Represents a single-bin packing for a 3D bin-packing problem.")] 33 33 [StorableClass] 34 public class BinPacking3D : BinPacking<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> {35 36 public BinPacking3D(CuboidPacking BinbinMeasures)34 public class BinPacking3D : BinPacking<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> { 35 36 public BinPacking3D(CuboidPackingShape binMeasures) 37 37 : base(binMeasures) { 38 38 ExtremePoints = new SortedSet<ThreeDimensionalPacking>(new EPComparer3D()); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/CuboidIdenticalBinPackingProblem.cs
r14040 r14045 22 22 using HeuristicLab.Problems.BinPacking.Dimensions; 23 23 using HeuristicLab.Problems.BinPacking.Interfaces; 24 using HeuristicLab.Problems.BinPacking.PackingBin; 24 25 25 using HeuristicLab.Problems.BinPacking.PackingItem; 26 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 36 36 using System; 37 37 using HeuristicLab.Data; 38 using HeuristicLab.Problems.BinPacking.Shapes; 38 39 39 40 namespace HeuristicLab.Problems.BinPacking.Problem { … … 42 43 [Creatable(CreatableAttribute.Categories.CombinatorialProblems, Priority = 310)] 43 44 // TODO don't support generic BPPData but only 3d BPPData 44 public class CuboidIdenticalBinPackingProblem : BinPackingProblem<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem>, IProblemInstanceConsumer<BPPData>, IProblemInstanceExporter<BPPData> {45 public class CuboidIdenticalBinPackingProblem : BinPackingProblem<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem>, IProblemInstanceConsumer<BPPData>, IProblemInstanceExporter<BPPData> { 45 46 46 47 … … 106 107 } 107 108 public CuboidIdenticalBinPackingProblem() : base( 108 new PackingPlanEvaluationAlgorithm<Permutation, ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem>()) {109 new PackingPlanEvaluationAlgorithm<Permutation, ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem>()) { 109 110 } 110 111 … … 113 114 public void Load(BPPData data) { 114 115 var realData = data as RealBPPData; 115 var binData = new CuboidPacking Bin(data.BinMeasures[0], data.BinMeasures[1], data.BinMeasures[2]);116 var binData = new CuboidPackingShape(data.BinMeasures[0], data.BinMeasures[1], data.BinMeasures[2]); 116 117 117 118 var itemData = new ItemList<CuboidPackingItem>(data.Items); 118 119 for (int j = 0; j < data.Items; j++) { 119 var bin = new CuboidPacking Bin(data.BinMeasures[0], data.BinMeasures[1], data.BinMeasures[2]);120 var bin = new CuboidPackingShape(data.BinMeasures[0], data.BinMeasures[1], data.BinMeasures[2]); 120 121 var item = new CuboidPackingItem(data.ItemMeasures[j][0], data.ItemMeasures[j][1], data.ItemMeasures[j][2], bin); 121 122 if (realData != null) { -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/CuboidPackingItem.cs
r13608 r14045 28 28 using HeuristicLab.Data; 29 29 using HeuristicLab.Parameters; 30 using HeuristicLab.Problems.BinPacking.PackingBin; 30 31 31 32 32 namespace HeuristicLab.Problems.BinPacking.PackingItem { … … 34 34 [StorableClass] 35 35 public class CuboidPackingItem : CuboidPackingShape, IPackingItem { 36 public IValueParameter<CuboidPacking Bin> TargetBinParameter {37 get { return (IValueParameter<CuboidPacking Bin>)Parameters["TargetBin"]; }36 public IValueParameter<CuboidPackingShape> TargetBinParameter { 37 get { return (IValueParameter<CuboidPackingShape>)Parameters["TargetBin"]; } 38 38 } 39 39 public IFixedValueParameter<DoubleValue> WeightParameter { … … 44 44 } 45 45 46 public CuboidPacking BinTargetBin {46 public CuboidPackingShape TargetBin { 47 47 get { return TargetBinParameter.Value; } 48 48 set { TargetBinParameter.Value = value; } … … 71 71 public CuboidPackingItem() 72 72 : base() { 73 Parameters.Add(new ValueParameter<CuboidPacking Bin>("TargetBin"));73 Parameters.Add(new ValueParameter<CuboidPackingShape>("TargetBin")); 74 74 Parameters.Add(new FixedValueParameter<DoubleValue>("Weight")); 75 75 Parameters.Add(new FixedValueParameter<IntValue>("Material")); … … 78 78 } 79 79 80 public CuboidPackingItem(int width, int height, int depth, CuboidPacking BintargetBin, double weight, int material)80 public CuboidPackingItem(int width, int height, int depth, CuboidPackingShape targetBin, double weight, int material) 81 81 : this() { 82 82 this.Width = width; … … 85 85 this.Weight = weight; 86 86 this.Material = material; 87 this.TargetBin = (CuboidPacking Bin)targetBin.Clone();87 this.TargetBin = (CuboidPackingShape)targetBin.Clone(); 88 88 } 89 89 90 public CuboidPackingItem(int width, int height, int depth, CuboidPacking BintargetBin)90 public CuboidPackingItem(int width, int height, int depth, CuboidPackingShape targetBin) 91 91 : this() { 92 92 this.Width = width; 93 93 this.Height = height; 94 94 this.Depth = depth; 95 this.TargetBin = (CuboidPacking Bin)targetBin.Clone();95 this.TargetBin = (CuboidPackingShape)targetBin.Clone(); 96 96 } 97 97 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/CuboidPackingShape.cs
r14043 r14045 32 32 [Item("CuboidPackingShape", "Represents the cuboid measures (width, height, depth) of a three-dimensional cuboidic bin-packing object.")] 33 33 [StorableClass] 34 public abstractclass CuboidPackingShape : PackingShape<ThreeDimensionalPacking>, IComparable<CuboidPackingShape> {34 public class CuboidPackingShape : PackingShape<ThreeDimensionalPacking>, IComparable<CuboidPackingShape> { 35 35 public IFixedValueParameter<IntValue> HeightParameter { 36 36 get { return (IFixedValueParameter<IntValue>)Parameters["Height"]; } … … 64 64 RegisterEvents(); 65 65 } 66 p rotectedCuboidPackingShape()66 public CuboidPackingShape() 67 67 : base() { 68 68 Parameters.Add(new FixedValueParameter<IntValue>("Width")); … … 73 73 } 74 74 75 p rotectedCuboidPackingShape(int width, int height, int depth)75 public CuboidPackingShape(int width, int height, int depth) 76 76 : this() { 77 77 this.Width = width; 78 78 this.Height = height; 79 79 this.Depth = depth; 80 } 81 82 public override IDeepCloneable Clone(Cloner cloner) { 83 return new CuboidPackingShape(this, cloner); 80 84 } 81 85 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/DBL/DeepestBottomLeftGroupingVectorDecoder.cs
r13032 r14045 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Problems.BinPacking.Dimensions; 26 using HeuristicLab.Problems.BinPacking.PackingBin; 26 27 27 using HeuristicLab.Problems.BinPacking.PackingItem; 28 28 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; … … 30 30 using HeuristicLab.Problems.BinPacking.Interfaces; 31 31 using HeuristicLab.Encodings.PackingEncoding.GroupingVector; 32 using HeuristicLab.Problems.BinPacking.Shapes; 32 33 33 34 namespace HeuristicLab.Problems.BinPacking.Decoders { 34 35 [Item("Identical bin, three dimensional, GroupingVector-decoder", "<Description missing...>")] 35 36 [StorableClass] 36 public class DeepestBottomLeftGroupingVectorDecoder : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem>, I3DGVDecoder {37 public class DeepestBottomLeftGroupingVectorDecoder : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem>, I3DGVDecoder { 37 38 public DeepestBottomLeftGroupingVectorDecoder() : base() {} 38 39 [StorableConstructor] … … 45 46 } 46 47 47 public override PackingPlan<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBinbinMeasures, ItemList<CuboidPackingItem> itemMeasures) {48 public override PackingPlan<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures) { 48 49 var solution = encodedSolution as GroupingVectorEncoding; 49 50 if (solution == null) throw new InvalidOperationException("Encoding is not of type GroupingVector"); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/DBL/DeepestBottomLeftMultiComponentVectorDecoder.cs
r13032 r14045 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Problems.BinPacking.Dimensions; 26 using HeuristicLab.Problems.BinPacking.PackingBin; 26 27 27 using HeuristicLab.Problems.BinPacking.PackingItem; 28 28 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; … … 30 30 using HeuristicLab.Problems.BinPacking.Interfaces; 31 31 using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector; 32 using HeuristicLab.Problems.BinPacking.Shapes; 32 33 33 34 namespace HeuristicLab.Problems.BinPacking.Decoders { 34 35 [Item("Identical bin, three dimensional, MultiComponentVector-decoder", "<Description missing...>")] 35 36 [StorableClass] 36 public class DeepestBottomLeftMultiComponentVectorDecoder : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem>, I3DMCVDecoder {37 public class DeepestBottomLeftMultiComponentVectorDecoder : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem>, I3DMCVDecoder { 37 38 public DeepestBottomLeftMultiComponentVectorDecoder() : base() { } 38 39 [StorableConstructor] … … 45 46 } 46 47 47 public override PackingPlan<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBinbinMeasures, ItemList<CuboidPackingItem> itemMeasures) {48 public override PackingPlan<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures) { 48 49 var solution = encodedSolution as MultiComponentVectorEncoding; 49 50 if (solution == null) throw new InvalidOperationException("Encoding is not of type MultiComponent Vector"); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/DBL/DeepestBottomLeftPackingSequenceDecoder.cs
r13032 r14045 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Problems.BinPacking.Dimensions; 26 using HeuristicLab.Problems.BinPacking.PackingBin; 26 27 27 using HeuristicLab.Problems.BinPacking.PackingItem; 28 28 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; … … 30 30 using HeuristicLab.Encodings.PackingEncoding.PackingSequence; 31 31 using HeuristicLab.Problems.BinPacking.Interfaces; 32 using HeuristicLab.Problems.BinPacking.Shapes; 32 33 33 34 namespace HeuristicLab.Problems.BinPacking.Decoders { 34 35 [Item("Identical bin, three dimensional, PackingSequence-decoder", "<Description missing...>")] 35 36 [StorableClass] 36 public class DeepestBottomLeftPackingSequenceDecoder : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem>, I3DPSDecoder {37 public class DeepestBottomLeftPackingSequenceDecoder : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem>, I3DPSDecoder { 37 38 public DeepestBottomLeftPackingSequenceDecoder(): base() {} 38 39 [StorableConstructor] … … 45 46 } 46 47 47 public override PackingPlan<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBinbinMeasures, ItemList<CuboidPackingItem> itemMeasures) {48 public override PackingPlan<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures) { 48 49 var solution = encodedSolution as PackingSequenceEncoding; 49 50 if (solution == null) throw new InvalidOperationException("Encoding is not of type PackingSequence"); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/EP/ExtremePointGroupingVectorDecoder3D.cs
r13032 r14045 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Problems.BinPacking.Dimensions; 26 using HeuristicLab.Problems.BinPacking.PackingBin; 26 27 27 using HeuristicLab.Problems.BinPacking.PackingItem; 28 28 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; … … 30 30 using HeuristicLab.Problems.BinPacking.Interfaces; 31 31 using HeuristicLab.Encodings.PackingEncoding.GroupingVector; 32 using HeuristicLab.Problems.BinPacking.Shapes; 32 33 33 34 namespace HeuristicLab.Problems.BinPacking.Decoders { 34 35 [Item("Identical bin, three dimensional, extreme points based decoder for the GroupingVector encoding.", "<Description missing...>")] 35 36 [StorableClass] 36 public class ExtremePointGroupingVectorDecoder3D : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem>, I3DGVDecoder {37 public class ExtremePointGroupingVectorDecoder3D : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem>, I3DGVDecoder { 37 38 public ExtremePointGroupingVectorDecoder3D() : base() { } 38 39 [StorableConstructor] … … 45 46 } 46 47 47 public static PackingPlan<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> Decode(GroupingVectorEncoding solution, CuboidPackingBinbinMeasures, ItemList<CuboidPackingItem> itemMeasures, bool stackingConstraints) {48 public static PackingPlan<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> Decode(GroupingVectorEncoding solution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures, bool stackingConstraints) { 48 49 PackingPlan3D result = new PackingPlan3D(binMeasures, true, stackingConstraints); 49 50 result.Pack(solution, itemMeasures); … … 51 52 } 52 53 53 public override PackingPlan<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBinbinMeasures, ItemList<CuboidPackingItem> itemMeasures) {54 public override PackingPlan<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures) { 54 55 var solution = encodedSolution as GroupingVectorEncoding; 55 56 if (solution == null) throw new InvalidOperationException("Encoding is not of type GroupingVector"); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/EP/ExtremePointMultiComponentVectorDecoder3D.cs
r13032 r14045 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Problems.BinPacking.Dimensions; 26 using HeuristicLab.Problems.BinPacking.PackingBin; 26 27 27 using HeuristicLab.Problems.BinPacking.PackingItem; 28 28 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; … … 30 30 using HeuristicLab.Problems.BinPacking.Interfaces; 31 31 using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector; 32 using HeuristicLab.Problems.BinPacking.Shapes; 32 33 33 34 namespace HeuristicLab.Problems.BinPacking.Decoders { 34 35 [Item("Identical bin, three dimensional, extreme points based decoder for the MultiComponentVector encoding.", "<Description missing...>")] 35 36 [StorableClass] 36 public class ExtremePointMultiComponentVectorDecoder3D : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem>, I3DMCVDecoder {37 public class ExtremePointMultiComponentVectorDecoder3D : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem>, I3DMCVDecoder { 37 38 public ExtremePointMultiComponentVectorDecoder3D () : base() { } 38 39 [StorableConstructor] … … 45 46 } 46 47 47 public static PackingPlan<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> Decode(MultiComponentVectorEncoding solution, CuboidPackingBinbinMeasures, ItemList<CuboidPackingItem> itemMeasures, bool stackingConstraints) {48 public static PackingPlan<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> Decode(MultiComponentVectorEncoding solution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures, bool stackingConstraints) { 48 49 PackingPlan3D result = new PackingPlan3D(binMeasures, true, stackingConstraints); 49 50 result.Pack(solution, itemMeasures); … … 51 52 } 52 53 53 public override PackingPlan<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBinbinMeasures, ItemList<CuboidPackingItem> itemMeasures) {54 public override PackingPlan<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures) { 54 55 var solution = encodedSolution as MultiComponentVectorEncoding; 55 56 if (solution == null) throw new InvalidOperationException("Encoding is not of type MultiComponentVector"); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/EP/ExtremePointPackingSequenceDecoder3D.cs
r13032 r14045 25 25 using HeuristicLab.Core; 26 26 using HeuristicLab.Problems.BinPacking.Dimensions; 27 using HeuristicLab.Problems.BinPacking.PackingBin; 27 28 28 using HeuristicLab.Problems.BinPacking.PackingItem; 29 29 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; … … 31 31 using HeuristicLab.Encodings.PackingEncoding.PackingSequence; 32 32 using HeuristicLab.Problems.BinPacking.Interfaces; 33 using HeuristicLab.Problems.BinPacking.Shapes; 33 34 34 35 namespace HeuristicLab.Problems.BinPacking.Decoders { 35 36 [Item("Identical bin, three dimensional, extreme points based decoder for the PackingSequence encoding.", "<Description missing...>")] 36 37 [StorableClass] 37 public class ExtremePointPackingSequenceDecoder3D : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem>, I3DPSDecoder {38 public class ExtremePointPackingSequenceDecoder3D : PackingSolutionDecoder<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem>, I3DPSDecoder { 38 39 public ExtremePointPackingSequenceDecoder3D () : base() {} 39 40 [StorableConstructor] … … 47 48 48 49 49 public override PackingPlan<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBinbinMeasures, ItemList<CuboidPackingItem> itemMeasures) {50 public override PackingPlan<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures) { 50 51 var solution = encodedSolution as PackingSequenceEncoding; 51 52 if (solution == null) throw new InvalidOperationException("Encoding is not of type PackingSequence"); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/HeuristicLab.Problems.BinPacking3D-3.3.csproj
r14040 r14045 160 160 <Compile Include="BinPacking3D.cs" /> 161 161 <Compile Include="CuboidIdenticalBinPackingProblem.cs" /> 162 <Compile Include="CuboidPackingBin.cs" />163 162 <Compile Include="CuboidPackingItem.cs" /> 164 163 <Compile Include="CuboidPackingShape.cs" /> -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/MoveEvaluators/PackingMoveEvaluator3DGV.cs
r13608 r14045 27 27 using HeuristicLab.Problems.BinPacking.Dimensions; 28 28 using HeuristicLab.Problems.BinPacking.Interfaces; 29 using HeuristicLab.Problems.BinPacking.PackingBin; 29 30 30 using HeuristicLab.Problems.BinPacking.PackingItem; 31 using HeuristicLab.Problems.BinPacking.Shapes; 31 32 32 33 namespace HeuristicLab.Problems.BinPacking { 33 34 [Item("GroupingVectorMoveEvaluator3D", "Class for evaluating packing moves for 3dimensional problems.")] 34 35 [StorableClass] 35 public class PackingMoveEvaluator3DGV : PackingMoveEvaluator<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem>, ISingleObjectiveMoveEvaluator, IGroupingVectorMoveOperator, I3DOperator {36 public class PackingMoveEvaluator3DGV : PackingMoveEvaluator<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem>, ISingleObjectiveMoveEvaluator, IGroupingVectorMoveOperator, I3DOperator { 36 37 [StorableConstructor] 37 38 protected PackingMoveEvaluator3DGV(bool deserializing) : base(deserializing) { } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/MoveEvaluators/PackingMoveEvaluator3DMCV.cs
r13608 r14045 27 27 using HeuristicLab.Problems.BinPacking.Dimensions; 28 28 using HeuristicLab.Problems.BinPacking.Interfaces; 29 using HeuristicLab.Problems.BinPacking.PackingBin; 29 30 30 using HeuristicLab.Problems.BinPacking.PackingItem; 31 using HeuristicLab.Problems.BinPacking.Shapes; 31 32 32 33 namespace HeuristicLab.Problems.BinPacking { 33 34 [Item("MultiComponentVectorMoveEvaluator3D", "Class for evaluating packing moves for 3dimensional problems.")] 34 35 [StorableClass] 35 public class PackingMoveEvaluator3DMCV : PackingMoveEvaluator<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem>, ISingleObjectiveMoveEvaluator, IMultiComponentVectorMoveOperator, I3DOperator {36 public class PackingMoveEvaluator3DMCV : PackingMoveEvaluator<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem>, ISingleObjectiveMoveEvaluator, IMultiComponentVectorMoveOperator, I3DOperator { 36 37 [StorableConstructor] 37 38 protected PackingMoveEvaluator3DMCV(bool deserializing) : base(deserializing) { } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/MoveEvaluators/PackingMoveEvaluator3DPS.cs
r13608 r14045 27 27 using HeuristicLab.Problems.BinPacking.Dimensions; 28 28 using HeuristicLab.Problems.BinPacking.Interfaces; 29 using HeuristicLab.Problems.BinPacking.PackingBin; 29 30 30 using HeuristicLab.Problems.BinPacking.PackingItem; 31 using HeuristicLab.Problems.BinPacking.Shapes; 31 32 32 33 namespace HeuristicLab.Problems.BinPacking { 33 34 [Item("PackingSequenceMoveEvaluator3D", "Class for evaluating packing moves for 3dimensional problems.")] 34 35 [StorableClass] 35 public class PackingMoveEvaluator3DPS : PackingMoveEvaluator<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem>, ISingleObjectiveMoveEvaluator, IPackingSequenceMoveOperator, I3DOperator {36 public class PackingMoveEvaluator3DPS : PackingMoveEvaluator<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem>, ISingleObjectiveMoveEvaluator, IPackingSequenceMoveOperator, I3DOperator { 36 37 [StorableConstructor] 37 38 protected PackingMoveEvaluator3DPS(bool deserializing) : base(deserializing) { } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/PackingPlan3D.cs
r13611 r14045 4 4 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 5 5 using HeuristicLab.Problems.BinPacking.Dimensions; 6 using HeuristicLab.Problems.BinPacking.PackingBin; 6 7 7 using HeuristicLab.Problems.BinPacking.PackingItem; 8 using HeuristicLab.Problems.BinPacking.Shapes; 8 9 9 10 namespace HeuristicLab.Problems.BinPacking { 10 11 [Item("PackingPlan3D", "Represents a solution for a 3D bin packing problem.")] 11 12 [StorableClass] 12 public class PackingPlan3D : PackingPlan<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> {13 public PackingPlan3D(CuboidPacking BinbinMeasures) : this(binMeasures, false, false) { }14 public PackingPlan3D(CuboidPacking BinbinMeasures, bool useExtremePoints, bool stackingConstraints) : base(binMeasures, useExtremePoints, stackingConstraints) { }13 public class PackingPlan3D : PackingPlan<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> { 14 public PackingPlan3D(CuboidPackingShape binMeasures) : this(binMeasures, false, false) { } 15 public PackingPlan3D(CuboidPackingShape binMeasures, bool useExtremePoints, bool stackingConstraints) : base(binMeasures, useExtremePoints, stackingConstraints) { } 15 16 [StorableConstructor] 16 17 protected PackingPlan3D(bool deserializing) : base(deserializing) { } … … 21 22 return new PackingPlan3D(this, cloner); 22 23 } 23 public override BinPacking<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> NewBinPacking() {24 public override BinPacking<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> NewBinPacking() { 24 25 return new BinPacking3D(BinMeasures); 25 26 } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/PackingRatioCuboidIdenticalBinEvaluator.cs
r13608 r14045 24 24 using HeuristicLab.Common; 25 25 using HeuristicLab.Problems.BinPacking.Dimensions; 26 using HeuristicLab.Problems.BinPacking.PackingBin; 26 27 27 using HeuristicLab.Problems.BinPacking.PackingItem; 28 using HeuristicLab.Problems.BinPacking.Shapes; 28 29 29 30 namespace HeuristicLab.Problems.BinPacking.Evaluators { 30 31 [Item("Packing-Ratio Cuboid Identical-Bin Evaluator", "Represents an evaluation-algorithm for cuboid-shaped bin-packing problems with identical bins which calculates the ratio between packed and unpacked space. Found in Falkenauer:1996")] 31 32 [StorableClass] 32 public class PackingRatioCuboidIdenticalBinEvaluator : PackingRatioRegularIdenticalBinEvaluator<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> {33 public class PackingRatioCuboidIdenticalBinEvaluator : PackingRatioRegularIdenticalBinEvaluator<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> { 33 34 34 35 [StorableConstructor] -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Container2DView.xaml.cs
r13605 r14045 25 25 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; 26 26 using HeuristicLab.Problems.BinPacking.Dimensions; 27 using HeuristicLab.Problems.BinPacking.PackingBin;28 27 using HeuristicLab.Problems.BinPacking.PackingItem; 28 using HeuristicLab.Problems.BinPacking.Shapes; 29 29 using Point = System.Windows.Point; 30 30 using Size = System.Windows.Size; … … 35 35 private int selectedItemKey; 36 36 private Size renderSize; 37 private BinPacking<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> packing;38 public BinPacking<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> Packing {37 private BinPacking<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> packing; 38 public BinPacking<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> Packing { 39 39 get { return packing; } 40 40 set { -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs
r13605 r14045 26 26 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; 27 27 using HeuristicLab.Problems.BinPacking.Dimensions; 28 using HeuristicLab.Problems.BinPacking.PackingBin;29 28 using HeuristicLab.Problems.BinPacking.PackingItem; 29 using HeuristicLab.Problems.BinPacking.Shapes; 30 30 31 31 namespace HeuristicLab.Problems.BinPacking.Views { … … 37 37 private int selectedItemKey; 38 38 39 private BinPacking<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> packing;40 public BinPacking<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> Packing {39 private BinPacking<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> packing; 40 public BinPacking<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> Packing { 41 41 get { return packing; } 42 42 set { -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan2DView.cs
r14038 r14045 25 25 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; 26 26 using HeuristicLab.Problems.BinPacking.Dimensions; 27 using HeuristicLab.Problems.BinPacking.PackingBin; 27 28 28 using HeuristicLab.Problems.BinPacking.PackingItem; 29 using HeuristicLab.Problems.BinPacking.Shapes; 29 30 30 31 namespace HeuristicLab.Problems.BinPacking.Views { 31 32 [View("2-dimensional packing plan view")] 32 [Content(typeof(PackingPlan<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem>), true)]33 [Content(typeof(PackingPlan<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem>), true)] 33 34 public partial class PackingPlan2DView : ItemView { 34 35 … … 37 38 } 38 39 39 public new PackingPlan<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> Content {40 get { return (PackingPlan<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem>)base.Content; }40 public new PackingPlan<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> Content { 41 get { return (PackingPlan<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem>)base.Content; } 41 42 set { base.Content = value; } 42 43 } … … 58 59 } 59 60 60 private void UpdateState(PackingPlan<TwoDimensionalPacking, RectangularPacking Bin, RectangularPackingItem> plan) {61 private void UpdateState(PackingPlan<TwoDimensionalPacking, RectangularPackingShape, RectangularPackingItem> plan) { 61 62 int currentBin = (binSelection != null && binSelection.SelectedItem != null) ? (int)(binSelection.SelectedItem) : 0; 62 63 container2DView.Packing = plan.BinPackings[currentBin]; -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan3DView.cs
r13576 r14045 25 25 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; 26 26 using HeuristicLab.Problems.BinPacking.PackingItem; 27 using HeuristicLab.Problems.BinPacking.PackingBin; 27 28 28 using HeuristicLab.Problems.BinPacking.Dimensions; 29 using HeuristicLab.Problems.BinPacking.Shapes; 29 30 30 31 namespace HeuristicLab.Problems.BinPacking.Views { 31 32 [View("3-dimensional packing plan View")] 32 [Content(typeof(PackingPlan<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem>), true)]33 [Content(typeof(PackingPlan<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem>), true)] 33 34 public partial class PackingPlan3DView : ItemView { 34 35 … … 37 38 } 38 39 39 public new PackingPlan<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem> Content {40 get { return (PackingPlan<ThreeDimensionalPacking, CuboidPacking Bin, CuboidPackingItem>)base.Content; }40 public new PackingPlan<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem> Content { 41 get { return (PackingPlan<ThreeDimensionalPacking, CuboidPackingShape, CuboidPackingItem>)base.Content; } 41 42 set { base.Content = value; } 42 43 } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Analyzers/BestBinPackingSolutionAnalyzer.cs
r14043 r14045 38 38 public class BestBinPackingSolutionAnalyzer<D, B, I> : BinPackingAnalyzer<D, B, I>, IStochasticOperator 39 39 where D : class, IPackingDimensions 40 where B : PackingShape<D> , IPackingBin40 where B : PackingShape<D> 41 41 where I : PackingShape<D>, IPackingItem { 42 42 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Analyzers/BinPackingAnalyzer.cs
r13605 r14045 36 36 public abstract class BinPackingAnalyzer<D, B, I> : SingleSuccessorOperator, IAnalyzer 37 37 where D : class, IPackingDimensions 38 where B : PackingShape<D> , IPackingBin38 where B : PackingShape<D> 39 39 where I : PackingShape<D>, IPackingItem { 40 40 public virtual bool EnabledByDefault { -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/BinPackingProblem.cs
r14043 r14045 43 43 public abstract class BinPackingProblem<D, B, I> : SingleObjectiveHeuristicOptimizationProblem<IPackingPlanEvaluationAlgorithm, IPackingSolutionCreator> 44 44 where D : class, IPackingDimensions 45 where B : PackingShape<D>, IPackingBin,new()45 where B : PackingShape<D>, new() 46 46 where I : PackingShape<D>, IPackingItem, new () { 47 47 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/BinPacking.cs
r13605 r14045 34 34 public abstract class BinPacking<D,B,I> : Item 35 35 where D : class, IPackingDimensions 36 where B : PackingShape<D> , IPackingBin36 where B : PackingShape<D> 37 37 where I : PackingShape<D>, IPackingItem { 38 38 #region Properties -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/PackingPlan.cs
r13611 r14045 40 40 public abstract class PackingPlan<D, B, I> :Item, IPackingPlan 41 41 where D : class, IPackingDimensions 42 where B : PackingShape<D> , IPackingBin42 where B : PackingShape<D> 43 43 where I : PackingShape<D>, IPackingItem { 44 44 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Evaluators/BinUtilizationRegularIdenticalBinEvaluator.cs
r14043 r14045 34 34 public abstract class BinUtilizationRegularIdenticalBinEvaluator<D, B, I> : RegularSimpleRotationIdenticalBinPackingPlanEvaluator<D, B, I> 35 35 where D : class, IPackingDimensions 36 where B : PackingShape<D> , IPackingBin36 where B : PackingShape<D> 37 37 where I : PackingShape<D>, IPackingItem { 38 38 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Evaluators/PackingPlanEvaluationAlgorithm.cs
r13608 r14045 36 36 where E : Item //E defines the used Encoding 37 37 where D : class, IPackingDimensions 38 where B : PackingShape<D> , IPackingBin38 where B : PackingShape<D> 39 39 where I : PackingShape<D>, IPackingItem { 40 40 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Evaluators/PackingPlanEvaluator.cs
r13608 r14045 35 35 public abstract class PackingPlanEvaluator<D,B,I> : SingleSuccessorOperator, IPackingPlanEvaluator 36 36 where D : class, IPackingDimensions 37 where B : PackingShape<D> , IPackingBin37 where B : PackingShape<D> 38 38 where I : PackingShape<D>, IPackingItem { 39 39 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Evaluators/PackingRatioRegularIdenticalBinEvaluator.cs
r14043 r14045 34 34 public abstract class PackingRatioRegularIdenticalBinEvaluator<D, B, I> : RegularSimpleRotationIdenticalBinPackingPlanEvaluator<D, B, I> 35 35 where D : class, IPackingDimensions 36 where B : PackingShape<D> , IPackingBin36 where B : PackingShape<D> 37 37 where I : PackingShape<D>, IPackingItem { 38 38 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Evaluators/RegularSimpleRotationIdenticalBinPackingPlanEvaluator.cs
r14043 r14045 33 33 public abstract class RegularSimpleRotationIdenticalBinPackingPlanEvaluator<D, B, I> : PackingPlanEvaluator<D, B, I> 34 34 where D : class, IPackingDimensions 35 where B : PackingShape<D> , IPackingBin35 where B : PackingShape<D> 36 36 where I : PackingShape<D>, IPackingItem { 37 37 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj
r14043 r14045 282 282 <Compile Include="PackingDimensions.cs" /> 283 283 <Compile Include="PackingMoveEvaluator.cs" /> 284 <Compile Include="Interfaces\IPackingBin.cs" />285 284 <Compile Include="Interfaces\IPackingItem.cs" /> 286 285 <Compile Include="Interfaces\IPackingPlan.cs" /> -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingMoveEvaluator.cs
r14043 r14045 38 38 public abstract class PackingMoveEvaluator<D, B, I> : SingleSuccessorOperator, IPackingMoveEvaluator, IMoveOperator 39 39 where D : class, IPackingDimensions 40 where B : PackingShape<D> , IPackingBin40 where B : PackingShape<D> 41 41 where I : PackingShape<D>, IPackingItem { 42 42 public override bool CanChangeName { -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingSolutionDecoder.cs
r13613 r14045 37 37 public abstract class PackingSolutionDecoder<D, B, I> : SingleSuccessorOperator, IPackingSolutionDecoder 38 38 where D : class, IPackingDimensions 39 where B : PackingShape<D> , IPackingBin39 where B : PackingShape<D> 40 40 where I : PackingShape<D>, IPackingItem { 41 41
Note: See TracChangeset
for help on using the changeset viewer.