Changeset 14054
- Timestamp:
- 07/13/16 08:29:03 (8 years ago)
- Location:
- branches/HeuristicLab.BinPacking
- Files:
-
- 4 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Problem.cs
r14050 r14054 97 97 } 98 98 public Problem() : base( 99 new PackingPlanEvaluationAlgorithm<Permutation, PackingPosition, PackingShape, PackingItem>()) {99 new DecodingEvaluator<Permutation, PackingPosition, PackingShape, PackingItem>()) { 100 100 } 101 101 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Problem.cs
r14050 r14054 102 102 } 103 103 public Problem() : base( 104 new PackingPlanEvaluationAlgorithm<Permutation, PackingPosition, PackingShape, PackingItem>()) {104 new DecodingEvaluator<Permutation, PackingPosition, PackingShape, PackingItem>()) { 105 105 } 106 106 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Evaluators/DecodingEvaluator.cs
r14053 r14054 30 30 31 31 namespace HeuristicLab.Problems.BinPacking { 32 [Item(" Packingplan Evaluation Algorithm", "Represents a composition of a decoder and an evaluator for bin-packing problems.")]32 [Item("Bin Packing Evaluator (with decoder)", "Represents a composition of a decoder and an evaluator for bin-packing problems.")] 33 33 [StorableClass] 34 public class PackingPlanEvaluationAlgorithm<E, D, B, I> : SingleSuccessorOperator, IPackingPlanEvaluationAlgorithm34 public class DecodingEvaluator<E, D, B, I> : SingleSuccessorOperator, IDecodingEvaluator 35 35 where E : Item //E defines the used Encoding 36 36 where D : class, IPackingPosition … … 41 41 get { return (IValueLookupParameter<IPackingSolutionDecoder>)Parameters["PackingSolutionDecoder"]; } 42 42 } 43 ILookupParameter<IPackingSolutionDecoder> I PackingPlanEvaluationAlgorithm.PackingSolutionDecoderParameter {43 ILookupParameter<IPackingSolutionDecoder> IDecodingEvaluator.PackingSolutionDecoderParameter { 44 44 get { return PackingSolutionDecoderParameter; } 45 45 } … … 47 47 get { return (IValueLookupParameter<IEvaluator>)Parameters["PackingPlanEvaluator"]; } 48 48 } 49 ILookupParameter<IEvaluator> I PackingPlanEvaluationAlgorithm.PackingPlanEvaluatorParameter {49 ILookupParameter<IEvaluator> IDecodingEvaluator.PackingPlanEvaluatorParameter { 50 50 get { return PackingPlanEvaluatorParameter; } 51 51 } … … 55 55 56 56 [StorableConstructor] 57 protected PackingPlanEvaluationAlgorithm(bool deserializing) : base(deserializing) { }58 protected PackingPlanEvaluationAlgorithm(PackingPlanEvaluationAlgorithm<E, D, B, I> original, Cloner cloner)57 protected DecodingEvaluator(bool deserializing) : base(deserializing) { } 58 protected DecodingEvaluator(DecodingEvaluator<E, D, B, I> original, Cloner cloner) 59 59 : base(original, cloner) { 60 60 } 61 public PackingPlanEvaluationAlgorithm()61 public DecodingEvaluator () 62 62 : base() { 63 63 Parameters.Add(new ValueLookupParameter<IPackingSolutionDecoder>("PackingSolutionDecoder", "The decoding operator that is used to calculate a packing plan from the used representation.")); … … 67 67 } 68 68 public override IDeepCloneable Clone(Cloner cloner) { 69 return new PackingPlanEvaluationAlgorithm<E, D, B, I>(this, cloner);69 return new DecodingEvaluator<E, D, B, I>(this, cloner); 70 70 } 71 71 -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj
r14053 r14054 252 252 <Compile Include="Encodings\PackingSolutionManipulator.cs" /> 253 253 <Compile Include="Evaluators\BinUtilizationEvaluator.cs" /> 254 <Compile Include="Evaluators\DecodingEvaluator.cs" /> 254 255 <Compile Include="Evaluators\EvaluatorBase.cs" /> 255 <Compile Include="Evaluators\PackingPlanEvaluationAlgorithm.cs" />256 256 <Compile Include="Evaluators\PackingRatioEvaluator.cs" /> 257 <Compile Include="Interfaces\IDecodingEvaluator.cs" /> 257 258 <Compile Include="Interfaces\IEvaluator.cs" /> 258 259 <Compile Include="Interfaces\IPackingPosition.cs" /> … … 271 272 <Compile Include="Interfaces\IPackingSolutionCreator.cs" /> 272 273 <Compile Include="Interfaces\IPackingSolutionDecoder.cs" /> 273 <Compile Include="Interfaces\IPackingPlanEvaluationAlgorithm.cs" />274 274 <Compile Include="Interfaces\IPackingShape.cs" /> 275 275 <Compile Include="PackingDimensions.cs" /> -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Interfaces/IDecodingEvaluator.cs
r14053 r14054 24 24 25 25 namespace HeuristicLab.Problems.BinPacking { 26 public interface I PackingPlanEvaluationAlgorithm: ISingleObjectiveEvaluator {26 public interface IDecodingEvaluator : ISingleObjectiveEvaluator { 27 27 ILookupParameter<IPackingSolutionDecoder> PackingSolutionDecoderParameter { get; } 28 28 ILookupParameter<IEvaluator> PackingPlanEvaluatorParameter { get; } -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Problem.cs
r14050 r14054 36 36 namespace HeuristicLab.Problems.BinPacking { 37 37 [StorableClass] 38 public abstract class Problem<D, B, I> : SingleObjectiveHeuristicOptimizationProblem<I PackingPlanEvaluationAlgorithm, IPackingSolutionCreator>39 where D : class, IPackingPosition 38 public abstract class Problem<D, B, I> : SingleObjectiveHeuristicOptimizationProblem<IDecodingEvaluator, IPackingSolutionCreator> 39 where D : class, IPackingPosition 40 40 where B : PackingShape<D>, new() 41 where I : PackingShape<D>, IPackingItem, new 41 where I : PackingShape<D>, IPackingItem, new() { 42 42 43 43 44 44 #region Parameter Properties 45 public OptionalValueParameter<PackingPlan<D, B,I>> BestKnownSolutionParameter {45 public OptionalValueParameter<PackingPlan<D, B, I>> BestKnownSolutionParameter { 46 46 get { return (OptionalValueParameter<PackingPlan<D, B, I>>)Parameters["BestKnownSolution"]; } 47 47 } … … 73 73 public ItemList<I> PackingItemMeasures { 74 74 get { return PackingItemMeasuresParameter.Value; } 75 set { PackingItemMeasuresParameter.Value = value; } 75 set { PackingItemMeasuresParameter.Value = value; } 76 76 } 77 77 public IEvaluator PackingPlanEvaluator { … … 92 92 [StorableConstructor] 93 93 protected Problem(bool deserializing) : base(deserializing) { } 94 protected Problem(Problem<D, B,I> original, Cloner cloner)94 protected Problem(Problem<D, B, I> original, Cloner cloner) 95 95 : base(original, cloner) { 96 96 InitializeEventHandlers(); 97 97 } 98 98 99 protected Problem(I PackingPlanEvaluationAlgorithme) : this(e, new MultiComponentVectorRandomCreator()) { }100 101 protected Problem(I PackingPlanEvaluationAlgorithm e, IPackingSolutionCreator c) : base (e, c){99 protected Problem(IDecodingEvaluator e) : this(e, new MultiComponentVectorRandomCreator()) { } 100 101 protected Problem(IDecodingEvaluator e, IPackingSolutionCreator c) : base(e, c) { 102 102 Parameters.Add(new OptionalValueParameter<PackingPlan<D, B, I>>("BestKnownSolution", "The best known solution of this bin-packing instance.")); 103 103 Parameters.Add(new ValueParameter<ItemList<I>>("PackingItemMeasures", "Packing-item data defining the measures of the different items that need to be packed.", new ItemList<I>()));
Note: See TracChangeset
for help on using the changeset viewer.