Changeset 17261 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3
- Timestamp:
- 09/17/19 16:49:35 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3
- Files:
-
- 4 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3.csproj
r17229 r17261 96 96 </ItemGroup> 97 97 <ItemGroup> 98 <Compile Include="Analyzers\ScatterPlotAnalyzer.cs" />99 <Compile Include="Analyzers\CrowdingAnalyzer.cs" />100 <Compile Include="Analyzers\InvertedGenerationalDistanceAnalyzer.cs" />101 <Compile Include="Analyzers\HypervolumeAnalyzer.cs" />102 <Compile Include="Analyzers\MOTFAnalyzer.cs" />103 <Compile Include="Analyzers\GenerationalDistanceAnalyzer.cs" />104 <Compile Include="Analyzers\SpacingAnalyzer.cs" />105 98 <Compile Include="Instances\IHRInstanceProvider.cs" /> 106 99 <Compile Include="Interfaces\IConstrainedTestFunction.cs" /> 107 <Compile Include="Interfaces\IMultiObjectiveTestFunctionAnalyzer.cs" />108 <Compile Include="Calculators\Crowding.cs" />109 <Compile Include="Calculators\Spacing.cs" />110 <Compile Include="Calculators\HyperVolume.cs" />111 <Compile Include="Calculators\InvertedGenerationalDistance.cs" />112 <Compile Include="Calculators\GenerationalDistance.cs" />113 100 <Compile Include="Utilities.cs" /> 114 101 <Compile Include="Instances\MISCInstanceProvider.cs" /> … … 125 112 <Compile Include="TestFunctions\IHR\IHR2.cs" /> 126 113 <Compile Include="TestFunctions\Misc\ELLI1.cs" /> 127 <Compile Include="NonDominatedSelect.cs" />128 114 <Compile Include="Interfaces\IMultiObjectiveTestFunction.cs" /> 129 115 <Compile Include="MultiObjectiveTestFunctionProblem.cs" /> -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/MultiObjectiveTestFunctionProblem.cs
r17226 r17261 20 20 #endregion 21 21 using System; 22 using System.Collections.Generic;23 22 using System.Linq; 24 23 using HEAL.Attic; … … 148 147 var front = TestFunction.OptimalParetoFront(Objectives); 149 148 var bkf = front != null ? (DoubleMatrix)Utilities.ToMatrix(front).AsReadOnly() : null; 150 Parameters.Add(new FixedValueParameter<DoubleMatrix>(BestKnownFrontParameterName, "A double matrix representing the best known qualit es 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)); 151 150 152 151 Parameters.Remove(ReferencePointParameterName); 153 Parameters.Add(new FixedValueParameter<DoubleArray>(ReferencePointParameterName, "The ref rence 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)))); 154 153 155 154 BoundsParameter.Value = new DoubleMatrix(TestFunction.Bounds(Objectives)); … … 159 158 base.OnEncodingChanged(); 160 159 UpdateParameterValues(); 161 ParameterizeAnalyzers();162 160 } 163 161 … … 165 163 base.OnEvaluatorChanged(); 166 164 UpdateParameterValues(); 167 ParameterizeAnalyzers();168 165 } 169 166 … … 172 169 Objectives = Math.Max(TestFunction.MinimumObjectives, Math.Min(Objectives, TestFunction.MaximumObjectives)); 173 170 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)))); 176 172 UpdateParameterValues(); 177 173 OnReset(); … … 197 193 Operators.Add(new SpacingAnalyzer()); 198 194 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 }217 195 } 218 196 #endregion
Note: See TracChangeset
for help on using the changeset viewer.