- Timestamp:
- 07/13/17 15:22:59 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/Algorithms/3D/ExtremePointAlgorithm.cs
r15200 r15229 41 41 [StorableClass] 42 42 [Creatable(CreatableAttribute.Categories.SingleSolutionAlgorithms, Priority = 180)] 43 public class ExtremePointAlgorithm : BasicAlgorithm {43 public sealed class ExtremePointAlgorithm : BasicAlgorithm { 44 44 45 45 public override Type ProblemType { … … 57 57 58 58 [Storable] 59 private IValueParameter<EnumValue<SortingMethod>> sortingMethodParameter;59 private readonly IValueParameter<EnumValue<SortingMethod>> sortingMethodParameter; 60 60 public IValueParameter<EnumValue<SortingMethod>> SortingMethodParameter { 61 61 get { return sortingMethodParameter; } … … 63 63 64 64 [Storable] 65 private IValueParameter<EnumValue<FittingMethod>> fittingMethodParameter;65 private readonly IValueParameter<EnumValue<FittingMethod>> fittingMethodParameter; 66 66 public IValueParameter<EnumValue<FittingMethod>> FittingMethodParameter { 67 67 get { return fittingMethodParameter; } … … 69 69 70 70 [Storable] 71 private IValueParameter<PercentValue> deltaParameter;71 private readonly IValueParameter<PercentValue> deltaParameter; 72 72 public IValueParameter<PercentValue> DeltaParameter { 73 73 get { return deltaParameter; } … … 75 75 76 76 [StorableConstructor] 77 pr otectedExtremePointAlgorithm(bool deserializing) : base(deserializing) { }78 pr otectedExtremePointAlgorithm(ExtremePointAlgorithm original, Cloner cloner)77 private ExtremePointAlgorithm(bool deserializing) : base(deserializing) { } 78 private ExtremePointAlgorithm(ExtremePointAlgorithm original, Cloner cloner) 79 79 : base(original, cloner) { 80 80 sortingMethodParameter = cloner.Clone(original.sortingMethodParameter); … … 112 112 if (result == null) throw new InvalidOperationException("No result obtained!"); 113 113 114 Results.Add(new Result("Best Solution", result.Item1)); 115 Results.Add(new Result("Best Solution Quality", new DoubleValue(result.Item2))); 114 Results.Add(new Result("Best Solution", 115 "The best found solution", 116 result.Item1)); 117 Results.Add(new Result("Best Solution Quality", 118 "The quality of the best found solution according to the evaluator", 119 new DoubleValue(result.Item2))); 116 120 117 121 var binUtil = new BinUtilizationEvaluator(); 118 122 var packRatio = new PackingRatioEvaluator(); 119 Results.Add(new Result("Best Solution Bin Count", new IntValue(result.Item1.NrOfBins))); 120 Results.Add(new Result("Best Solution Bin Utilization", new PercentValue(Math.Round(binUtil.Evaluate(result.Item1), 3)))); 123 Results.Add(new Result("Best Solution Bin Count", 124 "The number of bins in the best found solution", 125 new IntValue(result.Item1.NrOfBins))); 126 Results.Add(new Result("Best Solution Bin Utilization", 127 "The utilization given in percentage as calculated by the BinUtilizationEvaluator (total used space / total available space)", 128 new PercentValue(Math.Round(binUtil.Evaluate(result.Item1), 3)))); 121 129 122 130 if (result.Item3.HasValue && sorting.Length > 1) 123 Results.Add(new Result("Best Sorting Method", new EnumValue<SortingMethod>(result.Item3.Value))); 131 Results.Add(new Result("Best Sorting Method", 132 "The sorting method that found the best solution", 133 new EnumValue<SortingMethod>(result.Item3.Value))); 124 134 if (result.Item4.HasValue && fitting.Length > 1) 125 Results.Add(new Result("Best Fitting Method", new EnumValue<FittingMethod>(result.Item4.Value))); 135 Results.Add(new Result("Best Fitting Method", 136 "The fitting method that found the best solution", 137 new EnumValue<FittingMethod>(result.Item4.Value))); 126 138 } 127 139
Note: See TracChangeset
for help on using the changeset viewer.