Index: /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/HeuristicLab.Problems.Knapsack.Views-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/HeuristicLab.Problems.Knapsack.Views-3.3.csproj	(revision 3466)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/HeuristicLab.Problems.Knapsack.Views-3.3.csproj	(revision 3467)
@@ -83,5 +83,16 @@
   <ItemGroup>
     <Compile Include="HeuristicLabProblemsKnapsackViewsPlugin.cs" />
+    <Compile Include="KnapsackSolutionView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="KnapsackSolutionView.Designer.cs">
+      <DependentUpon>KnapsackSolutionView.cs</DependentUpon>
+    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
   </ItemGroup>
   <ItemGroup>
@@ -95,4 +106,12 @@
       <Name>HeuristicLab.Collections-3.3</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.2\HeuristicLab.Common.Resources-3.2.csproj">
+      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj">
       <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project>
@@ -102,4 +121,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.BinaryVectorEncoding\3.3\HeuristicLab.Encodings.BinaryVectorEncoding-3.3.csproj">
+      <Project>{66D249C3-A01D-42A8-82A2-919BC8EC3D83}</Project>
+      <Name>HeuristicLab.Encodings.BinaryVectorEncoding-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj">
@@ -119,4 +146,12 @@
       <Name>HeuristicLab.Optimization-3.3</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimizer\3.3\HeuristicLab.Optimizer-3.3.csproj">
+      <Project>{C664305E-497C-4533-A140-967DEDB05C19}</Project>
+      <Name>HeuristicLab.Optimizer-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
@@ -127,4 +162,13 @@
       <Name>HeuristicLab.Problems.Knapsack-3.3</Name>
     </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="KnapsackSolutionView.resx">
+      <DependentUpon>KnapsackSolutionView.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/HeuristicLabProblemsKnapsackViewsPlugin.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/HeuristicLabProblemsKnapsackViewsPlugin.cs.frame	(revision 3466)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/HeuristicLabProblemsKnapsackViewsPlugin.cs.frame	(revision 3467)
@@ -29,10 +29,15 @@
   [PluginFile("HeuristicLab.Problems.Knapsack.Views-3.3.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.2")]
   [PluginDependency("HeuristicLab.Core", "3.3")]
   [PluginDependency("HeuristicLab.Core.Views", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.BinaryVectorEncoding", "3.3")]
   [PluginDependency("HeuristicLab.MainForm", "3.3")]
   [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
   [PluginDependency("HeuristicLab.Optimization", "3.3")]
   [PluginDependency("HeuristicLab.Optimization.Views", "3.3")]
+  [PluginDependency("HeuristicLab.Optimizer", "3.3")]
   [PluginDependency("HeuristicLab.Problems.Knapsack", "3.3")]
   public class HeuristicLabProblemsKnapsackViewsPlugin : PluginBase {
Index: /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/KnapsackSolutionView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/KnapsackSolutionView.Designer.cs	(revision 3467)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/KnapsackSolutionView.Designer.cs	(revision 3467)
@@ -0,0 +1,157 @@
+﻿namespace HeuristicLab.Problems.Knapsack.Views {
+  partial class KnapsackSolutionView {
+    /// <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 Windows Form 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.splitContainer = new System.Windows.Forms.SplitContainer();
+      this.label6 = new System.Windows.Forms.Label();
+      this.label5 = new System.Windows.Forms.Label();
+      this.label4 = new System.Windows.Forms.Label();
+      this.label3 = new System.Windows.Forms.Label();
+      this.label2 = new System.Windows.Forms.Label();
+      this.label1 = new System.Windows.Forms.Label();
+      this.pictureBox = new System.Windows.Forms.PictureBox();
+      this.splitContainer.Panel1.SuspendLayout();
+      this.splitContainer.Panel2.SuspendLayout();
+      this.splitContainer.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // splitContainer
+      // 
+      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
+      this.splitContainer.IsSplitterFixed = true;
+      this.splitContainer.Location = new System.Drawing.Point(0, 0);
+      this.splitContainer.Name = "splitContainer";
+      // 
+      // splitContainer.Panel1
+      // 
+      this.splitContainer.Panel1.Controls.Add(this.label6);
+      this.splitContainer.Panel1.Controls.Add(this.label5);
+      this.splitContainer.Panel1.Controls.Add(this.label4);
+      this.splitContainer.Panel1.Controls.Add(this.label3);
+      this.splitContainer.Panel1.Controls.Add(this.label2);
+      this.splitContainer.Panel1.Controls.Add(this.label1);
+      // 
+      // splitContainer.Panel2
+      // 
+      this.splitContainer.Panel2.Controls.Add(this.pictureBox);
+      this.splitContainer.Size = new System.Drawing.Size(392, 310);
+      this.splitContainer.SplitterDistance = 140;
+      this.splitContainer.TabIndex = 0;
+      // 
+      // label6
+      // 
+      this.label6.AutoSize = true;
+      this.label6.Location = new System.Drawing.Point(2, 37);
+      this.label6.Name = "label6";
+      this.label6.Size = new System.Drawing.Size(116, 13);
+      this.label6.TabIndex = 5;
+      this.label6.Text = "Filled rectangles - items";
+      // 
+      // label5
+      // 
+      this.label5.AutoSize = true;
+      this.label5.Location = new System.Drawing.Point(2, 23);
+      this.label5.Name = "label5";
+      this.label5.Size = new System.Drawing.Size(125, 13);
+      this.label5.TabIndex = 4;
+      this.label5.Text = "Big rectangle - knapsack";
+      // 
+      // label4
+      // 
+      this.label4.AutoSize = true;
+      this.label4.Location = new System.Drawing.Point(5, 80);
+      this.label4.Name = "label4";
+      this.label4.Size = new System.Drawing.Size(131, 13);
+      this.label4.TabIndex = 3;
+      this.label4.Text = "Rectangle height = weight";
+      // 
+      // label3
+      // 
+      this.label3.AutoSize = true;
+      this.label3.Location = new System.Drawing.Point(4, 52);
+      this.label3.Name = "label3";
+      this.label3.Size = new System.Drawing.Size(134, 13);
+      this.label3.TabIndex = 2;
+      this.label3.Text = "Dark color = more valuable";
+      // 
+      // label2
+      // 
+      this.label2.AutoSize = true;
+      this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+      this.label2.Location = new System.Drawing.Point(3, 10);
+      this.label2.Name = "label2";
+      this.label2.Size = new System.Drawing.Size(49, 13);
+      this.label2.TabIndex = 1;
+      this.label2.Text = "Legend";
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(5, 66);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(129, 13);
+      this.label1.TabIndex = 0;
+      this.label1.Text = "Light color = less valuable";
+      // 
+      // pictureBox
+      // 
+      this.pictureBox.BackColor = System.Drawing.Color.White;
+      this.pictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.pictureBox.Location = new System.Drawing.Point(0, 0);
+      this.pictureBox.Name = "pictureBox";
+      this.pictureBox.Size = new System.Drawing.Size(248, 310);
+      this.pictureBox.TabIndex = 1;
+      this.pictureBox.TabStop = false;
+      this.pictureBox.SizeChanged += new System.EventHandler(this.pictureBox_SizeChanged);
+      // 
+      // KnapsackSolutionView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.Controls.Add(this.splitContainer);
+      this.Name = "KnapsackSolutionView";
+      this.Size = new System.Drawing.Size(392, 310);
+      this.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel1.PerformLayout();
+      this.splitContainer.Panel2.ResumeLayout(false);
+      this.splitContainer.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.SplitContainer splitContainer;
+    private System.Windows.Forms.PictureBox pictureBox;
+    private System.Windows.Forms.Label label4;
+    private System.Windows.Forms.Label label3;
+    private System.Windows.Forms.Label label2;
+    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.Label label6;
+    private System.Windows.Forms.Label label5;
+
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/KnapsackSolutionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/KnapsackSolutionView.cs	(revision 3467)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/KnapsackSolutionView.cs	(revision 3467)
@@ -0,0 +1,213 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.Problems.Knapsack;
+using HeuristicLab.Data;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.Knapsack.Views {
+  /// <summary>
+  /// A view for a knapsack solution.
+  /// </summary>
+  [View("Knapsack View")]
+  [Content(typeof(KnapsackSolution), true)]
+  public partial class KnapsackSolutionView : HeuristicLab.Core.Views.ItemView {
+    public new KnapsackSolution Content {
+      get { return (KnapsackSolution)base.Content; }
+      set { base.Content = value; }
+    }
+    
+    public KnapsackSolutionView() {
+      InitializeComponent();
+    }
+
+    public KnapsackSolutionView(KnapsackSolution content)
+      : this() {
+      Content = content;
+    }
+
+    protected override void DeregisterContentEvents() {
+      Content.BinaryVectorChanged -= new EventHandler(Content_BinaryVectorChanged);
+      Content.CapacityChanged -= new EventHandler(Content_CapacityChanged);
+      Content.WeightsChanged -= new EventHandler(Content_WeightsChanged);
+      Content.ValuesChanged -= new EventHandler(Content_ValuesChanged);
+      base.DeregisterContentEvents();
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.BinaryVectorChanged += new EventHandler(Content_BinaryVectorChanged);
+      Content.CapacityChanged += new EventHandler(Content_CapacityChanged);
+      Content.WeightsChanged += new EventHandler(Content_WeightsChanged);
+      Content.ValuesChanged += new EventHandler(Content_ValuesChanged);
+    }
+
+    void Content_BinaryVectorChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_BinaryVectorChanged), sender, e);
+      else
+        GenerateImage();
+    }
+
+    void Content_CapacityChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_CapacityChanged), sender, e);
+      else
+        GenerateImage();
+    }
+
+    void Content_WeightsChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_WeightsChanged), sender, e);
+      else
+        GenerateImage();
+    }
+
+    void Content_ValuesChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_ValuesChanged), sender, e);
+      else
+        GenerateImage();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        pictureBox.Image = null;
+      } else {
+        GenerateImage();
+      }
+      SetEnabledStateOfControls();
+    }
+
+    protected override void OnReadOnlyChanged() {
+      base.OnReadOnlyChanged();
+      SetEnabledStateOfControls();
+    }
+
+    private void SetEnabledStateOfControls() {
+      pictureBox.Enabled = Content != null;
+    }
+
+    private void GenerateImage() {
+      if ((pictureBox.Width > 0) && (pictureBox.Height > 0)) {
+        if (Content == null) {
+          pictureBox.Image = null;
+        } else {
+          Bitmap bitmap = new Bitmap(pictureBox.Width, pictureBox.Height);
+          using (Graphics graphics = Graphics.FromImage(bitmap)) {
+            int border = 10;
+
+            int borderX = border;
+            if (pictureBox.Width - border * 2 < 0)
+              borderX = 0;
+            int width = pictureBox.Width - borderX * 2;
+
+            int borderY = border;
+            if (pictureBox.Height - border * 2 < 0)
+              borderY = 0;
+            int height = pictureBox.Height - borderY * 2;
+
+            //preprocess
+            double capacity = Content.Capacity.Value;
+
+            if (capacity != 0) {
+              double packedCapacity = 0;
+              double maxValue = 0;
+              for (int i = 0; i < Content.BinaryVector.Length; i++) {
+                if (Content.BinaryVector[i]) {
+                  packedCapacity += Content.Weights[i];
+                }
+
+                if (Content.Values[i] > maxValue)
+                  maxValue = Content.Values[i];
+              }
+
+              int knapsackHeight = height;
+              if (packedCapacity > capacity) {
+                knapsackHeight = (int)Math.Round(capacity / packedCapacity * (double)height);
+              }
+
+              //draw knapsack
+              graphics.DrawRectangle(Pens.Black,
+                borderX - 1, borderY - 1, width + 2, knapsackHeight + 2);
+
+              //draw items sorted by value
+              List<int> sortedIndices = new List<int>();
+              for (int i = 0; i < Content.BinaryVector.Length; i++) {
+                if(Content.BinaryVector[i]) {
+                  sortedIndices.Add(i);
+                }
+              }
+
+              sortedIndices.Sort(
+                delegate(int i, int j) {
+                  if (Content.Values[i] < Content.Values[j])
+                    return -1;
+                  else if (Content.Values[i] > Content.Values[j])
+                    return 1;
+                  else
+                    return 0;
+                });
+
+              int currentPosition = pictureBox.Height - borderY;
+              foreach (int i in sortedIndices) {
+                if (Content.BinaryVector[i]) {
+                  
+                  double weight = Content.Weights[i];
+                  double factor = weight / capacity;
+                  int elementHeight = (int)Math.Round(height * factor);
+
+                  double value = Content.Values[i];
+                  //color according to value
+                  int colorValue = 0;
+                  if (value != 0)
+                    colorValue = (int)Math.Round(255.0 * value / maxValue);
+                  Color color = Color.FromArgb(
+                    0, 0, colorValue);
+
+                  using (Brush brush = new SolidBrush(color)) {
+                    graphics.FillRectangle(brush,
+                      borderX, currentPosition - elementHeight, width, elementHeight);
+                  }
+                  graphics.DrawRectangle(Pens.White,
+                    borderX, currentPosition - elementHeight, width, elementHeight);
+
+                  currentPosition -= elementHeight;
+                }
+              }
+            }
+          }
+          pictureBox.Image = bitmap;
+        }
+      }
+    }
+
+    private void pictureBox_SizeChanged(object sender, EventArgs e) {
+      GenerateImage();
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/KnapsackSolutionView.resx
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/KnapsackSolutionView.resx	(revision 3467)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack.Views/3.3/KnapsackSolutionView.resx	(revision 3467)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/HeuristicLab.Problems.Knapsack-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/HeuristicLab.Problems.Knapsack-3.3.csproj	(revision 3466)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/HeuristicLab.Problems.Knapsack-3.3.csproj	(revision 3467)
@@ -87,7 +87,9 @@
     <Compile Include="Interfaces\IKnapsackMoveEvaluator.cs" />
     <Compile Include="KnapsackProblem.cs" />
+    <Compile Include="KnapsackSolution.cs" />
     <Compile Include="MoveEvaluators\KnapsackMoveEvaluator.cs" />
     <Compile Include="MoveEvaluators\KnapsackOneBitflipMoveEvaluator.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Visualizers\BestKnapsackVisualizer.cs" />
   </ItemGroup>
   <ItemGroup>
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IKnapsackSolutionsVisualizer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IKnapsackSolutionsVisualizer.cs	(revision 3466)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Interfaces/IKnapsackSolutionsVisualizer.cs	(revision 3467)
@@ -21,4 +21,7 @@
 
 using HeuristicLab.Optimization;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.Knapsack {
@@ -26,4 +29,9 @@
   /// An interface which represents an operator for visualizing solutions of Knapsack Problems.
   /// </summary>
-  public interface IKnapsackSolutionsVisualizer : ISingleObjectiveSolutionsVisualizer { }
+  public interface IKnapsackSolutionsVisualizer : ISingleObjectiveSolutionsVisualizer {
+    ILookupParameter<ItemArray<BinaryVector>> BinaryVectorParameter { get; }
+    ILookupParameter<IntValue> KnapsackCapacityParameter { get; }
+    ILookupParameter<IntArray> WeightsParameter { get; }
+    ILookupParameter<IntArray> ValuesParameter { get; }
+  }
 }
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackProblem.cs	(revision 3466)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackProblem.cs	(revision 3467)
@@ -32,4 +32,5 @@
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.Knapsack.Visualizers;
 
 namespace HeuristicLab.Problems.Knapsack {
@@ -161,4 +162,5 @@
       RandomBinaryVectorCreator creator = new RandomBinaryVectorCreator();
       KnapsackEvaluator evaluator = new KnapsackEvaluator();
+      IKnapsackSolutionsVisualizer visualizer = new BestKnapsackVisualizer();
 
       Parameters.Add(new ValueParameter<BoolValue>("Maximization", "Set to true as the Knapsack Problem is a maximization problem.", new BoolValue(true)));
@@ -170,5 +172,5 @@
       Parameters.Add(new ValueParameter<IKnapsackEvaluator>("Evaluator", "The operator which should be used to evaluate Knapsack solutions.", evaluator));
       Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this Knapsack instance."));
-      Parameters.Add(new ValueParameter<IKnapsackSolutionsVisualizer>("Visualizer", "The operator which should be used to visualize Knapsack solutions.", null));
+      Parameters.Add(new ValueParameter<IKnapsackSolutionsVisualizer>("Visualizer", "The operator which should be used to visualize Knapsack solutions.", visualizer));
 
       creator.BinaryVectorParameter.ActualName = "KnapsackSolution";
@@ -179,4 +181,5 @@
       ParameterizeSolutionCreator();
       ParameterizeEvaluator();
+      ParameterizeVisualizer();
 
       Initialize();
@@ -219,4 +222,5 @@
       ParameterizeSolutionCreator();
       ParameterizeEvaluator();
+      ParameterizeVisualizer();
       ParameterizeOperators();
       OnSolutionCreatorChanged();
@@ -224,15 +228,19 @@
     private void SolutionCreator_PermutationParameter_ActualNameChanged(object sender, EventArgs e) {
       ParameterizeEvaluator();
+      ParameterizeVisualizer();
       ParameterizeOperators();
     }
     private void EvaluatorParameter_ValueChanged(object sender, EventArgs e) {
       ParameterizeEvaluator();
+      ParameterizeVisualizer();
       OnEvaluatorChanged();
     }
     void KnapsackCapacityParameter_ValueChanged(object sender, EventArgs e) {
       ParameterizeEvaluator();
+      ParameterizeVisualizer();
     }
     void WeightsParameter_ValueChanged(object sender, EventArgs e) {
       ParameterizeEvaluator();
+      ParameterizeVisualizer();
       ParameterizeSolutionCreator();
 
@@ -247,4 +255,5 @@
     void ValuesParameter_ValueChanged(object sender, EventArgs e) {
       ParameterizeEvaluator();
+      ParameterizeVisualizer();
       ParameterizeSolutionCreator();
 
@@ -302,4 +311,14 @@
       }
     }
+    private void ParameterizeVisualizer() {
+      if (Visualizer is IKnapsackSolutionsVisualizer) {
+        IKnapsackSolutionsVisualizer visualizer =
+          (IKnapsackSolutionsVisualizer)Visualizer;
+        visualizer.BinaryVectorParameter.ActualName = SolutionCreator.BinaryVectorParameter.ActualName;
+        visualizer.KnapsackCapacityParameter.ActualName = KnapsackCapacityParameter.Name;
+        visualizer.WeightsParameter.ActualName = WeightsParameter.Name;
+        visualizer.ValuesParameter.ActualName = ValuesParameter.Name;
+      }
+    }
     private void InitializeOperators() {
       operators = new List<IBinaryVectorOperator>();
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackSolution.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackSolution.cs	(revision 3467)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/KnapsackSolution.cs	(revision 3467)
@@ -0,0 +1,221 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Drawing;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Problems.Knapsack {
+  /// <summary>
+  /// Represents a knapsack solution which can be visualized in the GUI.
+  /// </summary>
+  [Item("KnapsackSolution", "Represents a knapsack solution which can be visualized in the GUI.")]
+  [StorableClass]
+  public class KnapsackSolution : Item {
+    public override Image ItemImage {
+      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Image; }
+    }
+
+    [Storable]
+    private BinaryVector binaryVector;
+    public BinaryVector BinaryVector {
+      get { return binaryVector; }
+      set {
+        if (binaryVector != value) {
+          if (binaryVector != null) DeregisterBinaryVectorEvents();
+          binaryVector = value;
+          if (binaryVector != null) RegisterBinaryVectorEvents();
+          OnBinaryVectorChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private IntValue capacity;
+    public IntValue Capacity {
+      get { return capacity; }
+      set {
+        if (capacity != value) {
+          if (capacity != null) DeregisterCapacityEvents();
+          capacity = value;
+          if (capacity != null) RegisterCapacityEvents();
+          OnCapacityChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private IntArray weights;
+    public IntArray Weights {
+      get { return weights; }
+      set {
+        if (weights != value) {
+          if (weights != null) DeregisterWeightsEvents();
+          weights = value;
+          if (weights != null) RegisterWeightsEvents();
+          OnWeightsChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private IntArray values;
+    public IntArray Values {
+      get { return values; }
+      set {
+        if (values != value) {
+          if (values != null) DeregisterValuesEvents();
+          values = value;
+          if (values != null) RegisterValuesEvents();
+          OnValuesChanged();
+        }
+      }
+    }
+
+    public KnapsackSolution() : base() { }
+    public KnapsackSolution(BinaryVector binaryVector, IntValue capacity, IntArray weights, IntArray values)
+      : base() {
+      this.binaryVector = binaryVector;
+      this.capacity = capacity;
+      this.weights = weights;
+      this.values = values;
+      Initialize();
+    }
+    [StorableConstructor]
+    private KnapsackSolution(bool deserializing) : base(deserializing) { }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void Initialize() {
+      if (binaryVector != null) RegisterBinaryVectorEvents();
+      if (capacity != null) RegisterCapacityEvents();
+      if (weights != null) RegisterWeightsEvents();
+      if (values != null) RegisterValuesEvents();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      KnapsackSolution clone = new KnapsackSolution();
+      cloner.RegisterClonedObject(this, clone);
+      clone.binaryVector = (BinaryVector)cloner.Clone(binaryVector);
+      clone.capacity = (IntValue)cloner.Clone(capacity);
+      clone.weights = (IntArray)cloner.Clone(weights);
+      clone.values = (IntArray)cloner.Clone(values);
+      clone.Initialize();
+      return clone;
+    }
+
+    #region Events
+    public event EventHandler BinaryVectorChanged;
+    private void OnBinaryVectorChanged() {
+      var changed = BinaryVectorChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+
+    public event EventHandler CapacityChanged;
+    private void OnCapacityChanged() {
+      var changed = CapacityChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+
+    public event EventHandler WeightsChanged;
+    private void OnWeightsChanged() {
+      var changed = WeightsChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+
+    public event EventHandler ValuesChanged;
+    private void OnValuesChanged() {
+      var changed = ValuesChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+
+    private void RegisterBinaryVectorEvents() {
+      BinaryVector.ItemChanged += new EventHandler<EventArgs<int>>(BinaryVector_ItemChanged);
+      BinaryVector.Reset += new EventHandler(BinaryVector_Reset);
+    }
+
+    private void DeregisterBinaryVectorEvents() {
+      BinaryVector.ItemChanged -= new EventHandler<EventArgs<int>>(BinaryVector_ItemChanged);
+      BinaryVector.Reset -= new EventHandler(BinaryVector_Reset);
+    }
+
+    private void RegisterCapacityEvents() {
+      Capacity.ValueChanged += new EventHandler(Capacity_ValueChanged);
+    }
+
+    private void DeregisterCapacityEvents() {
+      Capacity.ValueChanged -= new EventHandler(Capacity_ValueChanged);
+    }
+
+    private void RegisterWeightsEvents() {
+      Weights.ItemChanged += new EventHandler<EventArgs<int>>(Weights_ItemChanged);
+      Weights.Reset += new EventHandler(Weights_Reset);
+    }
+
+    private void DeregisterWeightsEvents() {
+      Weights.ItemChanged -= new EventHandler<EventArgs<int>>(Weights_ItemChanged);
+      Weights.Reset -= new EventHandler(Weights_Reset);
+    }
+
+    private void RegisterValuesEvents() {
+      Values.ItemChanged += new EventHandler<EventArgs<int>>(Values_ItemChanged);
+      Values.Reset += new EventHandler(Values_Reset);
+    }
+
+    private void DeregisterValuesEvents() {
+      Values.ItemChanged -= new EventHandler<EventArgs<int>>(Values_ItemChanged);
+      Values.Reset -= new EventHandler(Values_Reset);
+    }
+
+    private void BinaryVector_ItemChanged(object sender, EventArgs<int> e) {
+      OnBinaryVectorChanged();
+    }
+    private void BinaryVector_Reset(object sender, EventArgs e) {
+      OnBinaryVectorChanged();
+    }
+    void Capacity_ValueChanged(object sender, EventArgs e) {
+      OnCapacityChanged();
+    }
+    private void Weights_ItemChanged(object sender, EventArgs<int> e) {
+      OnWeightsChanged();
+    }
+    private void Weights_Reset(object sender, EventArgs e) {
+      OnWeightsChanged();
+    }
+    private void Values_ItemChanged(object sender, EventArgs<int> e) {
+      OnValuesChanged();
+    }
+    private void Values_Reset(object sender, EventArgs e) {
+      OnValuesChanged();
+    }
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Visualizers/BestKnapsackVisualizer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Visualizers/BestKnapsackVisualizer.cs	(revision 3467)
+++ /trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Visualizers/BestKnapsackVisualizer.cs	(revision 3467)
@@ -0,0 +1,94 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Optimization;
+using HeuristicLab.Data;
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Encodings.BinaryVectorEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Knapsack.Visualizers {
+  /// <summary>
+  /// An operator for visualizing the best solution for a knapsack problem.
+  /// </summary>
+  [Item("BestKnapsackVisualizer", "An operator for visualizing the best solution for a knapsack problem.")]
+  [StorableClass]
+  class BestKnapsackVisualizer : SingleSuccessorOperator, IKnapsackSolutionsVisualizer {
+
+    public ILookupParameter<ItemArray<BinaryVector>> BinaryVectorParameter {
+      get { return (ILookupParameter<ItemArray<BinaryVector>>)Parameters["BinaryVector"]; }
+    }
+    public ILookupParameter<IntValue> KnapsackCapacityParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["KnapsackCapacity"]; }
+    }
+    public ILookupParameter<IntArray> WeightsParameter {
+      get { return (ILookupParameter<IntArray>)Parameters["Weights"]; }
+    }
+    public ILookupParameter<IntArray> ValuesParameter {
+      get { return (ILookupParameter<IntArray>)Parameters["Values"]; }
+    }
+    public ILookupParameter<ItemArray<DoubleValue>> QualityParameter {
+      get { return (ILookupParameter<ItemArray<DoubleValue>>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<KnapsackSolution> KnapsackSolutionParameter {
+      get { return (ILookupParameter<KnapsackSolution>)Parameters["KnapsackSolutionVisualization"]; }
+    }
+
+    ILookupParameter ISolutionsVisualizer.VisualizationParameter {
+      get { return KnapsackSolutionParameter; }
+    }
+
+    public BestKnapsackVisualizer()
+      : base() {
+      Parameters.Add(new SubScopesLookupParameter<BinaryVector>("BinaryVector", "The knapsack solutions from which the best solution should be visualized."));
+      Parameters.Add(new LookupParameter<IntValue>("KnapsackCapacity", "Capacity of the Knapsack."));
+      Parameters.Add(new LookupParameter<IntArray>("Weights", "The weights of the items."));
+      Parameters.Add(new LookupParameter<IntArray>("Values", "The values of the items."));
+      
+      Parameters.Add(new SubScopesLookupParameter<DoubleValue>("Quality", "The qualities of the knapsack solutions which should be visualized."));
+      Parameters.Add(new LookupParameter<KnapsackSolution>("KnapsackSolutionVisualization", "The visual representation of the best knapsack solution."));
+    }
+
+    public override IOperation Apply() {
+      ItemArray<BinaryVector> binaryVectors = BinaryVectorParameter.ActualValue;
+      ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
+
+      int i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
+      KnapsackSolution solution = KnapsackSolutionParameter.ActualValue;
+      if (solution == null) KnapsackSolutionParameter.ActualValue = new KnapsackSolution(binaryVectors[i], 
+        KnapsackCapacityParameter.ActualValue, WeightsParameter.ActualValue, ValuesParameter.ActualValue);
+      else {
+        solution.BinaryVector = binaryVectors[i];
+        solution.Capacity = KnapsackCapacityParameter.ActualValue;
+        solution.Weights = WeightsParameter.ActualValue;
+        solution.Values = ValuesParameter.ActualValue;
+      }
+
+      return base.Apply();
+    }
+  }
+}
