Index: branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem.Views/3.3/ExpertSystemView.cs
===================================================================
--- branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem.Views/3.3/ExpertSystemView.cs	(revision 13551)
+++ branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem.Views/3.3/ExpertSystemView.cs	(revision 13561)
@@ -21,9 +21,9 @@
 
 using System;
-using System.Collections;
 using System.ComponentModel;
 using System.Linq;
+using System.Text.RegularExpressions;
 using System.Windows.Forms;
-using HeuristicLab.Common;
+using System.Windows.Forms.DataVisualization.Charting;
 using HeuristicLab.Common.Resources;
 using HeuristicLab.Core.Views;
@@ -172,8 +172,8 @@
 
     #region Control events
-    private void maxEvaluationsTextBox_Validating(object sender, CancelEventArgs e) {
+    private void MaxEvaluationsTextBoxOnValidating(object sender, CancelEventArgs e) {
       if (SuppressEvents) return;
       if (InvokeRequired) {
-        Invoke((Action<object, CancelEventArgs>)maxEvaluationsTextBox_Validating, sender, e);
+        Invoke((Action<object, CancelEventArgs>)MaxEvaluationsTextBoxOnValidating, sender, e);
         return;
       }
@@ -189,47 +189,23 @@
     }
     #endregion
-
-    private bool validDragOperation;
-    private void instancesDropPanel_DragEnter(object sender, DragEventArgs e) {
-      validDragOperation = false;
-      if (!ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IRun)) {
-        validDragOperation = true;
-      } else if (!ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable)) {
-        validDragOperation = true;
-        var items = (IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
-        foreach (object item in items)
-          validDragOperation = validDragOperation && (item is IRun);
-      }
-    }
-    private void instancesDropPanel_DragOver(object sender, DragEventArgs e) {
-      e.Effect = DragDropEffects.None;
-      if (!validDragOperation) return;
-      if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link;  // ALT key
-      else if ((e.KeyState & 4) == 4) e.Effect = DragDropEffects.Move;  // SHIFT key
-      else if (e.AllowedEffect.HasFlag(DragDropEffects.Copy)) e.Effect = DragDropEffects.Copy;
-      else if (e.AllowedEffect.HasFlag(DragDropEffects.Move)) e.Effect = DragDropEffects.Move;
-      else if (e.AllowedEffect.HasFlag(DragDropEffects.Link)) e.Effect = DragDropEffects.Link;
-    }
-    private void instancesDropPanel_DragDrop(object sender, DragEventArgs e) {
-      if (e.Effect == DragDropEffects.None) return;
-      if (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IRun) {
-        var item = (IRun)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat);
-        Content.ProblemInstances.Add(e.Effect.HasFlag(DragDropEffects.Copy) ? (IRun)item.Clone() : item);
-      } else if (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable) {
-        var items = ((IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat)).Cast<IRun>();
-        if (e.Effect.HasFlag(DragDropEffects.Copy)) {
-          var cloner = new Cloner();
-          items = items.Select(x => cloner.Clone(x));
-        }
-        Content.ProblemInstances.AddRange(items);
-      }
-    }
     #endregion
 
-    private void refreshMapButton_Click(object sender, EventArgs e) {
-      Content.UpdateInstanceMap();
-    }
-
-    private void okbDownloadButton_Click(object sender, EventArgs e) {
+    private void RefreshMapButtonOnClick(object sender, EventArgs e) {
+      Content.UpdateInstanceProjection();
+      UpdateProjectionComboBox();
+    }
+
+    private void UpdateProjectionComboBox() {
+      projectionComboBox.Items.Clear();
+      var projStrings = Content.ProblemInstances
+        .SelectMany(x => x.Results.Where(y => Regex.IsMatch(y.Key, "^Projection[.].*[.][XY]$")))
+        .Select(x => Regex.Match(x.Key, "Projection[.](?<g>.*)[.][XY]").Groups["g"].Value)
+        .Distinct();
+      foreach (var str in projStrings) {
+        projectionComboBox.Items.Add(str);
+      }
+    }
+
+    private void OkbDownloadButtonOnClick(object sender, EventArgs e) {
       if (Content.Problem.ProblemId < 0) {
         MessageBox.Show("Please select a problem instance first.");
@@ -254,5 +230,5 @@
     }
 
-    private void algorithmStartButton_Click(object sender, EventArgs e) {
+    private void AlgorithmStartButtonOnClick(object sender, EventArgs e) {
       var selectedInstance = (IAlgorithm)suggestedInstancesComboBox.SelectedItem;
       var clone = (IAlgorithm)selectedInstance.Clone();
@@ -261,4 +237,35 @@
       algorithmViewHost.Content = clone.Results;
     }
+
+    private void ProjectionComboBoxOnSelectedIndexChanged(object sender, EventArgs e) {
+      if (projectionComboBox.SelectedIndex < 0) return;
+      var projection = (string)projectionComboBox.SelectedItem;
+      var instancesSeries = instanceMapChart.Series["InstancesSeries"];
+      var currentInstanceSeries = instanceMapChart.Series["CurrentInstanceSeries"];
+
+      instancesSeries.Points.Clear();
+      currentInstanceSeries.Points.Clear();
+
+      foreach (var run in Content.ProblemInstances) {
+        var xKey = "Projection." + projection + ".X";
+        var yKey = "Projection." + projection + ".Y";
+        if (!run.Results.ContainsKey(xKey) || !run.Results.ContainsKey(yKey)
+          || !(run.Results[xKey] is Data.DoubleValue) || !(run.Results[yKey] is Data.DoubleValue)) continue;
+        var x = ((Data.DoubleValue)run.Results[xKey]).Value;
+        var y = ((Data.DoubleValue)run.Results[yKey]).Value;
+        var dataPoint = new DataPoint(x, y) {
+          Label = run.Name
+        };
+        instancesSeries.Points.Add(dataPoint);
+      }
+
+      var curPoint = Content.ProjectCurrentInstance(projection);
+      if (curPoint != null) {
+        var dp = new DataPoint(curPoint.Item1, curPoint.Item2) {
+          Label = Content.Problem.Problem.Name
+        };
+        currentInstanceSeries.Points.Add(dp);
+      }
+    }
   }
 }
