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.Knapsack/3.3/KnapsackProblem.cs

    r12012 r12069  
    8282      get { return Operators.OfType<BestKnapsackSolutionAnalyzer>().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
     
    248248        BestKnapsackSolutionAnalyzer.ValuesParameter.Hidden = true;
    249249      }
    250 
    251       if (SingleObjectivePopulationDiversityAnalyzer != null) {
    252         SingleObjectivePopulationDiversityAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;
    253         SingleObjectivePopulationDiversityAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
    254         SingleObjectivePopulationDiversityAnalyzer.ResultsParameter.ActualName = "Results";
    255         SingleObjectivePopulationDiversityAnalyzer.SimilarityCalculator = Operators.OfType<KnapsackSimilarityCalculator>().SingleOrDefault();
    256       }
    257250    }
    258251    private void InitializeOperators() {
     
    263256
    264257      Operators.Add(new BestKnapsackSolutionAnalyzer());
    265       Operators.Add(new SingleObjectivePopulationDiversityAnalyzer());
     258      Operators.Add(new PopulationSimilarityAnalyzer(Operators.OfType<ISolutionSimilarityCalculator>()));
    266259      ParameterizeAnalyzer();
    267260      foreach (IBinaryVectorOperator op in ApplicationManager.Manager.GetInstances<IBinaryVectorOperator>()) {
Note: See TracChangeset for help on using the changeset viewer.