Index: branches/PerformanceComparison/HeuristicLab.Analysis/3.3/Optimizers/IteratedAlgorithm.cs
===================================================================
--- branches/PerformanceComparison/HeuristicLab.Analysis/3.3/Optimizers/IteratedAlgorithm.cs	(revision 13564)
+++ branches/PerformanceComparison/HeuristicLab.Analysis/3.3/Optimizers/IteratedAlgorithm.cs	(revision 13568)
@@ -61,6 +61,6 @@
     }
 
-    public IValueParameter<DoubleValue> TargetValueParameter {
-      get { return (IValueParameter<DoubleValue>)Parameters["TargetValue"]; }
+    public IValueParameter<DoubleValue> TargetQualityParameter {
+      get { return (IValueParameter<DoubleValue>)Parameters["TargetQuality"]; }
     }
 
@@ -131,4 +131,6 @@
           RegisterAlgorithmEvents();
           AddAlgorithmAnalyzers();
+          HandleAlgorithmMaximumEvaluationsChanged();
+          HandleAlgorithmTargetQualityChanged();
         }
         if (AlgorithmParameter.Value != algorithm)
@@ -152,5 +154,5 @@
         var bestQuality = Results.ContainsKey(BestQualityResultName) ? ((DoubleValue)Results[BestQualityResultName].Value).Value
                                                                      : (Maximization ? double.MinValue : double.MaxValue);
-        var targetValue = TargetValueParameter.Value != null ? TargetValueParameter.Value.Value
+        var targetValue = TargetQualityParameter.Value != null ? TargetQualityParameter.Value.Value
                                                              : Maximization ? double.MaxValue : double.MinValue;
 
@@ -180,5 +182,5 @@
       Parameters.Add(new OptionalValueParameter<TimeSpanValue>("MaximumExecutionTime", "The maximum wall-clock time that the algorithm should run."));
       Parameters.Add(new OptionalValueParameter<IntValue>("MaximumEvaluations", "The maximum number of function evaluations that the algorithm should run.", new IntValue(100000000)));
-      Parameters.Add(new OptionalValueParameter<DoubleValue>("TargetValue", "The target value that the algorithm should run for."));
+      Parameters.Add(new OptionalValueParameter<DoubleValue>("TargetQuality", "The target quality that the algorithm should run for."));
       Parameters.Add(new FixedValueParameter<DoubleValue>("MoveCostPerSolution", "The amount of solution evaluation equivalents of a single move. Use 1 for a black-box scenario.", new DoubleValue(1)));
       Parameters.Add(new FixedValueParameter<BoolValue>("StoreSolutionInRun", "Whether the solution data types should be kept in the run."));
@@ -203,4 +205,11 @@
     private void AfterDeserialization() {
       algorithm = AlgorithmParameter.Value;
+      // BackwardsCompatibility3.3
+      #region Backwards compatible code, remove with 3.4
+      if (Parameters.ContainsKey("TargetValue")) {
+        var target = ((OptionalValueParameter<DoubleValue>)Parameters["TargetValue"]).Value;
+        Parameters.Remove("TargetValue");
+        Parameters.Add(new OptionalValueParameter<DoubleValue>("TargetQuality", "The target quality that the algorithm should run for.", target));
+      }
       if (!Parameters.ContainsKey("Analyzer")) {
         Parameters.Add(new FixedValueParameter<MultiAnalyzer>("Analyzer", "Analyzers that should be called in addition to the default algorithm analyzers.", new MultiAnalyzer()));
@@ -222,4 +231,9 @@
         }
       }
+      if (bestSolutionAnalyzer == null) {
+        bestSolutionAnalyzer = new BestScopeSolutionAnalyzer();
+        Analyzer.Operators.Add(bestSolutionAnalyzer, StoreSolutionInRun);
+      }
+      #endregion
       RegisterEventHandlers();
     }
@@ -245,5 +259,30 @@
       Algorithm.Stopped += Algorithm_Stopped;
       Algorithm.ProblemChanged += Algorithm_ProblemChanged;
-    }
+      #region MaximumEvaluations
+      IParameter param;
+      if (Algorithm.Parameters.TryGetValue("MaximumEvaluations", out param)) {
+        var intFixedValueParam = (param as IFixedValueParameter<IntValue>);
+        if (intFixedValueParam != null) {
+          intFixedValueParam.Value.ValueChanged += AlgorithmMaximumEvaluationsOnValueChanged;
+        } else {
+          var intValueParam = (param as IValueParameter<IntValue>);
+          if (intValueParam != null) {
+            intValueParam.ValueChanged += AlgorithmMaximumEvaluationsParameterOnChanged;
+            if (intValueParam.Value != null) intValueParam.Value.ValueChanged += AlgorithmMaximumEvaluationsOnValueChanged;
+          }
+        }
+      }
+      #endregion
+      #region TargetQuality
+      if (Algorithm.Parameters.TryGetValue("TargetQuality", out param)) {
+        var intValueParam = (param as IValueParameter<IntValue>);
+        if (intValueParam != null) {
+          intValueParam.ValueChanged += AlgorithmTargetQualityParameterOnChanged;
+          if (intValueParam.Value != null) intValueParam.Value.ValueChanged += AlgorithmTargetQualityOnValueChanged;
+        }
+      }
+      #endregion
+    }
+
     private void DeregisterAlgorithmEvents() {
       Algorithm.ExceptionOccurred -= Algorithm_ExceptionOccurred;
@@ -251,4 +290,28 @@
       Algorithm.Stopped -= Algorithm_Stopped;
       Algorithm.ProblemChanged -= Algorithm_ProblemChanged;
+      #region MaximumEvaluations
+      IParameter param;
+      if (Algorithm.Parameters.TryGetValue("MaximumEvaluations", out param)) {
+        var intFixedValueParam = (param as IFixedValueParameter<IntValue>);
+        if (intFixedValueParam != null) {
+          intFixedValueParam.Value.ValueChanged -= AlgorithmMaximumEvaluationsOnValueChanged;
+        } else {
+          var intValueParam = (param as IValueParameter<IntValue>);
+          if (intValueParam != null) {
+            intValueParam.ValueChanged -= AlgorithmMaximumEvaluationsParameterOnChanged;
+            if (intValueParam.Value != null) intValueParam.Value.ValueChanged -= AlgorithmMaximumEvaluationsOnValueChanged;
+          }
+        }
+      }
+      #endregion
+      #region TargetQuality
+      if (Algorithm.Parameters.TryGetValue("TargetQuality", out param)) {
+        var intValueParam = (param as IValueParameter<IntValue>);
+        if (intValueParam != null) {
+          intValueParam.ValueChanged -= AlgorithmTargetQualityParameterOnChanged;
+          if (intValueParam.Value != null) intValueParam.Value.ValueChanged -= AlgorithmTargetQualityOnValueChanged;
+        }
+      }
+      #endregion
     }
     #endregion
@@ -263,4 +326,7 @@
       Analyzer.Operators.ItemsRemoved += AnalyzerOperatorsChanged;
       Analyzer.Operators.ItemsReplaced += AnalyzerOperatorsChanged;
+      MaximumEvaluationsParameter.Value.ValueChanged += MaximumEvaluationsParameterOnValueChanged;
+      TargetQualityParameter.ValueChanged += TargetQualityParameterChanged;
+      if (TargetQualityParameter.Value != null) TargetQualityParameter.Value.ValueChanged += TargetQualityParameterOnValueChanged;
     }
 
@@ -516,7 +582,7 @@
       var bkParam = ((ISingleObjectiveHeuristicOptimizationProblem)Problem).BestKnownQualityParameter as IValueParameter<DoubleValue>;
       if (bkParam != null && bkParam.Value != null)
-        TargetValueParameter.Value = new DoubleValue(bkParam.Value.Value);
+        TargetQualityParameter.Value = new DoubleValue(bkParam.Value.Value);
       else if (bkParam != null && bkParam.Value == null)
-        TargetValueParameter.Value = null;
+        TargetQualityParameter.Value = null;
     }
 
@@ -568,4 +634,29 @@
     }
 
+    private void AlgorithmTargetQualityParameterOnChanged(object sender, EventArgs e) {
+      var doubleValueParam = (sender as IValueParameter<DoubleValue>);
+      if (doubleValueParam.Value != null) doubleValueParam.Value.ValueChanged += AlgorithmTargetQualityOnValueChanged;
+      HandleAlgorithmTargetQualityChanged();
+    }
+
+    private void AlgorithmTargetQualityOnValueChanged(object sender, EventArgs e) {
+      HandleAlgorithmTargetQualityChanged();
+    }
+
+    private void AlgorithmMaximumEvaluationsParameterOnChanged(object sender, EventArgs eventArgs) {
+      var intValueParam = (sender as IValueParameter<IntValue>);
+      if (intValueParam.Value == null) {
+        intValueParam.Value = new IntValue();
+        return;
+      }
+      intValueParam.Value.ValueChanged += AlgorithmMaximumEvaluationsOnValueChanged;
+      HandleAlgorithmMaximumEvaluationsChanged();
+    }
+
+    private void AlgorithmMaximumEvaluationsOnValueChanged(object sender, EventArgs eventArgs) {
+      var intValue = (IntValue)sender;
+      HandleAlgorithmMaximumEvaluationsChanged();
+    }
+
     private void Problem_BestKnownQualityParameter_ValueChanged(object sender, EventArgs e) {
       var param = sender as IValueParameter<DoubleValue>;
@@ -592,4 +683,17 @@
       if (Algorithm != null) Algorithm.Problem = Problem;
       if (Problem != null) UpdateTargetValueFromBestKnownQuality();
+    }
+
+    private void MaximumEvaluationsParameterOnValueChanged(object sender, EventArgs eventArgs) {
+      SynchronizeMaximumEvaluationsParameter();
+    }
+
+    private void TargetQualityParameterChanged(object sender, EventArgs e) {
+      if (TargetQualityParameter.Value != null) TargetQualityParameter.Value.ValueChanged += TargetQualityParameterOnValueChanged;
+      HandleAlgorithmTargetQualityChanged();
+    }
+
+    private void TargetQualityParameterOnValueChanged(object sender, EventArgs eventArgs) {
+      HandleAlgorithmTargetQualityChanged();
     }
 
@@ -603,4 +707,36 @@
     }
     #endregion
+
+    private void HandleAlgorithmTargetQualityChanged() {
+      IParameter param;
+      if (!Algorithm.Parameters.TryGetValue("TargetQuality", out param)) throw new InvalidOperationException("Cannot find TargetQuality parameter in Algorithm " + Algorithm.Name);
+      var doubleValueParam = (param as IValueParameter<DoubleValue>);
+
+      if (doubleValueParam.Value == null && TargetQualityParameter.Value != null) {
+        doubleValueParam.Value = new DoubleValue(TargetQualityParameter.Value.Value);
+      } else if (doubleValueParam.Value != null && TargetQualityParameter.Value == null) {
+        doubleValueParam.Value = null;
+      } else if (doubleValueParam.Value != null && TargetQualityParameter.Value != null) {
+        doubleValueParam.Value.Value = TargetQualityParameter.Value.Value;
+      }
+    }
+
+    private void HandleAlgorithmMaximumEvaluationsChanged() {
+      IParameter param;
+      if (!Algorithm.Parameters.TryGetValue("MaximumEvaluations", out param)) throw new InvalidOperationException("Cannot find MaximumEvaluations parameter in Algorithm " + Algorithm.Name);
+      var intValueParam = (param as IValueParameter<IntValue>);
+      var value = intValueParam.Value;
+      if (value.Value > MaximumEvaluationsParameter.Value.Value)
+        value.Value = MaximumEvaluationsParameter.Value.Value;
+    }
+
+    private void SynchronizeMaximumEvaluationsParameter() {
+      IParameter param;
+      if (Algorithm.Parameters.TryGetValue("MaximumEvaluations", out param)) {
+        var intValueParam = (param as IValueParameter<IntValue>);
+        if (intValueParam.Value == null) intValueParam.Value = new IntValue(MaximumEvaluationsParameter.Value.Value);
+        else intValueParam.Value.Value = MaximumEvaluationsParameter.Value.Value;
+      }
+    }
   }
 }
