Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/25/15 10:07:54 (10 years ago)
Author:
jkarder
Message:

#2332: refactored operators and analyzers

  • removed quality and maximization parameters in SingleObjectivePopulationDiversityAnalyzer
  • renamed SingleObjectivePopulationDiversityAnalyzer to PopulationSimilarityAnalyzer
  • added ConstrainedValueParameter for similarity calculators of analyzer
  • added ValueLookupParameter for similarity calculator of the following operators:
    • DuplicatesSelector, ProgressiveOffspringPreserver, ReferenceSetUpdateMethod, SolutionPoolUpdateMethod
  • removed some wiring code in specific problems
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs

    r12012 r12069  
    8282      get { return Operators.OfType<TSPAlleleFrequencyAnalyzer>().FirstOrDefault(); }
    8383    }
    84     private SingleObjectivePopulationDiversityAnalyzer SingleObjectivePopulationDiversityAnalyzer {
    85       get { return Operators.OfType<SingleObjectivePopulationDiversityAnalyzer>().FirstOrDefault(); }
     84    private PopulationSimilarityAnalyzer PopulationSimilarityAnalyzer {
     85      get { return Operators.OfType<PopulationSimilarityAnalyzer>().FirstOrDefault(); }
    8686    }
    8787    #endregion
     
    239239      Operators.Add(new BestTSPSolutionAnalyzer());
    240240      Operators.Add(new TSPAlleleFrequencyAnalyzer());
    241       Operators.Add(new SingleObjectivePopulationDiversityAnalyzer());
     241      Operators.Add(new PopulationSimilarityAnalyzer(Operators.OfType<ISolutionSimilarityCalculator>()));
    242242      ParameterizeAnalyzers();
    243243      var operators = new HashSet<IPermutationOperator>(new IPermutationOperator[] {
     
    318318        TSPAlleleFrequencyAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name;
    319319        TSPAlleleFrequencyAnalyzer.ResultsParameter.ActualName = "Results";
    320       }
    321 
    322       if (SingleObjectivePopulationDiversityAnalyzer != null) {
    323         SingleObjectivePopulationDiversityAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;
    324         SingleObjectivePopulationDiversityAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
    325         SingleObjectivePopulationDiversityAnalyzer.ResultsParameter.ActualName = "Results";
    326         SingleObjectivePopulationDiversityAnalyzer.SimilarityCalculator = Operators.OfType<TSPSimilarityCalculator>().SingleOrDefault();
    327320      }
    328321    }
Note: See TracChangeset for help on using the changeset viewer.