Index: /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/HeuristicLab.Problems.Orienteering.Views-3.3.csproj
===================================================================
--- /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/HeuristicLab.Problems.Orienteering.Views-3.3.csproj	(revision 11234)
+++ /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/HeuristicLab.Problems.Orienteering.Views-3.3.csproj	(revision 11235)
@@ -51,4 +51,10 @@
       <DependentUpon>OrienteeringProblemView.cs</DependentUpon>
     </Compile>
+    <Compile Include="OrienteeringSolutionView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="OrienteeringSolutionView.Designer.cs">
+      <DependentUpon>OrienteeringSolutionView.cs</DependentUpon>
+    </Compile>
     <Compile Include="Plugin.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
@@ -71,4 +77,12 @@
       <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
       <Name>HeuristicLab.Core-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.IntegerVectorEncoding\3.3\HeuristicLab.Encodings.IntegerVectorEncoding-3.3.csproj">
+      <Project>{DDFB14DD-2A85-493C-A52D-E69729BBAEB0}</Project>
+      <Name>HeuristicLab.Encodings.IntegerVectorEncoding-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj">
Index: /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.Designer.cs
===================================================================
--- /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.Designer.cs	(revision 11235)
+++ /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.Designer.cs	(revision 11235)
@@ -0,0 +1,217 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.Orienteering.Views {
+  partial class OrienteeringSolutionView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.pictureBox = new System.Windows.Forms.PictureBox();
+      this.tabControl = new HeuristicLab.MainForm.WindowsForms.DragOverTabControl();
+      this.visualizationTabPage = new System.Windows.Forms.TabPage();
+      this.valueTabPage = new System.Windows.Forms.TabPage();
+      this.tourGroupBox = new System.Windows.Forms.GroupBox();
+      this.tourViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      this.splitContainer = new System.Windows.Forms.SplitContainer();
+      this.qualityGroupBox = new System.Windows.Forms.GroupBox();
+      this.qualityViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
+      this.tabControl.SuspendLayout();
+      this.visualizationTabPage.SuspendLayout();
+      this.valueTabPage.SuspendLayout();
+      this.tourGroupBox.SuspendLayout();
+      this.splitContainer.Panel1.SuspendLayout();
+      this.splitContainer.Panel2.SuspendLayout();
+      this.splitContainer.SuspendLayout();
+      this.qualityGroupBox.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // pictureBox
+      // 
+      this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.pictureBox.BackColor = System.Drawing.Color.White;
+      this.pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+      this.pictureBox.Location = new System.Drawing.Point(6, 6);
+      this.pictureBox.Name = "pictureBox";
+      this.pictureBox.Size = new System.Drawing.Size(403, 288);
+      this.pictureBox.TabIndex = 0;
+      this.pictureBox.TabStop = false;
+      this.pictureBox.SizeChanged += new System.EventHandler(this.pictureBox_SizeChanged);
+      // 
+      // tabControl
+      // 
+      this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.tabControl.Controls.Add(this.visualizationTabPage);
+      this.tabControl.Controls.Add(this.valueTabPage);
+      this.tabControl.Location = new System.Drawing.Point(0, 3);
+      this.tabControl.Name = "tabControl";
+      this.tabControl.SelectedIndex = 0;
+      this.tabControl.Size = new System.Drawing.Size(423, 326);
+      this.tabControl.TabIndex = 0;
+      // 
+      // visualizationTabPage
+      // 
+      this.visualizationTabPage.Controls.Add(this.pictureBox);
+      this.visualizationTabPage.Location = new System.Drawing.Point(4, 22);
+      this.visualizationTabPage.Name = "visualizationTabPage";
+      this.visualizationTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.visualizationTabPage.Size = new System.Drawing.Size(415, 300);
+      this.visualizationTabPage.TabIndex = 0;
+      this.visualizationTabPage.Text = "Visualization";
+      this.visualizationTabPage.UseVisualStyleBackColor = true;
+      // 
+      // valueTabPage
+      // 
+      this.valueTabPage.Controls.Add(this.tourGroupBox);
+      this.valueTabPage.Location = new System.Drawing.Point(4, 22);
+      this.valueTabPage.Name = "valueTabPage";
+      this.valueTabPage.Padding = new System.Windows.Forms.Padding(3);
+      this.valueTabPage.Size = new System.Drawing.Size(415, 300);
+      this.valueTabPage.TabIndex = 1;
+      this.valueTabPage.Text = "Value";
+      this.valueTabPage.UseVisualStyleBackColor = true;
+      // 
+      // tourGroupBox
+      // 
+      this.tourGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.tourGroupBox.Controls.Add(this.tourViewHost);
+      this.tourGroupBox.Location = new System.Drawing.Point(6, 6);
+      this.tourGroupBox.Name = "tourGroupBox";
+      this.tourGroupBox.Size = new System.Drawing.Size(403, 288);
+      this.tourGroupBox.TabIndex = 0;
+      this.tourGroupBox.TabStop = false;
+      this.tourGroupBox.Text = "Tour";
+      // 
+      // tourViewHost
+      // 
+      this.tourViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.tourViewHost.Content = null;
+      this.tourViewHost.Location = new System.Drawing.Point(6, 19);
+      this.tourViewHost.Name = "tourViewHost";
+      this.tourViewHost.ReadOnly = false;
+      this.tourViewHost.Size = new System.Drawing.Size(391, 263);
+      this.tourViewHost.TabIndex = 0;
+      this.tourViewHost.ViewType = null;
+      // 
+      // splitContainer
+      // 
+      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer.Location = new System.Drawing.Point(0, 0);
+      this.splitContainer.Name = "splitContainer";
+      this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
+      // 
+      // splitContainer.Panel1
+      // 
+      this.splitContainer.Panel1.Controls.Add(this.qualityGroupBox);
+      // 
+      // splitContainer.Panel2
+      // 
+      this.splitContainer.Panel2.Controls.Add(this.tabControl);
+      this.splitContainer.Size = new System.Drawing.Size(423, 402);
+      this.splitContainer.SplitterDistance = 69;
+      this.splitContainer.TabIndex = 0;
+      // 
+      // qualityGroupBox
+      // 
+      this.qualityGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.qualityGroupBox.Controls.Add(this.qualityViewHost);
+      this.qualityGroupBox.Location = new System.Drawing.Point(0, 0);
+      this.qualityGroupBox.Name = "qualityGroupBox";
+      this.qualityGroupBox.Size = new System.Drawing.Size(423, 66);
+      this.qualityGroupBox.TabIndex = 0;
+      this.qualityGroupBox.TabStop = false;
+      this.qualityGroupBox.Text = "Quality";
+      // 
+      // qualityViewHost
+      // 
+      this.qualityViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.qualityViewHost.Content = null;
+      this.qualityViewHost.Location = new System.Drawing.Point(6, 19);
+      this.qualityViewHost.Name = "qualityViewHost";
+      this.qualityViewHost.ReadOnly = false;
+      this.qualityViewHost.Size = new System.Drawing.Size(411, 41);
+      this.qualityViewHost.TabIndex = 0;
+      this.qualityViewHost.ViewType = null;
+      // 
+      // OrienteeringSolutionView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.splitContainer);
+      this.Name = "OrienteeringSolutionView";
+      this.Size = new System.Drawing.Size(423, 402);
+      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
+      this.tabControl.ResumeLayout(false);
+      this.visualizationTabPage.ResumeLayout(false);
+      this.valueTabPage.ResumeLayout(false);
+      this.tourGroupBox.ResumeLayout(false);
+      this.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel2.ResumeLayout(false);
+      this.splitContainer.ResumeLayout(false);
+      this.qualityGroupBox.ResumeLayout(false);
+      this.ResumeLayout(false);
+    }
+
+    #endregion
+
+    private System.Windows.Forms.PictureBox pictureBox;
+    private HeuristicLab.MainForm.WindowsForms.DragOverTabControl tabControl;
+    private System.Windows.Forms.TabPage visualizationTabPage;
+    private System.Windows.Forms.TabPage valueTabPage;
+    private System.Windows.Forms.GroupBox tourGroupBox;
+    private HeuristicLab.MainForm.WindowsForms.ViewHost tourViewHost;
+    private System.Windows.Forms.SplitContainer splitContainer;
+    private System.Windows.Forms.GroupBox qualityGroupBox;
+    private HeuristicLab.MainForm.WindowsForms.ViewHost qualityViewHost;
+  }
+}
Index: /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.cs
===================================================================
--- /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.cs	(revision 11235)
+++ /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering.Views/3.3/OrienteeringSolutionView.cs	(revision 11235)
@@ -0,0 +1,150 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Drawing;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Problems.Orienteering.Views {
+
+  [View("OrienteeringSolution View")]
+  [Content(typeof(OrienteeringSolution), true)]
+  public partial class OrienteeringSolutionView : ItemView {
+    public new OrienteeringSolution Content {
+      get { return (OrienteeringSolution)base.Content; }
+      set { base.Content = value; }
+    }
+    public OrienteeringSolutionView() {
+      InitializeComponent();
+    }
+
+    protected override void DeregisterContentEvents() {
+      Content.QualityChanged -= new EventHandler(Content_QualityChanged);
+      Content.CoordinatesChanged -= new EventHandler(Content_CoordinatesChanged);
+      Content.IntegerVectorChanged -= new EventHandler(Content_IntegerVectorChanged);
+      base.DeregisterContentEvents();
+    }
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.QualityChanged += new EventHandler(Content_QualityChanged);
+      Content.CoordinatesChanged += new EventHandler(Content_CoordinatesChanged);
+      Content.IntegerVectorChanged += new EventHandler(Content_IntegerVectorChanged);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        qualityViewHost.Content = null;
+        pictureBox.Image = null;
+        tourViewHost.Content = null;
+      } else {
+        qualityViewHost.Content = Content.Quality;
+        GenerateImage();
+        tourViewHost.Content = Content.IntegerVector;
+      }
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      qualityGroupBox.Enabled = Content != null;
+      pictureBox.Enabled = Content != null;
+      tourGroupBox.Enabled = Content != null;
+    }
+
+    private void GenerateImage() {
+      if ((pictureBox.Width > 0) && (pictureBox.Height > 0)) {
+        if (Content == null) {
+          pictureBox.Image = null;
+        } else {
+          var coordinates = Content.Coordinates;
+          var integerVector = Content.IntegerVector;
+          var bitmap = new Bitmap(pictureBox.Width, pictureBox.Height);
+
+          if ((coordinates != null) && (coordinates.Rows > 0) && (coordinates.Columns == 2)) {
+            double xMin = double.MaxValue, yMin = double.MaxValue, xMax = double.MinValue, yMax = double.MinValue;
+            for (int i = 0; i < coordinates.Rows; i++) {
+              if (xMin > coordinates[i, 0]) xMin = coordinates[i, 0];
+              if (yMin > coordinates[i, 1]) yMin = coordinates[i, 1];
+              if (xMax < coordinates[i, 0]) xMax = coordinates[i, 0];
+              if (yMax < coordinates[i, 1]) yMax = coordinates[i, 1];
+            }
+
+            int border = 20;
+            double xStep = xMax != xMin ? (pictureBox.Width - 2 * border) / (xMax - xMin) : 1;
+            double yStep = yMax != yMin ? (pictureBox.Height - 2 * border) / (yMax - yMin) : 1;
+
+            Point[] points = new Point[coordinates.Rows];
+            for (int i = 0; i < coordinates.Rows; i++)
+              points[i] = new Point(border + ((int)((coordinates[i, 0] - xMin) * xStep)),
+                                    bitmap.Height - (border + ((int)((coordinates[i, 1] - yMin) * yStep))));
+
+            using (Graphics graphics = Graphics.FromImage(bitmap)) {
+              if (integerVector != null && integerVector.Length > 1) {
+                Point[] tour = new Point[integerVector.Length];
+                for (int i = 0; i < integerVector.Length; i++) {
+                  tour[i] = points[integerVector[i]];
+                }
+                graphics.DrawPolygon(Pens.Black, tour);
+              }
+              for (int i = 0; i < points.Length; i++)
+                graphics.FillRectangle(Brushes.Red, points[i].X - 2, points[i].Y - 2, 6, 6);
+            }
+          } else {
+            using (Graphics graphics = Graphics.FromImage(bitmap)) {
+              graphics.Clear(Color.White);
+              Font font = new Font(FontFamily.GenericSansSerif, 12, FontStyle.Regular);
+              string text = "No coordinates defined or in wrong format.";
+              SizeF strSize = graphics.MeasureString(text, font);
+              graphics.DrawString(text, font, Brushes.Black, (float)(pictureBox.Width - strSize.Width) / 2.0f, (float)(pictureBox.Height - strSize.Height) / 2.0f);
+            }
+          }
+          pictureBox.Image = bitmap;
+        }
+      }
+    }
+
+    private void Content_QualityChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_QualityChanged), sender, e);
+      else
+        qualityViewHost.Content = Content.Quality;
+    }
+    private void Content_CoordinatesChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_CoordinatesChanged), sender, e);
+      else
+        GenerateImage();
+    }
+    private void Content_IntegerVectorChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_IntegerVectorChanged), sender, e);
+      else {
+        GenerateImage();
+        tourViewHost.Content = Content.IntegerVector;
+      }
+    }
+
+    private void pictureBox_SizeChanged(object sender, EventArgs e) {
+      GenerateImage();
+    }
+  }
+}
Index: /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Shakers/OrienteeringShakingOperator.cs
===================================================================
--- /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Shakers/OrienteeringShakingOperator.cs	(revision 11234)
+++ /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.Orienteering/3.3/Shakers/OrienteeringShakingOperator.cs	(revision 11235)
@@ -214,11 +214,11 @@
       ).ToList();
 
-      double tourLength = distances.CalculateTourLength(actualTour, fixedPenalty);
+      //double tourLength = distances.CalculateTourLength(actualTour, fixedPenalty);
 
       // As long as the created path is infeasible, remove elements
-      while (tourLength > maxDistance) {
+      while (distances.CalculateTourLength(actualTour, fixedPenalty) > maxDistance) {
         // Remove the point that frees the largest distance
         actualTour.RemoveAt(distanceSavings[0].Index);
-        tourLength -= distanceSavings[0].Saving;
+        //tourLength -= distanceSavings[0].Saving;
 
         // Shift indices due to removal of a point in the tour
