Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/13/17 15:22:59 (7 years ago)
Author:
abeham
Message:

#2762:

  • Implemented review comments
  • Fixed ResidualSpaceBestFitExtremePointPermutationDecoder by sorting from smallest to largest (merit function should be minimized)
  • Some restructuring of the methods
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/Algorithms/3D/ExtremePointAlgorithm.cs

    r15200 r15229  
    4141  [StorableClass]
    4242  [Creatable(CreatableAttribute.Categories.SingleSolutionAlgorithms, Priority = 180)]
    43   public class ExtremePointAlgorithm : BasicAlgorithm {
     43  public sealed class ExtremePointAlgorithm : BasicAlgorithm {
    4444
    4545    public override Type ProblemType {
     
    5757
    5858    [Storable]
    59     private IValueParameter<EnumValue<SortingMethod>> sortingMethodParameter;
     59    private readonly IValueParameter<EnumValue<SortingMethod>> sortingMethodParameter;
    6060    public IValueParameter<EnumValue<SortingMethod>> SortingMethodParameter {
    6161      get { return sortingMethodParameter; }
     
    6363
    6464    [Storable]
    65     private IValueParameter<EnumValue<FittingMethod>> fittingMethodParameter;
     65    private readonly IValueParameter<EnumValue<FittingMethod>> fittingMethodParameter;
    6666    public IValueParameter<EnumValue<FittingMethod>> FittingMethodParameter {
    6767      get { return fittingMethodParameter; }
     
    6969
    7070    [Storable]
    71     private IValueParameter<PercentValue> deltaParameter;
     71    private readonly IValueParameter<PercentValue> deltaParameter;
    7272    public IValueParameter<PercentValue> DeltaParameter {
    7373      get { return deltaParameter; }
     
    7575
    7676    [StorableConstructor]
    77     protected ExtremePointAlgorithm(bool deserializing) : base(deserializing) { }
    78     protected ExtremePointAlgorithm(ExtremePointAlgorithm original, Cloner cloner)
     77    private ExtremePointAlgorithm(bool deserializing) : base(deserializing) { }
     78    private ExtremePointAlgorithm(ExtremePointAlgorithm original, Cloner cloner)
    7979      : base(original, cloner) {
    8080      sortingMethodParameter = cloner.Clone(original.sortingMethodParameter);
     
    112112      if (result == null) throw new InvalidOperationException("No result obtained!");
    113113
    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)));
    116120
    117121      var binUtil = new BinUtilizationEvaluator();
    118122      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))));
    121129
    122130      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)));
    124134      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)));
    126138    }
    127139
Note: See TracChangeset for help on using the changeset viewer.