Index: branches/HivePerformance/sources/HeuristicLab.Algorithms.GradientDescent/3.3/Lbfgs.cs
===================================================================
--- branches/HivePerformance/sources/HeuristicLab.Algorithms.GradientDescent/3.3/Lbfgs.cs	(revision 9368)
+++ branches/HivePerformance/sources/HeuristicLab.Algorithms.GradientDescent/3.3/Lbfgs.cs	(revision 9444)
@@ -22,4 +22,6 @@
 
 using System;
+using System.Linq;
+using HeuristicLab.Analysis;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -51,10 +53,15 @@
     public string Filename { get; set; }
 
+    private const string AnalyzerParameterName = "Analyzer";
     private const string MaxIterationsParameterName = "MaxIterations";
     private const string ApproximateGradientsParameterName = "ApproximateGradients";
     private const string SeedParameterName = "Seed";
     private const string SetSeedRandomlyParameterName = "SetSeedRandomly";
+    private const string GradientCheckStepSizeParameterName = "GradientCheckStepSize";
 
     #region parameter properties
+    public IValueParameter<IMultiAnalyzer> AnalyzerParameter {
+      get { return (IValueParameter<IMultiAnalyzer>)Parameters[AnalyzerParameterName]; }
+    }
     public IValueParameter<IntValue> MaxIterationsParameter {
       get { return (IValueParameter<IntValue>)Parameters[MaxIterationsParameterName]; }
@@ -66,6 +73,13 @@
       get { return (IValueParameter<BoolValue>)Parameters[SetSeedRandomlyParameterName]; }
     }
+    public IValueParameter<DoubleValue> GradientStepSizeParameter {
+      get { return (IValueParameter<DoubleValue>)Parameters[GradientCheckStepSizeParameterName]; }
+    }
     #endregion
     #region properties
+    public IMultiAnalyzer Analyzer {
+      get { return AnalyzerParameter.Value; }
+      set { AnalyzerParameter.Value = value; }
+    }
     public int MaxIterations {
       set { MaxIterationsParameter.Value.Value = value; }
@@ -84,6 +98,4 @@
     [Storable]
     private LbfgsAnalyzer analyzer;
-    [Storable]
-    private LbfgsAnalyzer finalAnalyzer;
     [Storable]
     private Placeholder solutionCreator;
@@ -99,5 +111,4 @@
       updateResults = cloner.Clone(original.updateResults);
       analyzer = cloner.Clone(original.analyzer);
-      finalAnalyzer = cloner.Clone(original.finalAnalyzer);
       solutionCreator = cloner.Clone(original.solutionCreator);
       evaluator = cloner.Clone(original.evaluator);
@@ -106,12 +117,13 @@
     public LbfgsAlgorithm()
       : base() {
-      this.name = ItemName;
-      this.description = ItemDescription;
-
+      Parameters.Add(new ValueParameter<IMultiAnalyzer>(AnalyzerParameterName, "The analyzers that will be executed on the solution.", new MultiAnalyzer()));
       Parameters.Add(new ValueParameter<IntValue>(MaxIterationsParameterName, "The maximal number of iterations for.", new IntValue(20)));
       Parameters.Add(new ValueParameter<IntValue>(SeedParameterName, "The random seed used to initialize the new pseudo random number generator.", new IntValue(0)));
       Parameters.Add(new ValueParameter<BoolValue>(SetSeedRandomlyParameterName, "True if the random seed should be set to a random value, otherwise false.", new BoolValue(true)));
       Parameters.Add(new ValueParameter<BoolValue>(ApproximateGradientsParameterName, "Indicates that gradients should be approximated.", new BoolValue(true)));
-      Parameters[ApproximateGradientsParameterName].Hidden = true; // should not be changed
+      Parameters.Add(new OptionalValueParameter<DoubleValue>(GradientCheckStepSizeParameterName, "Step size for the gradient check (should be used for debugging the gradient calculation only)."));
+      // these parameter should not be changed usually
+      Parameters[ApproximateGradientsParameterName].Hidden = true;
+      Parameters[GradientCheckStepSizeParameterName].Hidden = true;
 
       var randomCreator = new RandomCreator();
@@ -122,6 +134,6 @@
       evaluator = new Placeholder();
       updateResults = new LbfgsUpdateResults();
-      analyzer = new LbfgsAnalyzer();
-      finalAnalyzer = new LbfgsAnalyzer();
+      var analyzerPlaceholder = new Placeholder();
+      var finalAnalyzerPlaceholder = new Placeholder();
 
       OperatorGraph.InitialOperator = randomCreator;
@@ -133,5 +145,5 @@
       randomCreator.Successor = solutionCreator;
 
-      solutionCreator.Name = "Solution Creator (placeholder)";
+      solutionCreator.Name = "(Solution Creator)";
       solutionCreator.Successor = initializer;
 
@@ -145,19 +157,23 @@
       branch.ConditionParameter.ActualName = makeStep.TerminationCriterionParameter.Name;
       branch.FalseBranch = evaluator;
-      branch.TrueBranch = finalAnalyzer;
-
-      evaluator.Name = "Evaluator (placeholder)";
+      branch.TrueBranch = finalAnalyzerPlaceholder;
+
+      evaluator.Name = "(Evaluator)";
       evaluator.Successor = updateResults;
 
       updateResults.StateParameter.ActualName = initializer.StateParameter.Name;
       updateResults.ApproximateGradientsParameter.ActualName = ApproximateGradientsParameterName;
-      updateResults.Successor = analyzer;
-
+      updateResults.Successor = analyzerPlaceholder;
+
+      analyzerPlaceholder.Name = "(Analyzer)";
+      analyzerPlaceholder.OperatorParameter.ActualName = AnalyzerParameterName;
+      analyzerPlaceholder.Successor = makeStep;
+
+      finalAnalyzerPlaceholder.Name = "(Analyzer)";
+      finalAnalyzerPlaceholder.OperatorParameter.ActualName = AnalyzerParameterName;
+      finalAnalyzerPlaceholder.Successor = null;
+
+      analyzer = new LbfgsAnalyzer();
       analyzer.StateParameter.ActualName = initializer.StateParameter.Name;
-      analyzer.Successor = makeStep;
-
-      finalAnalyzer.PointsTableParameter.ActualName = analyzer.PointsTableParameter.ActualName;
-      finalAnalyzer.QualityGradientsTableParameter.ActualName = analyzer.QualityGradientsTableParameter.ActualName;
-      finalAnalyzer.QualitiesTableParameter.ActualName = analyzer.QualitiesTableParameter.ActualName;
     }
 
@@ -185,4 +201,6 @@
         solutionCreator.OperatorParameter.ActualName = Problem.SolutionCreatorParameter.Name;
         evaluator.OperatorParameter.ActualName = Problem.EvaluatorParameter.Name;
+        UpdateAnalyzers();
+        ParameterizeOperators();
       }
     }
@@ -200,6 +218,11 @@
     }
 
+    protected override void Problem_OperatorsChanged(object sender, EventArgs e) {
+      base.Problem_OperatorsChanged(sender, e);
+      UpdateAnalyzers();
+    }
+
     private void RegisterSolutionCreatorEvents() {
-      var realVectorCreator = Problem.SolutionCreator as RealVectorCreator;
+      var realVectorCreator = Problem.SolutionCreator as IRealVectorCreator;
       // ignore if we have a different kind of problem
       if (realVectorCreator != null) {
@@ -214,5 +237,5 @@
 
     protected override void OnStarted() {
-      var realVectorCreator = Problem.SolutionCreator as RealVectorCreator;
+      var realVectorCreator = Problem.SolutionCreator as IRealVectorCreator;
       // must catch the case that user loaded an unsupported problem
       if (realVectorCreator == null)
@@ -225,6 +248,18 @@
     }
 
+    private void UpdateAnalyzers() {
+      Analyzer.Operators.Clear();
+      if (Problem != null) {
+        foreach (var a in Problem.Operators.OfType<IAnalyzer>()) {
+          foreach (var param in a.Parameters.OfType<IScopeTreeLookupParameter>())
+            param.Depth = 0;
+          Analyzer.Operators.Add(a, a.EnabledByDefault);
+        }
+      }
+      Analyzer.Operators.Add(analyzer, analyzer.EnabledByDefault);
+    }
+
     private void ParameterizeOperators() {
-      var realVectorCreator = Problem.SolutionCreator as RealVectorCreator;
+      var realVectorCreator = Problem.SolutionCreator as IRealVectorCreator;
       // ignore if we have a different kind of problem
       if (realVectorCreator != null) {
@@ -233,5 +268,4 @@
         makeStep.PointParameter.ActualName = realVectorParameterName;
         analyzer.PointParameter.ActualName = realVectorParameterName;
-        finalAnalyzer.PointParameter.ActualName = realVectorParameterName;
       }
 
@@ -239,5 +273,4 @@
       updateResults.QualityParameter.ActualName = qualityParameterName;
       analyzer.QualityParameter.ActualName = qualityParameterName;
-      finalAnalyzer.QualityParameter.ActualName = qualityParameterName;
     }
   }
Index: branches/HivePerformance/sources/HeuristicLab.Algorithms.GradientDescent/3.3/LbfgsInitializer.cs
===================================================================
--- branches/HivePerformance/sources/HeuristicLab.Algorithms.GradientDescent/3.3/LbfgsInitializer.cs	(revision 9368)
+++ branches/HivePerformance/sources/HeuristicLab.Algorithms.GradientDescent/3.3/LbfgsInitializer.cs	(revision 9444)
@@ -38,4 +38,5 @@
     private const string IterationsParameterName = "Iterations";
     private const string ApproximateGradientsParameterName = "ApproximateGradients";
+    private const string GradientCheckStepSizeParameterName = "GradientCheckStepSize";
 
     #region Parameter Properties
@@ -53,4 +54,7 @@
     public ILookupParameter<BoolValue> ApproximateGradientsParameter {
       get { return (ILookupParameter<BoolValue>)Parameters[ApproximateGradientsParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> GradientStepSizeParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[GradientCheckStepSizeParameterName]; }
     }
 
@@ -74,4 +78,5 @@
       Parameters.Add(new LookupParameter<BoolValue>(ApproximateGradientsParameterName,
                                                     "Flag that indicates if gradients should be approximated."));
+      Parameters.Add(new LookupParameter<DoubleValue>(GradientCheckStepSizeParameterName, "Step size for the gradient check (should be used for debugging the gradient calculation only)."));
       // out
       Parameters.Add(new LookupParameter<LbfgsState>(StateParameterName, "The state of the LM-BFGS algorithm."));
@@ -93,5 +98,6 @@
       alglib.minlbfgs.minlbfgssetcond(state, 0.0, 0, 0, Iterations.Value);
       alglib.minlbfgs.minlbfgssetxrep(state, true);
-      // alglib.minlbfgs.minlbfgssetgradientcheck(state, 0.000001);
+      if (GradientStepSizeParameter.ActualValue != null && GradientStepSizeParameter.ActualValue.Value > 0)
+        alglib.minlbfgs.minlbfgssetgradientcheck(state, GradientStepSizeParameter.ActualValue.Value);
 
       PointParameter.ActualValue = new RealVector(initialPoint);
Index: branches/HivePerformance/sources/HeuristicLab.Algorithms.GradientDescent/3.3/LbfgsMakeStep.cs
===================================================================
--- branches/HivePerformance/sources/HeuristicLab.Algorithms.GradientDescent/3.3/LbfgsMakeStep.cs	(revision 9368)
+++ branches/HivePerformance/sources/HeuristicLab.Algorithms.GradientDescent/3.3/LbfgsMakeStep.cs	(revision 9444)
@@ -79,4 +79,12 @@
         alglib.minlbfgs.minlbfgsreport rep = new alglib.minlbfgs.minlbfgsreport();
         alglib.minlbfgs.minlbfgsresults(state.State, ref x, rep);
+        if (rep.terminationtype < 0) {
+          if (rep.terminationtype == -1)
+            throw new OperatorExecutionException(this, "Incorrect parameters were specified.");
+          else if (rep.terminationtype == -2)
+            throw new OperatorExecutionException(this, "Rounding errors prevent further improvement.");
+          else if (rep.terminationtype == -7)
+            throw new OperatorExecutionException(this, "Gradient verification failed.");
+        }
         PointParameter.ActualValue = new RealVector(x);
       }
