Index: branches/PerformanceComparison/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionRLDView.cs
===================================================================
--- branches/PerformanceComparison/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionRLDView.cs	(revision 12864)
+++ branches/PerformanceComparison/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionRLDView.cs	(revision 12865)
@@ -526,4 +526,15 @@
       var lineStyleCount = 0;
 
+      var maximization = IsMaximization();
+      var targetsPerProblem = (from r in Content
+                               let pd = new ProblemDescription(r).ToString()
+                               let target = r.Parameters.ContainsKey("BestKnownQuality")
+                                && r.Parameters["BestKnownQuality"] is DoubleValue
+                                  ? ((DoubleValue)r.Parameters["BestKnownQuality"]).Value
+                                  : ((IndexedDataTable<double>)r.Results[(string)dataTableComboBox.SelectedItem]).Rows.First().Values.Last().Item2
+                               group target by pd into g
+                               select new { Problem = g.Key, Target = maximization ? g.Max() : g.Min() })
+                              .ToDictionary(x => x.Problem, x => x.Target);
+
       foreach (var group in groupedRuns) {
         var hits = new Dictionary<string, SortedList<double, double>>();
@@ -534,7 +545,7 @@
 
             if (eachOrAllBudgetsCheckBox.Checked) {
-              CalculateHitsForEachBudget(hits, resultsTable.Rows.First(), group.Value.Count, group.Key, problem.Value.Item2.Count);
+              CalculateHitsForEachBudget(hits, resultsTable.Rows.First(), maximization, group.Value.Count, group.Key, problem.Value.Item2.Count, targetsPerProblem[problem.Key]);
             } else {
-              CalculateHitsForAllBudgets(hits, resultsTable.Rows.First(), group.Value.Count, group.Key, problem.Value.Item2.Count);
+              CalculateHitsForAllBudgets(hits, resultsTable.Rows.First(), maximization, group.Value.Count, group.Key, problem.Value.Item2.Count, targetsPerProblem[problem.Key]);
             }
           }
@@ -563,5 +574,5 @@
       }
 
-      byCostDataTable.VisualProperties.XAxisTitle = "Targets";
+      byCostDataTable.VisualProperties.XAxisTitle = "Targets to Best-Known Ratio";
       byCostDataTable.VisualProperties.XAxisLogScale = byCostDataTable.Rows.Count > 0 && budgetLogScalingCheckBox.Checked;
     }
@@ -588,5 +599,5 @@
     }
 
-    private void CalculateHitsForEachBudget(Dictionary<string, SortedList<double, double>> hits, IndexedDataRow<double> row, int groupCount, string groupName, int problemCount) {
+    private void CalculateHitsForEachBudget(Dictionary<string, SortedList<double, double>> hits, IndexedDataRow<double> row, bool maximization, int groupCount, string groupName, int problemCount, double bestTarget) {
       foreach (var b in budgets) {
         var key = groupName + "-" + b;
@@ -597,5 +608,6 @@
             // the budget may be too low to achieve any target
             if (prev == null && v.Item1 != b) break;
-            var tgt = (prev == null || v.Item1 == b) ? v.Item2 : prev.Item2;
+            var tgt = ((prev == null || v.Item1 == b) ? v.Item2 : prev.Item2);
+            tgt = maximization ? bestTarget / tgt : tgt / bestTarget;
             if (hits[key].ContainsKey(tgt))
               hits[key][tgt] += 1.0 / (groupCount * problemCount);
@@ -609,5 +621,5 @@
     }
 
-    private void CalculateHitsForAllBudgets(Dictionary<string, SortedList<double, double>> hits, IndexedDataRow<double> row, int groupCount, string groupName, int problemCount) {
+    private void CalculateHitsForAllBudgets(Dictionary<string, SortedList<double, double>> hits, IndexedDataRow<double> row, bool maximization, int groupCount, string groupName, int problemCount, double bestTarget) {
       var values = row.Values;
       if (!hits.ContainsKey(groupName)) hits.Add(groupName, new SortedList<double, double>());
@@ -621,4 +633,5 @@
           if (prev != null || current.Item1 == budgets[i]) {
             var tgt = (prev == null || current.Item1 == budgets[i]) ? current.Item2 : prev.Item2;
+            tgt = maximization ? bestTarget / tgt : tgt / bestTarget;
             if (!hits[groupName].ContainsKey(tgt)) hits[groupName][tgt] = 0;
             hits[groupName][tgt] += 1.0 / (groupCount * problemCount * budgets.Length);
@@ -631,4 +644,5 @@
       }
       var lastTgt = values.Last().Item2;
+      lastTgt = maximization ? bestTarget / lastTgt : lastTgt / bestTarget;
       if (i < budgets.Length && !hits[groupName].ContainsKey(lastTgt)) hits[groupName][lastTgt] = 0;
       while (i < budgets.Length) {
