Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/07/10 02:08:30 (15 years ago)
Author:
abeham
Message:

#893

  • fixed wiring in the algorithms
File:
1 edited

Legend:

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

    r3669 r3689  
    126126      get { return (LocalSearchMainLoop)SolutionsCreator.Successor; }
    127127    }
     128    [Storable]
    128129    private BestAverageWorstQualityAnalyzer moveQualityAnalyzer;
    129130    #endregion
     
    167168      lsMainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name;
    168169
     170      moveQualityAnalyzer = new BestAverageWorstQualityAnalyzer();
     171      ParameterizeAnalyzers();
     172      UpdateAnalyzers();
     173
    169174      Initialize();
    170175    }
     
    172177    public override IDeepCloneable Clone(Cloner cloner) {
    173178      LocalSearch clone = (LocalSearch)base.Clone(cloner);
     179      clone.moveQualityAnalyzer = (BestAverageWorstQualityAnalyzer)cloner.Clone(moveQualityAnalyzer);
    174180      clone.Initialize();
    175181      return clone;
     
    257263    [StorableHook(HookType.AfterDeserialization)]
    258264    private void Initialize() {
    259       InitializeAnalyzers();
    260       UpdateAnalyzers();
    261265      if (Problem != null) {
    262266        Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
     
    267271      MoveGeneratorParameter.ValueChanged += new EventHandler(MoveGeneratorParameter_ValueChanged);
    268272      MoveEvaluatorParameter.ValueChanged += new EventHandler(MoveEvaluatorParameter_ValueChanged);
    269     }
    270     private void InitializeAnalyzers() {
    271       moveQualityAnalyzer = new BestAverageWorstQualityAnalyzer();
    272       ParameterizeAnalyzers();
    273273    }
    274274    private void UpdateMoveGenerator() {
Note: See TracChangeset for help on using the changeset viewer.