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

#893

  • fixed wiring in the algorithms
File:
1 edited

Legend:

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

    r3671 r3689  
    143143      get { return (TabuSearchMainLoop)SolutionsCreator.Successor; }
    144144    }
     145    [Storable]
    145146    private BestAverageWorstQualityAnalyzer moveQualityAnalyzer;
     147    [Storable]
    146148    private TabuNeighborhoodAnalyzer tabuNeighborhoodAnalyzer;
    147149    #endregion
     
    188190      tsMainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name;
    189191
     192      moveQualityAnalyzer = new BestAverageWorstQualityAnalyzer();
     193      tabuNeighborhoodAnalyzer = new TabuNeighborhoodAnalyzer();
     194      ParameterizeAnalyzers();
     195      UpdateAnalyzers();
     196
    190197      Initialize();
    191198    }
     
    195202    public override IDeepCloneable Clone(Cloner cloner) {
    196203      TabuSearch clone = (TabuSearch)base.Clone(cloner);
     204      clone.moveQualityAnalyzer = (BestAverageWorstQualityAnalyzer)cloner.Clone(moveQualityAnalyzer);
     205      clone.tabuNeighborhoodAnalyzer = (TabuNeighborhoodAnalyzer)cloner.Clone(tabuNeighborhoodAnalyzer);
    197206      clone.Initialize();
    198207      return clone;
     
    313322    [StorableHook(HookType.AfterDeserialization)]
    314323    private void Initialize() {
    315       InitializeAnalyzers();
    316       UpdateAnalyzers();
    317324      if (Problem != null) {
    318325        Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
     
    325332      TabuCheckerParameter.ValueChanged += new EventHandler(TabuCheckerParameter_ValueChanged);
    326333      SampleSizeParameter.NameChanged += new EventHandler(SampleSizeParameter_NameChanged);
    327     }
    328     private void InitializeAnalyzers() {
    329       moveQualityAnalyzer = new BestAverageWorstQualityAnalyzer();
    330       tabuNeighborhoodAnalyzer = new TabuNeighborhoodAnalyzer();
    331       ParameterizeAnalyzers();
    332334    }
    333335    private void UpdateMoveGenerator() {
Note: See TracChangeset for help on using the changeset viewer.