Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/17/19 16:49:35 (4 years ago)
Author:
mkommend
Message:

#2521: Refactored multi-obj test functions and CMA-ES.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/MultiObjectiveTestFunctionProblem.cs

    r17226 r17261  
    2020#endregion
    2121using System;
    22 using System.Collections.Generic;
    2322using System.Linq;
    2423using HEAL.Attic;
     
    148147      var front = TestFunction.OptimalParetoFront(Objectives);
    149148      var bkf = front != null ? (DoubleMatrix)Utilities.ToMatrix(front).AsReadOnly() : null;
    150       Parameters.Add(new FixedValueParameter<DoubleMatrix>(BestKnownFrontParameterName, "A double matrix representing the best known qualites for this problem (aka points on the Pareto front). Points are to be given in a row-wise fashion.", bkf));
     149      Parameters.Add(new FixedValueParameter<DoubleMatrix>(BestKnownFrontParameterName, "A double matrix representing the best known qualities for this problem (aka points on the Pareto front). Points are to be given in a row-wise fashion.", bkf));
    151150
    152151      Parameters.Remove(ReferencePointParameterName);
    153       Parameters.Add(new FixedValueParameter<DoubleArray>(ReferencePointParameterName, "The refrence point for hypervolume calculations on this problem", new DoubleArray(TestFunction.ReferencePoint(Objectives))));
     152      Parameters.Add(new FixedValueParameter<DoubleArray>(ReferencePointParameterName, "The reference point for hypervolume calculations on this problem", new DoubleArray(TestFunction.ReferencePoint(Objectives))));
    154153
    155154      BoundsParameter.Value = new DoubleMatrix(TestFunction.Bounds(Objectives));
     
    159158      base.OnEncodingChanged();
    160159      UpdateParameterValues();
    161       ParameterizeAnalyzers();
    162160    }
    163161
     
    165163      base.OnEvaluatorChanged();
    166164      UpdateParameterValues();
    167       ParameterizeAnalyzers();
    168165    }
    169166
     
    172169      Objectives = Math.Max(TestFunction.MinimumObjectives, Math.Min(Objectives, TestFunction.MaximumObjectives));
    173170      Parameters.Remove(ReferencePointParameterName);
    174       Parameters.Add(new FixedValueParameter<DoubleArray>(ReferencePointParameterName, "The refrence point for hypervolume calculations on this problem", new DoubleArray(TestFunction.ReferencePoint(Objectives))));
    175       ParameterizeAnalyzers();
     171      Parameters.Add(new FixedValueParameter<DoubleArray>(ReferencePointParameterName, "The reference point for hypervolume calculations on this problem", new DoubleArray(TestFunction.ReferencePoint(Objectives))));
    176172      UpdateParameterValues();
    177173      OnReset();
     
    197193      Operators.Add(new SpacingAnalyzer());
    198194      Operators.Add(new TimelineAnalyzer());
    199       Operators.Add(new ScatterPlotAnalyzer());
    200       ParameterizeAnalyzers();
    201     }
    202 
    203     private IEnumerable<IMultiObjectiveTestFunctionAnalyzer> Analyzers {
    204       get { return Operators.OfType<IMultiObjectiveTestFunctionAnalyzer>(); }
    205     }
    206 
    207     private void ParameterizeAnalyzers() {
    208       foreach (var analyzer in Analyzers) {
    209         analyzer.ResultsParameter.ActualName = "Results";
    210         analyzer.QualitiesParameter.ActualName = Evaluator.QualitiesParameter.ActualName;
    211         analyzer.TestFunctionParameter.ActualName = TestFunctionParameter.Name;
    212         analyzer.BestKnownFrontParameter.ActualName = BestKnownFrontParameter.Name;
    213         var scatterPlotAnalyzer = analyzer as ScatterPlotAnalyzer;
    214         if (scatterPlotAnalyzer != null)
    215           scatterPlotAnalyzer.IndividualsParameter.ActualName = Encoding.Name;
    216       }
    217195    }
    218196    #endregion
Note: See TracChangeset for help on using the changeset viewer.