Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16726


Ignore:
Timestamp:
03/28/19 17:23:59 (6 years ago)
Author:
abeham
Message:

#2521: fixed single-objective test functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Functions/SchafferF6.cs

    r13405 r16726  
    2121
    2222using System;
     23using HEAL.Attic;
    2324using HeuristicLab.Common;
    2425using HeuristicLab.Core;
    2526using HeuristicLab.Data;
    2627using HeuristicLab.Encodings.RealVectorEncoding;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828
    2929namespace HeuristicLab.Problems.TestFunctions {
    3030  /// <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.
    3332  /// </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, Springer-Verlag Berlin Heidelberg.")]
    35   [StorableClass]
     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("FC160F97-DB25-403E-882F-7BEBA0F01E01")]
    3635  public class SchafferF6 : SingleObjectiveTestFunction {
    3736    /// <summary>
    38     /// Returns false as the Rastrigin function is a minimization problem.
     37    /// Returns false as the Schaffer F6 function is a minimization problem.
    3938    /// </summary>
    4039    public override bool Maximization {
     
    7170
    7271    [StorableConstructor]
    73     protected SchafferF6(bool deserializing) : base(deserializing) { }
     72    protected SchafferF6(StorableConstructorFlag _) : base(_) { }
    7473    protected SchafferF6(SchafferF6 original, Cloner cloner) : base(original, cloner) { }
    7574    public SchafferF6() : base() { }
     
    8382    /// </summary>
    8483    /// <param name="point">N-dimensional point for which the test function should be evaluated.</param>
    85     /// <returns>The result value of the Rastrigin function at the given point.</returns>
     84    /// <returns>The result value of the Schaffer F6 function at the given point.</returns>
    8685    public static double Apply(RealVector point) {
    8786      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.