Changeset 12069 for trunk/sources/HeuristicLab.Problems.Knapsack
- Timestamp:
- 02/25/15 10:07:54 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackProblem.cs
r12012 r12069 82 82 get { return Operators.OfType<BestKnapsackSolutionAnalyzer>().FirstOrDefault(); } 83 83 } 84 private SingleObjectivePopulationDiversityAnalyzer SingleObjectivePopulationDiversityAnalyzer {85 get { return Operators.OfType< SingleObjectivePopulationDiversityAnalyzer>().FirstOrDefault(); }84 private PopulationSimilarityAnalyzer PopulationSimilarityAnalyzer { 85 get { return Operators.OfType<PopulationSimilarityAnalyzer>().FirstOrDefault(); } 86 86 } 87 87 #endregion … … 248 248 BestKnapsackSolutionAnalyzer.ValuesParameter.Hidden = true; 249 249 } 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 }257 250 } 258 251 private void InitializeOperators() { … … 263 256 264 257 Operators.Add(new BestKnapsackSolutionAnalyzer()); 265 Operators.Add(new SingleObjectivePopulationDiversityAnalyzer());258 Operators.Add(new PopulationSimilarityAnalyzer(Operators.OfType<ISolutionSimilarityCalculator>())); 266 259 ParameterizeAnalyzer(); 267 260 foreach (IBinaryVectorOperator op in ApplicationManager.Manager.GetInstances<IBinaryVectorOperator>()) {
Note: See TracChangeset
for help on using the changeset viewer.