Changeset 16171 for branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/TestFunctions/Misc/SchafferN1.cs
- Timestamp:
- 09/21/18 09:18:49 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/TestFunctions/Misc/SchafferN1.cs
r15583 r16171 21 21 using System; 22 22 using System.Collections.Generic; 23 using System.Linq; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Encodings.RealVectorEncoding; 27 using HeuristicLab.Optimization; 26 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 29 … … 48 50 49 51 protected override double GetBestKnownHypervolume(int objectives) { 50 return Hypervolume .Calculate(GetOptimalParetoFront(objectives), GetReferencePoint(objectives), GetMaximization(objectives));52 return HypervolumeCalculator.CalculateHypervolume(GetOptimalParetoFront(objectives).ToArray(), GetReferencePoint(objectives), GetMaximization(objectives)); 51 53 } 52 54 … … 63 65 if (objectives != 2) throw new ArgumentException("The Schaffer N1 problem must always have 2 objectives"); 64 66 if (r.Length != 1) return null; 65 doublex = r[0];67 var x = r[0]; 66 68 67 69 //objective1 68 doublef0 = x * x;70 var f0 = x * x; 69 71 70 72 //objective0 71 doublef1 = x - 2;73 var f1 = x - 2; 72 74 f1 *= f1; 73 75
Note: See TracChangeset
for help on using the changeset viewer.