Index: trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs	(revision 3616)
+++ trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs	(revision 3650)
@@ -23,7 +23,7 @@
 using System.Collections.Generic;
 using System.Linq;
+using HeuristicLab.Analysis;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
 using HeuristicLab.Optimization.Operators;
@@ -101,4 +101,7 @@
       get { return (ValueLookupParameter<IntValue>)Parameters["SelectedParents"]; }
     }
+    private ValueParameter<MultiAnalyzer<IPopulationAnalyzer>> AnalyzerParameter {
+      get { return (ValueParameter<MultiAnalyzer<IPopulationAnalyzer>>)Parameters["Analyzer"]; }
+    }
     #endregion
 
@@ -167,4 +170,8 @@
       get { return SelectedParentsParameter.Value; }
       set { SelectedParentsParameter.Value = value; }
+    }
+    public MultiAnalyzer<IPopulationAnalyzer> Analyzer {
+      get { return AnalyzerParameter.Value; }
+      set { AnalyzerParameter.Value = value; }
     }
     private RandomCreator RandomCreator {
@@ -204,5 +211,6 @@
       Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation.", new BoolValue(false)));
       Parameters.Add(new ValueLookupParameter<IntValue>("SelectedParents", "Should be about 2 * PopulationSize, for large problems use a smaller value to decrease memory footprint.", new IntValue(200)));
-
+      Parameters.Add(new ValueParameter<MultiAnalyzer<IPopulationAnalyzer>>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer<IPopulationAnalyzer>()));
+      
       RandomCreator randomCreator = new RandomCreator();
       SolutionsCreator solutionsCreator = new SolutionsCreator();
@@ -250,6 +258,8 @@
       ParameterizMainLoop();
       ParameterizeSelectors();
+      ParameterizeAnalyzers();
       UpdateCrossovers();
       UpdateMutators();
+      UpdateAnalyzers();
       Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
       base.OnProblemChanged();
@@ -266,4 +276,5 @@
       ParameterizMainLoop();
       ParameterizeSelectors();
+      ParameterizeAnalyzers();
       Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
       base.Problem_EvaluatorChanged(sender, e);
@@ -273,4 +284,5 @@
       UpdateCrossovers();
       UpdateMutators();
+      UpdateAnalyzers();
       base.Problem_OperatorsChanged(sender, e);
     }
@@ -292,4 +304,5 @@
       ParameterizMainLoop();
       ParameterizeSelectors();
+      ParameterizeAnalyzers();
     }
     #endregion
@@ -299,5 +312,7 @@
     private void Initialize() {
       InitializeSelectors();
+      InitializeAnalyzers();
       UpdateSelectors();
+      UpdateAnalyzers();
       InitializeComparisonFactorModifiers();
       UpdateComparisonFactorModifiers();
@@ -317,5 +332,4 @@
     }
     private void ParameterizMainLoop() {
-      MainLoop.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
       MainLoop.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
       MainLoop.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
@@ -330,4 +344,8 @@
       selectors.AddRange(ApplicationManager.Manager.GetInstances<ISelector>().Where(x => !(x is IMultiObjectiveSelector)).OrderBy(x => x.Name));
       ParameterizeSelectors();
+    }
+    private void InitializeAnalyzers() {
+      //qualityAnalyzer = new PopulationBestAverageWorstQualityAnalyzer();
+      ParameterizeAnalyzers();
     }
     private void InitializeComparisonFactorModifiers() {
@@ -348,4 +366,12 @@
           selector.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
         }
+      }
+    }
+    private void ParameterizeAnalyzers() {
+      //qualityAnalyzer.ResultsParameter.ActualName = "Results";
+      if (Problem != null) {
+        //qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
+        //qualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
+        //qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name;
       }
     }
@@ -406,4 +432,12 @@
       }
     }
+    private void UpdateAnalyzers() {
+      Analyzer.Operators.Clear();
+      //Analyzer.Operators.Add(qualityAnalyzer);
+      if (Problem != null) {
+        foreach (IPopulationAnalyzer analyzer in Problem.Operators.OfType<IPopulationAnalyzer>().OrderBy(x => x.Name))
+          Analyzer.Operators.Add(analyzer);
+      }
+    }
     #endregion
   }
