- Timestamp:
- 07/20/16 14:02:36 (8 years ago)
- Location:
- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/DBL/DeepestBottomLeftPackingSequenceDecoder.cs
r14049 r14128 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Encodings.PackingEncoding.PackingSequence;27 26 using HeuristicLab.Problems.BinPacking; 28 27 using HeuristicLab.Encodings.PackingEncoding; 28 using HeuristicLab.Encodings.PermutationEncoding; 29 29 30 30 namespace HeuristicLab.Problems.BinPacking3D { … … 32 32 [StorableClass] 33 33 public class DeepestBottomLeftPackingSequenceDecoder : PackingSolutionDecoder<PackingPosition, PackingShape, PackingItem>, I3DPSDecoder { 34 public DeepestBottomLeftPackingSequenceDecoder() : base() {}34 public DeepestBottomLeftPackingSequenceDecoder() : base() { } 35 35 [StorableConstructor] 36 36 protected DeepestBottomLeftPackingSequenceDecoder(bool deserializing) : base(deserializing) { } … … 43 43 44 44 public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) { 45 var solution = encodedSolution as P ackingSequenceEncoding;46 if (solution == null) throw new InvalidOperationException("Encoding is not of type P ackingSequence");45 var solution = encodedSolution as Permutation; 46 if (solution == null) throw new InvalidOperationException("Encoding is not of type Permutation"); 47 47 Solution result = new Solution(binMeasures); 48 48 result.Pack(solution, itemMeasures); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/EP/ExtremePointPackingSequenceDecoder3D.cs
r14049 r14128 25 25 using HeuristicLab.Core; 26 26 using HeuristicLab.Common; 27 using HeuristicLab.Encodings.PackingEncoding.PackingSequence;28 27 using HeuristicLab.Problems.BinPacking; 29 28 using HeuristicLab.Encodings.PackingEncoding; 29 using HeuristicLab.Encodings.PermutationEncoding; 30 30 31 31 namespace HeuristicLab.Problems.BinPacking3D { … … 45 45 46 46 public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) { 47 var solution = encodedSolution as P ackingSequenceEncoding;48 if (solution == null) throw new InvalidOperationException("Encoding is not of type P ackingSequence");47 var solution = encodedSolution as Permutation; 48 if (solution == null) throw new InvalidOperationException("Encoding is not of type Permutation"); 49 49 Solution result = new Solution(binMeasures, true, StackingConstraintsParameter.Value.Value); 50 50 result.Pack(solution, itemMeasures); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/HeuristicLab.Problems.BinPacking3D-3.3.csproj
r14062 r14128 166 166 <Compile Include="DecoderInterfaces\I3DMCVDecoder.cs" /> 167 167 <Compile Include="DecoderInterfaces\I3DPSDecoder.cs" /> 168 <Compile Include="Decoders\DBL\DeepestBottomLeftGroupingVectorDecoder.cs" />169 <Compile Include="Decoders\DBL\DeepestBottomLeftMultiComponentVectorDecoder.cs" />170 168 <Compile Include="Decoders\DBL\DeepestBottomLeftPackingSequenceDecoder.cs" /> 171 <Compile Include="Decoders\EP\ExtremePointGroupingVectorDecoder3D.cs" />172 <Compile Include="Decoders\EP\ExtremePointMultiComponentVectorDecoder3D.cs" />173 169 <Compile Include="Decoders\EP\ExtremePointPackingSequenceDecoder3D.cs" /> 174 170 <Compile Include="I3DOperator.cs" /> … … 184 180 <Compile Include="PackingShape.cs" /> 185 181 <Compile Include="Plugin.cs" /> 186 <Compile Include="Problem.cs" />187 182 <Compile Include="Properties\AssemblyInfo.cs" /> 188 183 <Compile Include="Solution.cs" /> -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/MoveEvaluators/PackingMoveEvaluator3DGV.cs
r14049 r14128 30 30 [Item("GroupingVectorMoveEvaluator3D", "Class for evaluating packing moves for 3dimensional problems.")] 31 31 [StorableClass] 32 public class PackingMoveEvaluator3DGV : PackingMoveEvaluator<PackingPosition, PackingShape, PackingItem>, ISingleObjectiveMoveEvaluator, IGroupingVectorMoveOperator, I3DOperator { 32 public class PackingMoveEvaluator3DGV<M> : PackingMoveEvaluator<PackingPosition, PackingShape, PackingItem, M>, ISingleObjectiveMoveEvaluator, IGroupingVectorMoveOperator, I3DOperator 33 where M: class, IItem { 33 34 [StorableConstructor] 34 35 protected PackingMoveEvaluator3DGV(bool deserializing) : base(deserializing) { } 35 protected PackingMoveEvaluator3DGV(PackingMoveEvaluator3DGV original, Cloner cloner)36 protected PackingMoveEvaluator3DGV(PackingMoveEvaluator3DGV<M> original, Cloner cloner) 36 37 : base(original, cloner) { 37 38 } 38 39 public override IDeepCloneable Clone(Cloner cloner) { 39 return new PackingMoveEvaluator3DGV (this, cloner);40 return new PackingMoveEvaluator3DGV<M>(this, cloner); 40 41 } 41 42 public PackingMoveEvaluator3DGV() -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/MoveEvaluators/PackingMoveEvaluator3DMCV.cs
r14049 r14128 30 30 [Item("MultiComponentVectorMoveEvaluator3D", "Class for evaluating packing moves for 3dimensional problems.")] 31 31 [StorableClass] 32 public class PackingMoveEvaluator3DMCV : PackingMoveEvaluator<PackingPosition, PackingShape, PackingItem>, ISingleObjectiveMoveEvaluator, IMultiComponentVectorMoveOperator, I3DOperator { 32 public class PackingMoveEvaluator3DMCV<M> : PackingMoveEvaluator<PackingPosition, PackingShape, PackingItem, M>, ISingleObjectiveMoveEvaluator, IMultiComponentVectorMoveOperator, I3DOperator 33 where M : class, IItem { 33 34 [StorableConstructor] 34 35 protected PackingMoveEvaluator3DMCV(bool deserializing) : base(deserializing) { } 35 protected PackingMoveEvaluator3DMCV(PackingMoveEvaluator3DMCV original, Cloner cloner)36 protected PackingMoveEvaluator3DMCV(PackingMoveEvaluator3DMCV<M> original, Cloner cloner) 36 37 : base(original, cloner) { 37 38 } 38 39 public override IDeepCloneable Clone(Cloner cloner) { 39 return new PackingMoveEvaluator3DMCV (this, cloner);40 return new PackingMoveEvaluator3DMCV<M>(this, cloner); 40 41 } 41 42 public PackingMoveEvaluator3DMCV() -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/MoveEvaluators/PackingMoveEvaluator3DPS.cs
r14049 r14128 30 30 [Item("PackingSequenceMoveEvaluator3D", "Class for evaluating packing moves for 3dimensional problems.")] 31 31 [StorableClass] 32 public class PackingMoveEvaluator3DPS : PackingMoveEvaluator<PackingPosition, PackingShape, PackingItem>, ISingleObjectiveMoveEvaluator, IPackingSequenceMoveOperator, I3DOperator { 32 public class PackingMoveEvaluator3DPS<M> : PackingMoveEvaluator<PackingPosition, PackingShape, PackingItem, M>, ISingleObjectiveMoveEvaluator, IPackingSequenceMoveOperator, I3DOperator 33 where M : class, IItem { 33 34 [StorableConstructor] 34 35 protected PackingMoveEvaluator3DPS(bool deserializing) : base(deserializing) { } 35 protected PackingMoveEvaluator3DPS(PackingMoveEvaluator3DPS original, Cloner cloner)36 protected PackingMoveEvaluator3DPS(PackingMoveEvaluator3DPS<M> original, Cloner cloner) 36 37 : base(original, cloner) { 37 38 } 38 39 public override IDeepCloneable Clone(Cloner cloner) { 39 return new PackingMoveEvaluator3DPS (this, cloner);40 return new PackingMoveEvaluator3DPS<M>(this, cloner); 40 41 } 41 42 public PackingMoveEvaluator3DPS() -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Problem.cs
r14055 r14128 26 26 using HeuristicLab.Encodings.PermutationEncoding; 27 27 using HeuristicLab.Encodings.PackingEncoding.PackingSequence; 28 using HeuristicLab.Encodings.PackingEncoding.GroupingVector;29 28 using HeuristicLab.Problems.Instances; 30 using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector;31 29 using HeuristicLab.PluginInfrastructure; 32 30 using HeuristicLab.Data; … … 131 129 if (SolutionCreator is PackingSequenceRandomCreator) { 132 130 PackingSolutionDecoderParameter.ValidValues.UnionWith(ApplicationManager.Manager.GetInstances<I3DPSDecoder>()); 133 } else if (SolutionCreator is GroupingVectorRandomCreator) {131 } /* else if (SolutionCreator is GroupingVectorRandomCreator) { 134 132 PackingSolutionDecoderParameter.ValidValues.UnionWith(ApplicationManager.Manager.GetInstances<I3DGVDecoder>()); 135 133 } else if (SolutionCreator is MultiComponentVectorRandomCreator) { 136 134 PackingSolutionDecoderParameter.ValidValues.UnionWith(ApplicationManager.Manager.GetInstances<I3DMCVDecoder>()); 137 } else {135 } */ else { 138 136 string error = "The given problem does not support the selected solution-creator."; 139 137 ErrorHandling.ShowErrorDialog(error, null);
Note: See TracChangeset
for help on using the changeset viewer.