Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/05/10 23:27:50 (12 years ago)
Author:
swagner
Message:

Worked on refactoring of algorithm analysis and tracing (#999)

  • removed specific analyzer interfaces
  • adapted MultiAnalyzer
File:
1 edited

Legend:

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

    r3636 r3658  
    8181      get { return (ValueParameter<IntValue>)Parameters["SampleSize"]; }
    8282    }
    83     private ValueParameter<MultiAnalyzer<IPopulationAnalyzer>> MoveAnalyzerParameter {
    84       get { return (ValueParameter<MultiAnalyzer<IPopulationAnalyzer>>)Parameters["MoveAnalyzer"]; }
    85     }
    86     private ValueParameter<MultiAnalyzer<ISolutionAnalyzer>> AnalyzerParameter {
    87       get { return (ValueParameter<MultiAnalyzer<ISolutionAnalyzer>>)Parameters["Analyzer"]; }
     83    private ValueParameter<MultiAnalyzer> MoveAnalyzerParameter {
     84      get { return (ValueParameter<MultiAnalyzer>)Parameters["MoveAnalyzer"]; }
     85    }
     86    private ValueParameter<MultiAnalyzer> AnalyzerParameter {
     87      get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; }
    8888    }
    8989    #endregion
     
    126126      set { MaximumIterationsParameter.Value = value; }
    127127    }
    128     public MultiAnalyzer<IPopulationAnalyzer> MoveAnalyzer {
     128    public MultiAnalyzer MoveAnalyzer {
    129129      get { return MoveAnalyzerParameter.Value; }
    130130      set { MoveAnalyzerParameter.Value = value; }
    131131    }
    132     public MultiAnalyzer<ISolutionAnalyzer> Analyzer {
     132    public MultiAnalyzer Analyzer {
    133133      get { return AnalyzerParameter.Value; }
    134134      set { AnalyzerParameter.Value = value; }
     
    159159      Parameters.Add(new ValueParameter<IntValue>("MaximumIterations", "The maximum number of generations which should be processed.", new IntValue(1000)));
    160160      Parameters.Add(new ValueParameter<IntValue>("SampleSize", "The neighborhood size for stochastic sampling move generators", new IntValue(100)));
    161       Parameters.Add(new ValueParameter<MultiAnalyzer<IPopulationAnalyzer>>("MoveAnalyzer", "The operator used to analyze the moves.", new MultiAnalyzer<IPopulationAnalyzer>()));
    162       Parameters.Add(new ValueParameter<MultiAnalyzer<ISolutionAnalyzer>>("Analyzer", "The operator used to analyze the solution.", new MultiAnalyzer<ISolutionAnalyzer>()));
     161      Parameters.Add(new ValueParameter<MultiAnalyzer>("MoveAnalyzer", "The operator used to analyze the moves.", new MultiAnalyzer()));
     162      Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze the solution.", new MultiAnalyzer()));
    163163     
    164164      RandomCreator randomCreator = new RandomCreator();
     
    392392      MoveAnalyzer.Operators.Add(tabuNeighborhoodAnalyzer);
    393393      if (Problem != null) {
    394         foreach (ISolutionAnalyzer analyzer in Problem.Operators.OfType<ISolutionAnalyzer>().OrderBy(x => x.Name))
     394        foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name))
    395395          Analyzer.Operators.Add(analyzer);
    396396      }
Note: See TracChangeset for help on using the changeset viewer.