Changeset 16726
 Timestamp:
 03/28/19 17:23:59 (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/2521_ProblemRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Functions/SchafferF6.cs
r13405 r16726 21 21 22 22 using System; 23 using HEAL.Attic; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Data; 26 27 using HeuristicLab.Encodings.RealVectorEncoding; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;28 28 29 29 namespace HeuristicLab.Problems.TestFunctions { 30 30 /// <summary> 31 /// The generalized Rastrigin function y = 0.5 + (Sin^2(Sqrt(x^2 + y^2))  0.5) / (1 + 0.001 * (x^2 + y^2))^2 is a multimodal function that has its optimal value 0 at the origin. 32 31 /// The Schaffer F6 function y = 0.5 + (Sin^2(Sqrt(x^2 + y^2))  0.5) / (1 + 0.001 * (x^2 + y^2))^2 is a multimodal function that has its optimal value 0 at the origin. 33 32 /// </summary 34 [Item("SchafferF6", "Evaluates the Schaffer F6 function y = 0.5 + (Sin^2(Sqrt(x^2 + y^2))  0.5) / (1 + 0.001 * (x^2 + y^2))^2 on a given point. The optimum of this function is 0 at the origin. It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, SpringerVerlag Berlin Heidelberg.")]35 [Storable Class]33 [Item("SchafferF6", "Evaluates the Schaffer F6 function y = 0.5 + (Sin^2(Sqrt(x^2 + y^2))  0.5) / (1 + 0.001 * (x^2 + y^2))^2 on a given point. The optimum of this function is 0 at the origin.")] 34 [StorableType("FC160F97DB25403E882F7BEBA0F01E01")] 36 35 public class SchafferF6 : SingleObjectiveTestFunction { 37 36 /// <summary> 38 /// Returns false as the Rastriginfunction is a minimization problem.37 /// Returns false as the Schaffer F6 function is a minimization problem. 39 38 /// </summary> 40 39 public override bool Maximization { … … 71 70 72 71 [StorableConstructor] 73 protected SchafferF6( bool deserializing) : base(deserializing) { }72 protected SchafferF6(StorableConstructorFlag _) : base(_) { } 74 73 protected SchafferF6(SchafferF6 original, Cloner cloner) : base(original, cloner) { } 75 74 public SchafferF6() : base() { } … … 83 82 /// </summary> 84 83 /// <param name="point">Ndimensional point for which the test function should be evaluated.</param> 85 /// <returns>The result value of the Rastriginfunction at the given point.</returns>84 /// <returns>The result value of the Schaffer F6 function at the given point.</returns> 86 85 public static double Apply(RealVector point) { 87 86 if (point.Length != 2) throw new ArgumentException("The SchafferF6 can only be evaluated for two dimenional vectors");
Note: See TracChangeset
for help on using the changeset viewer.