Index: branches/PerformanceComparison/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionRLDView.Designer.cs
===================================================================
--- branches/PerformanceComparison/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionRLDView.Designer.cs	(revision 12805)
+++ branches/PerformanceComparison/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionRLDView.Designer.cs	(revision 12806)
@@ -46,12 +46,18 @@
       this.components = new System.ComponentModel.Container();
       this.dataTableComboBox = new System.Windows.Forms.ComboBox();
-      this.label1 = new System.Windows.Forms.Label();
+      this.dataTableLabel = new System.Windows.Forms.Label();
       this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
-      this.label2 = new System.Windows.Forms.Label();
+      this.groupLabel = new System.Windows.Forms.Label();
       this.groupComboBox = new System.Windows.Forms.ComboBox();
       this.logScalingCheckBox = new System.Windows.Forms.CheckBox();
       this.targetsTextBox = new System.Windows.Forms.TextBox();
-      this.label3 = new System.Windows.Forms.Label();
+      this.targetsLabel = new System.Windows.Forms.Label();
       this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
+      this.fixedTargetButton = new System.Windows.Forms.Button();
+      this.generateTargetsButton = new System.Windows.Forms.Button();
+      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
+      this.budgetsLabel = new System.Windows.Forms.Label();
+      this.budgetsTextBox = new System.Windows.Forms.TextBox();
+      this.fixedCostButton = new System.Windows.Forms.Button();
       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
       this.SuspendLayout();
@@ -69,12 +75,12 @@
       this.dataTableComboBox.SelectedIndexChanged += new System.EventHandler(this.dataTableComboBox_SelectedIndexChanged);
       // 
-      // label1
-      // 
-      this.label1.AutoSize = true;
-      this.label1.Location = new System.Drawing.Point(3, 33);
-      this.label1.Name = "label1";
-      this.label1.Size = new System.Drawing.Size(60, 13);
-      this.label1.TabIndex = 1;
-      this.label1.Text = "DataTable:";
+      // dataTableLabel
+      // 
+      this.dataTableLabel.AutoSize = true;
+      this.dataTableLabel.Location = new System.Drawing.Point(3, 33);
+      this.dataTableLabel.Name = "dataTableLabel";
+      this.dataTableLabel.Size = new System.Drawing.Size(60, 13);
+      this.dataTableLabel.TabIndex = 1;
+      this.dataTableLabel.Text = "DataTable:";
       // 
       // viewHost
@@ -94,12 +100,12 @@
       this.viewHost.ViewType = null;
       // 
-      // label2
-      // 
-      this.label2.AutoSize = true;
-      this.label2.Location = new System.Drawing.Point(3, 6);
-      this.label2.Name = "label2";
-      this.label2.Size = new System.Drawing.Size(39, 13);
-      this.label2.TabIndex = 3;
-      this.label2.Text = "Group:";
+      // groupLabel
+      // 
+      this.groupLabel.AutoSize = true;
+      this.groupLabel.Location = new System.Drawing.Point(3, 6);
+      this.groupLabel.Name = "groupLabel";
+      this.groupLabel.Size = new System.Drawing.Size(39, 13);
+      this.groupLabel.TabIndex = 3;
+      this.groupLabel.Text = "Group:";
       // 
       // groupComboBox
@@ -133,16 +139,19 @@
       this.targetsTextBox.Location = new System.Drawing.Point(69, 57);
       this.targetsTextBox.Name = "targetsTextBox";
-      this.targetsTextBox.Size = new System.Drawing.Size(455, 20);
+      this.targetsTextBox.Size = new System.Drawing.Size(265, 20);
       this.targetsTextBox.TabIndex = 6;
+      this.toolTip.SetToolTip(this.targetsTextBox, "The order of the targets is important, first to-hit targets\r\nshould be given firs" +
+        "t. The sequence should be monotonous.\r\n\r\nTargets should be separated by semicolo" +
+        "n, tab or space.");
       this.targetsTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.targetsTextBox_Validating);
       // 
-      // label3
-      // 
-      this.label3.AutoSize = true;
-      this.label3.Location = new System.Drawing.Point(3, 60);
-      this.label3.Name = "label3";
-      this.label3.Size = new System.Drawing.Size(46, 13);
-      this.label3.TabIndex = 1;
-      this.label3.Text = "Targets:";
+      // targetsLabel
+      // 
+      this.targetsLabel.AutoSize = true;
+      this.targetsLabel.Location = new System.Drawing.Point(3, 60);
+      this.targetsLabel.Name = "targetsLabel";
+      this.targetsLabel.Size = new System.Drawing.Size(46, 13);
+      this.targetsLabel.TabIndex = 1;
+      this.targetsLabel.Text = "Targets:";
       // 
       // errorProvider
@@ -150,14 +159,73 @@
       this.errorProvider.ContainerControl = this;
       // 
+      // fixedTargetButton
+      // 
+      this.fixedTargetButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.fixedTargetButton.Location = new System.Drawing.Point(435, 54);
+      this.fixedTargetButton.Name = "fixedTargetButton";
+      this.fixedTargetButton.Size = new System.Drawing.Size(89, 23);
+      this.fixedTargetButton.TabIndex = 7;
+      this.fixedTargetButton.Text = "Add as Result";
+      this.fixedTargetButton.UseVisualStyleBackColor = true;
+      this.fixedTargetButton.Click += new System.EventHandler(this.fixedTargetButton_Click);
+      // 
+      // generateTargetsButton
+      // 
+      this.generateTargetsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.generateTargetsButton.Location = new System.Drawing.Point(340, 54);
+      this.generateTargetsButton.Name = "generateTargetsButton";
+      this.generateTargetsButton.Size = new System.Drawing.Size(89, 23);
+      this.generateTargetsButton.TabIndex = 7;
+      this.generateTargetsButton.Text = "Generate...";
+      this.generateTargetsButton.UseVisualStyleBackColor = true;
+      this.generateTargetsButton.Click += new System.EventHandler(this.generateTargetsButton_Click);
+      // 
+      // budgetsLabel
+      // 
+      this.budgetsLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.budgetsLabel.AutoSize = true;
+      this.budgetsLabel.Location = new System.Drawing.Point(235, 353);
+      this.budgetsLabel.Name = "budgetsLabel";
+      this.budgetsLabel.Size = new System.Drawing.Size(49, 13);
+      this.budgetsLabel.TabIndex = 1;
+      this.budgetsLabel.Text = "Budgets:";
+      // 
+      // budgetsTextBox
+      // 
+      this.budgetsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.budgetsTextBox.Location = new System.Drawing.Point(290, 350);
+      this.budgetsTextBox.Name = "budgetsTextBox";
+      this.budgetsTextBox.Size = new System.Drawing.Size(139, 20);
+      this.budgetsTextBox.TabIndex = 6;
+      this.budgetsTextBox.Text = "1e2 ; 1e3 ; 1e4 ; 1e5 ; 1e6";
+      this.budgetsTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.targetsTextBox_Validating);
+      // 
+      // fixedCostButton
+      // 
+      this.fixedCostButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.fixedCostButton.Location = new System.Drawing.Point(435, 348);
+      this.fixedCostButton.Name = "fixedCostButton";
+      this.fixedCostButton.Size = new System.Drawing.Size(89, 23);
+      this.fixedCostButton.TabIndex = 7;
+      this.fixedCostButton.Text = "Add as Result";
+      this.fixedCostButton.UseVisualStyleBackColor = true;
+      this.fixedCostButton.Click += new System.EventHandler(this.fixedCostButton_Click);
+      // 
       // RunCollectionRLDView
       // 
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.generateTargetsButton);
+      this.Controls.Add(this.fixedCostButton);
+      this.Controls.Add(this.fixedTargetButton);
+      this.Controls.Add(this.budgetsTextBox);
       this.Controls.Add(this.targetsTextBox);
       this.Controls.Add(this.logScalingCheckBox);
       this.Controls.Add(this.groupComboBox);
-      this.Controls.Add(this.label2);
+      this.Controls.Add(this.groupLabel);
+      this.Controls.Add(this.budgetsLabel);
       this.Controls.Add(this.viewHost);
-      this.Controls.Add(this.label3);
-      this.Controls.Add(this.label1);
+      this.Controls.Add(this.targetsLabel);
+      this.Controls.Add(this.dataTableLabel);
       this.Controls.Add(this.dataTableComboBox);
       this.Name = "RunCollectionRLDView";
@@ -172,12 +240,18 @@
 
     private System.Windows.Forms.ComboBox dataTableComboBox;
-    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.Label dataTableLabel;
     private MainForm.WindowsForms.ViewHost viewHost;
-    private System.Windows.Forms.Label label2;
+    private System.Windows.Forms.Label groupLabel;
     private System.Windows.Forms.ComboBox groupComboBox;
     private System.Windows.Forms.CheckBox logScalingCheckBox;
     private System.Windows.Forms.TextBox targetsTextBox;
-    private System.Windows.Forms.Label label3;
+    private System.Windows.Forms.Label targetsLabel;
     protected System.Windows.Forms.ErrorProvider errorProvider;
+    private System.Windows.Forms.Button fixedTargetButton;
+    private System.Windows.Forms.Button generateTargetsButton;
+    private System.Windows.Forms.ToolTip toolTip;
+    private System.Windows.Forms.Button fixedCostButton;
+    private System.Windows.Forms.TextBox budgetsTextBox;
+    private System.Windows.Forms.Label budgetsLabel;
   }
 }
Index: branches/PerformanceComparison/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionRLDView.cs
===================================================================
--- branches/PerformanceComparison/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionRLDView.cs	(revision 12805)
+++ branches/PerformanceComparison/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionRLDView.cs	(revision 12806)
@@ -29,5 +29,7 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core.Views;
+using HeuristicLab.Data;
 using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
 
 namespace HeuristicLab.Optimization.Views {
@@ -156,4 +158,11 @@
         UpdateDataTableComboBox();
       }
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      groupComboBox.Enabled = Content != null;
+      dataTableComboBox.Enabled = Content != null;
+      fixedTargetButton.Enabled = Content != null && levels != null && dataTableComboBox.SelectedIndex >= 0;
     }
 
@@ -172,5 +181,5 @@
           var worst = Content.Select(x => ((IndexedDataTable<double>)x.Results[table]).Rows.First().Values.Max(y => y.Item2)).First();
           var best = Content.Select(x => ((IndexedDataTable<double>)x.Results[table]).Rows.First().Values.Min(y => y.Item2)).Last();
-          levels = Enumerable.Range(0, 51).Select(x => worst + (x / 50.0) * (best - worst)).ToArray();
+          levels = Enumerable.Range(0, 11).Select(x => worst + (x / 10.0) * (best - worst)).ToArray();
           suppressTargetsEvents = true;
           targetsTextBox.Text = string.Join(" ; ", levels);
@@ -263,7 +272,9 @@
     private void groupComboBox_SelectedIndexChanged(object sender, EventArgs e) {
       UpdateRuns();
+      SetEnabledStateOfControls();
     }
     private void dataTableComboBox_SelectedIndexChanged(object sender, EventArgs e) {
       UpdateRuns();
+      SetEnabledStateOfControls();
     }
 
@@ -294,4 +305,101 @@
       errorProvider.SetError(targetsTextBox, null);
       levels = targetList.ToArray();
+      UpdateRuns();
+      SetEnabledStateOfControls();
+    }
+
+    private void generateTargetsButton_Click(object sender, EventArgs e) {
+      decimal max = 1, min = 0, count = 10;
+      if (levels != null) {
+        max = (decimal)Math.Max(levels.First(), levels.Last());
+        min = (decimal)Math.Min(levels.First(), levels.Last());
+        count = levels.Length;
+      } else if (Content.Count > 0 && dataTableComboBox.SelectedIndex >= 0) {
+        var table = (string)dataTableComboBox.SelectedItem;
+        var worst = Content.Select(x => ((IndexedDataTable<double>)x.Results[table]).Rows.First().Values.Max(y => y.Item2)).First();
+        var best = Content.Select(x => ((IndexedDataTable<double>)x.Results[table]).Rows.First().Values.Min(y => y.Item2)).Last();
+        max = (decimal)Math.Max(best, worst);
+        min = (decimal)Math.Min(best, worst);
+        count = 10;
+      }
+      using (var dialog = new DefineArithmeticProgressionDialog(false, min, max, (max - min) / count)) {
+        if (dialog.ShowDialog() == DialogResult.OK) {
+          if (dialog.Values.Any()) {
+            var maximization = true;
+            if (Content.Count > 0 && Content.First().Parameters.ContainsKey("Maximization"))
+              maximization = ((BoolValue)Content.First().Parameters["Maximization"]).Value;
+
+            levels = maximization ? dialog.Values.Select(x => (double)x).ToArray()
+                                  : dialog.Values.Reverse().Select(x => (double)x).ToArray();
+            UpdateRuns();
+            SetEnabledStateOfControls();
+          }
+        }
+      }
+    }
+
+    private void fixedTargetButton_Click(object sender, EventArgs e) {
+      var table = (string)dataTableComboBox.SelectedItem;
+      foreach (var run in Content) {
+        var resultsTable = (IndexedDataTable<double>)run.Results[table];
+        var values = resultsTable.Rows.First().Values;
+        var maximization = values.First().Item2 < values.Last().Item2;
+        var i = 0;
+        var j = 0;
+        var current = values[j];
+        var prev = Tuple.Create(-1.0, double.NaN);
+        while (i < levels.Length) {
+          if (prev.Item2 != current.Item2
+              && (maximization && current.Item2 >= levels[i]
+              || !maximization && current.Item2 <= levels[i])) {
+            run.Results[table + ".Target" + levels[i]] = new DoubleValue(current.Item1);
+            i++;
+          } else {
+            j++;
+            if (j >= values.Count) break;
+            prev = current;
+            current = values[j];
+          }
+        }
+      }
+    }
+
+    private void fixedCostButton_Click(object sender, EventArgs e) {
+      var table = (string)dataTableComboBox.SelectedItem;
+      var budgetStrings = budgetsTextBox.Text.Split(new[] { ';', '\t', ' ' }, StringSplitOptions.RemoveEmptyEntries);
+      if (budgetStrings.Length == 0) {
+        MessageBox.Show("Define a number of budgets.");
+        return;
+      }
+      var budgetList = new List<double>();
+      foreach (var bs in budgetStrings) {
+        double v;
+        if (!double.TryParse(bs, out v)) {
+          MessageBox.Show("Budgets must be a valid number: " + bs);
+          return;
+        }
+        budgetList.Add(v);
+      }
+      budgetList.Sort();
+
+      foreach (var run in Content) {
+        var resultsTable = (IndexedDataTable<double>)run.Results[table];
+        var values = resultsTable.Rows.First().Values;
+        var i = 0;
+        var j = 0;
+        var current = values[j];
+        var prev = Tuple.Create(-1.0, double.NaN);
+        while (i < budgetList.Count) {
+          if (prev.Item2 != current.Item2 && current.Item1 >= budgetList[i]) {
+            run.Results[table + ".Cost" + budgetList[i]] = new DoubleValue(double.IsNaN(prev.Item2) || current.Item1 == budgetList[i] ? current.Item2 : prev.Item2);
+            i++;
+          } else {
+            j++;
+            if (j >= values.Count) break;
+            prev = current;
+            current = values[j];
+          }
+        }
+      }
     }
   }
