Index: /branches/PerformanceComparison/HeuristicLab.Analysis/3.3/HeuristicLab.Analysis-3.3.csproj
===================================================================
--- /branches/PerformanceComparison/HeuristicLab.Analysis/3.3/HeuristicLab.Analysis-3.3.csproj	(revision 12955)
+++ /branches/PerformanceComparison/HeuristicLab.Analysis/3.3/HeuristicLab.Analysis-3.3.csproj	(revision 12956)
@@ -208,4 +208,5 @@
     <Compile Include="QualityAnalysis\BestAverageWorstQualityCalculator.cs" />
     <Compile Include="QualityAnalysis\BestQualityMemorizer.cs" />
+    <Compile Include="QualityAnalysis\ExpectedRuntimeHelper.cs" />
     <Compile Include="QualityAnalysis\QualityAnalyzer.cs" />
     <Compile Include="QualityAnalysis\QualityDifferenceCalculator.cs" />
Index: /branches/PerformanceComparison/HeuristicLab.Analysis/3.3/QualityAnalysis/ExpectedRuntimeHelper.cs
===================================================================
--- /branches/PerformanceComparison/HeuristicLab.Analysis/3.3/QualityAnalysis/ExpectedRuntimeHelper.cs	(revision 12956)
+++ /branches/PerformanceComparison/HeuristicLab.Analysis/3.3/QualityAnalysis/ExpectedRuntimeHelper.cs	(revision 12956)
@@ -0,0 +1,53 @@
+﻿using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Analysis {
+  public static class ExpectedRuntimeHelper {
+    public static ErtCalculationResult CalculateErt(List<IRun> runs, string indexedDataTableName, double target, bool maximization) {
+      var successful = new List<double>();
+      var unsuccessful = new List<double>();
+      foreach (var r in runs) {
+        var targetAchieved = false;
+        var row = ((IndexedDataTable<double>)r.Results[indexedDataTableName]).Rows.First();
+        foreach (var v in row.Values) {
+          if (maximization && v.Item2 >= target || !maximization && v.Item2 <= target) {
+            successful.Add(v.Item1);
+            targetAchieved = true;
+            break;
+          }
+        }
+        if (!targetAchieved) unsuccessful.Add(row.Values.Last().Item1);
+      }
+
+      var ert = double.NaN;
+
+      if (successful.Count > 0) {
+        if (unsuccessful.Count == 0) ert = successful.Average();
+        else {
+          var ps = successful.Count / (double)(successful.Count + unsuccessful.Count);
+          ert = successful.Average() + ((1.0 - ps) / ps) * unsuccessful.Average();
+        }
+      }
+      return new ErtCalculationResult(successful.Count, (successful.Count + unsuccessful.Count), ert);
+    }
+  }
+
+  public struct ErtCalculationResult {
+    public int SuccessfulRuns;
+    public int TotalRuns;
+    public double ExpectedRuntime;
+
+    public ErtCalculationResult(int successful, int total, double ert) {
+      SuccessfulRuns = successful;
+      TotalRuns = total;
+      ExpectedRuntime = ert;
+    }
+
+    public override string ToString() {
+      return SuccessfulRuns == 0 ? "\u221e"
+                                 : ExpectedRuntime.ToString("##,0.0", CultureInfo.CurrentCulture.NumberFormat);
+    }
+  }
+}
Index: /branches/PerformanceComparison/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionRLDView.cs
===================================================================
--- /branches/PerformanceComparison/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionRLDView.cs	(revision 12955)
+++ /branches/PerformanceComparison/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionRLDView.cs	(revision 12956)
@@ -423,5 +423,8 @@
       var maximization = IsMaximization();
 
-      var targetsPerProblem = CalculateBestTargetPerProblemInstance((string)dataTableComboBox.SelectedItem, maximization);
+      var tableName = (string)dataTableComboBox.SelectedItem;
+      if (string.IsNullOrEmpty(tableName)) return;
+
+      var targetsPerProblem = CalculateBestTargetPerProblemInstance(tableName, maximization);
 
       var colNames = new string[columns];
@@ -448,11 +451,10 @@
           }
           var runs = group.Value[problem].Item2;
-          var bestSucc = string.Empty;
+          ErtCalculationResult result = default(ErtCalculationResult);
           for (var i = 0; i < targets.Length; i++) {
-            string succ;
-            matrix[rowCount, i + 1] = CalculateExpectedRunTime(runs, (maximization ? (1 - targets[i]) : (1 + targets[i])) * group.Value[problem].Item1, maximization, out succ);
-            if (i == targets.Length - 1) bestSucc = succ;
-          }
-          matrix[rowCount, columns - 1] = bestSucc;
+            result = ExpectedRuntimeHelper.CalculateErt(runs, tableName, (maximization ? (1 - targets[i]) : (1 + targets[i])) * group.Value[problem].Item1, maximization);
+            matrix[rowCount, i + 1] = result.ToString();
+          }
+          matrix[rowCount, columns - 1] = targets.Length > 0 ? result.SuccessfulRuns + "/" + result.TotalRuns : "-";
           rowCount++;
         }
@@ -462,29 +464,5 @@
     }
 
-    private string CalculateExpectedRunTime(List<IRun> group, double target, bool maximization, out string successProb) {
-      var table = (string)dataTableComboBox.SelectedItem;
-      successProb = "-";
-      if (string.IsNullOrEmpty(table)) return "N/A";
-      var successful = new List<double>();
-      var unsuccessful = new List<double>();
-      foreach (var r in group) {
-        var targetAchieved = false;
-        var row = ((IndexedDataTable<double>)r.Results[table]).Rows.First();
-        foreach (var v in row.Values) {
-          if (maximization && v.Item2 >= target || !maximization && v.Item2 <= target) {
-            successful.Add(v.Item1);
-            targetAchieved = true;
-            break;
-          }
-        }
-        if (!targetAchieved) unsuccessful.Add(row.Values.Last().Item1);
-      }
-      successProb = successful.Count + "/" + (successful.Count + unsuccessful.Count);
-      if (successful.Count == 0) return "\u221e"; // infinity symbol
-      if (unsuccessful.Count == 0) return successful.Average().ToString("##,0.0", CultureInfo.CurrentCulture.NumberFormat);
-
-      var ps = successful.Count / (double)(successful.Count + unsuccessful.Count);
-      return (successful.Average() + ((1.0 - ps) / ps) * unsuccessful.Average()).ToString("##,0.0", CultureInfo.CurrentCulture.NumberFormat);
-    }
+
     #endregion
 
