Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/20/10 18:53:14 (14 years ago)
Author:
abeham
Message:

Changed handling of strategy parameters and renamed operators in realvector #890, #932, #934

Location:
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/AckleyEvaluator.cs

    r3376 r3450  
    7272    /// <returns>The result value of the Ackley function at the given point.</returns>
    7373    public static double Apply(RealVector point) {
    74       double result = 20 + Math.E;
     74      double result;
    7575      double val;
    7676
     
    8080      val /= point.Length;
    8181      val = -0.2 * Math.Sqrt(val);
    82       result -= 20 * Math.Exp(val);
     82      result = 20 - 20 * Math.Exp(val);
    8383
    8484      val = 0;
     
    8686        val += Math.Cos(2 * Math.PI * point[i]);
    8787      val /= point.Length;
    88       result -= Math.Exp(val);
     88      result += Math.E - Math.Exp(val);
    8989      return (result);
    9090    }
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/RealVectorAdditiveMoveWrapper.cs

    r3187 r3450  
    3131    private RealVector vector;
    3232
     33    public RealVectorAdditiveMoveWrapper() {
     34      dimension = -1;
     35      moveDistance = 0;
     36      this.vector = new RealVector();
     37    }
     38
    3339    public RealVectorAdditiveMoveWrapper(AdditiveMove move, RealVector vector) {
    3440      dimension = move.Dimension;
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SingleObjectiveTestFunctionProblem.cs

    r3336 r3450  
    4040  public sealed class SingleObjectiveTestFunctionProblem : ParameterizedNamedItem, ISingleObjectiveProblem {
    4141    [Storable]
    42     private StrategyVectorCreator strategyVectorCreator;
     42    private StdDevStrategyVectorCreator strategyVectorCreator;
    4343    [Storable]
    44     private StrategyVectorCrossover strategyVectorCrossover;
     44    private StdDevStrategyVectorCrossover strategyVectorCrossover;
    4545    [Storable]
    46     private StrategyVectorManipulator strategyVectorManipulator;
     46    private StdDevStrategyVectorManipulator strategyVectorManipulator;
    4747
    4848    public override Image ItemImage {
     
    151151      Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this TSP instance.", new DoubleValue(evaluator.BestKnownQuality)));
    152152
    153       strategyVectorCreator = new StrategyVectorCreator();
     153      strategyVectorCreator = new StdDevStrategyVectorCreator();
    154154      strategyVectorCreator.LengthParameter.ActualName = ProblemSizeParameter.Name;
    155       strategyVectorCrossover = new StrategyVectorCrossover();
    156       strategyVectorManipulator = new StrategyVectorManipulator();
     155      strategyVectorCrossover = new StdDevStrategyVectorCrossover();
     156      strategyVectorManipulator = new StdDevStrategyVectorManipulator();
     157      strategyVectorManipulator.LearningRateParameter.Value = new DoubleValue(0.5);
     158      strategyVectorManipulator.GeneralLearningRateParameter.Value = new DoubleValue(0.5);
    157159
    158160      creator.RealVectorParameter.ActualName = "Point";
Note: See TracChangeset for help on using the changeset viewer.