Changeset 3315 for trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/LevyEvaluator.cs
- Timestamp:
- 04/12/10 23:39:40 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/LevyEvaluator.cs
r3170 r3315 28 28 namespace HeuristicLab.Problems.TestFunctions { 29 29 /// <summary> 30 /// Levy Function<br/> 31 /// Domain: [-10.0 , 10.0]^n<br/> 32 /// Optimum: 0.0 at (1.0, 1.0, ..., 1.0) 30 /// The Levy function is implemented as described on http://www-optima.amp.i.kyoto-u.ac.jp/member/student/hedar/Hedar_files/TestGO_files/Page2056.htm, last accessed April 12th, 2010. 33 31 /// </summary> 34 [Item("LevyEvaluator", "Evaluates the Levy function on a given point. The optimum of this function is 0 at (1,1,...,1). ")]32 [Item("LevyEvaluator", "Evaluates the Levy function on a given point. The optimum of this function is 0 at (1,1,...,1). It is implemented as described on http://www-optima.amp.i.kyoto-u.ac.jp/member/student/hedar/Hedar_files/TestGO_files/Page2056.htm, last accessed April 12th, 2010.")] 35 33 [StorableClass] 36 34 public class LevyEvaluator : SingleObjectiveTestFunctionProblemEvaluator { … … 80 78 } 81 79 82 s = Math.Pow(Math.Sin(Math.PI * z[1]), 2); 80 s = Math.Sin(Math.PI * z[0]); 81 s *= s; 83 82 84 83 for (int i = 0; i < length - 1; i++) { 85 s += Math.Pow(z[i] - 1, 2) * (1 + 10 * Math.Pow(Math.Sin(Math.PI * z[i] + 1), 2));84 s += (z[i] - 1) * (z[i] - 1) * (1 + 10 * Math.Pow(Math.Sin(Math.PI * z[i] + 1), 2)); 86 85 } 87 86
Note: See TracChangeset
for help on using the changeset viewer.