Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/22/10 22:58:43 (15 years ago)
Author:
abeham
Message:

Added move operators for real encoding and test functions #890

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs

    r3145 r3187  
    6565      get { return (ValueParameter<IntValue>)Parameters["MaximumIterations"]; }
    6666    }
     67    private ValueParameter<IntValue> SampleSizeParameter {
     68      get { return (ValueParameter<IntValue>)Parameters["SampleSize"]; }
     69    }
    6770    #endregion
    6871
     
    9194      get { return MaximumIterationsParameter.Value; }
    9295      set { MaximumIterationsParameter.Value = value; }
     96    }
     97    public IntValue SampleSize {
     98      get { return SampleSizeParameter.Value; }
     99      set { SampleSizeParameter.Value = value; }
    93100    }
    94101    private RandomCreator RandomCreator {
     
    113120      Parameters.Add(new ConstrainedValueParameter<ISingleObjectiveMoveEvaluator>("MoveEvaluator", "The operator used to evaluate a move."));
    114121      Parameters.Add(new ValueParameter<IntValue>("MaximumIterations", "The maximum number of generations which should be processed.", new IntValue(1000)));
     122      Parameters.Add(new ValueParameter<IntValue>("SampleSize", "Number of moves that MultiMoveGenerators should create. This is ignored for Exhaustive- and SingleMoveGenerators.", new IntValue(100)));
    115123
    116124      RandomCreator randomCreator = new RandomCreator();
     
    158166      ParameterizeMoveMakers();
    159167      UpdateMoveGenerator();
     168      UpdateMoveParameters();
    160169      Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
    161170      base.OnProblemChanged();
     
    189198        op.MoveQualityParameter.ActualNameChanged += new EventHandler(MoveEvaluator_MoveQualityParameter_ActualNameChanged);
    190199      }
    191       IMoveGenerator oldMoveGenerator = MoveGenerator;
    192200      UpdateMoveGenerator();
    193       if (oldMoveGenerator == MoveGenerator) // in this case MoveGeneratorParameter_ValueChanged did not fire
    194         UpdateMoveParameters();
     201      UpdateMoveParameters();
    195202      ParameterizeMainLoop();
    196203      ParameterizeMoveEvaluators();
Note: See TracChangeset for help on using the changeset viewer.