Index: /branches/GeneralizedQAP/Build.cmd
===================================================================
--- /branches/GeneralizedQAP/Build.cmd	(revision 7318)
+++ /branches/GeneralizedQAP/Build.cmd	(revision 7319)
@@ -1,5 +1,5 @@
 @ECHO OFF
 
-SET CLEANBEFOREBUILD=1
+SET CLEANBEFOREBUILD=0
 
 SET SELECTED=
@@ -49,6 +49,6 @@
 
 :prompt_config
-SET /P CONFIGURATION=Which configuration to build [Debug]: 
-IF "%CONFIGURATION%"=="" SET CONFIGURATION=Debug
+SET /P CONFIGURATION=Which configuration to build [Release]: 
+IF "%CONFIGURATION%"=="" SET CONFIGURATION=Release
 
 :platform_selection
@@ -77,5 +77,5 @@
 )
 ECHO Building ...
-%MSBUILDPATH%msbuild.exe %SELECTED% /target:Build /p:Configuration="%CONFIGURATION%",Platform="%PLATFORM%" /m:2 /nologo /verbosity:q /clp:ErrorsOnly
+%MSBUILDPATH%msbuild.exe %SELECTED% /target:Rebuild /p:Configuration="%CONFIGURATION%",Platform="%PLATFORM%" /m:2 /nologo /verbosity:q /clp:ErrorsOnly
 
 ECHO.
Index: /branches/GeneralizedQAP/GeneralizedQAP.sln
===================================================================
--- /branches/GeneralizedQAP/GeneralizedQAP.sln	(revision 7318)
+++ /branches/GeneralizedQAP/GeneralizedQAP.sln	(revision 7319)
@@ -9,31 +9,15 @@
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
-		Debug|x64 = Debug|x64
-		Debug|x86 = Debug|x86
 		Release|Any CPU = Release|Any CPU
-		Release|x64 = Release|x64
-		Release|x86 = Release|x86
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 		{C739E6D2-5680-4804-A810-8017DA0C238F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{C739E6D2-5680-4804-A810-8017DA0C238F}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{C739E6D2-5680-4804-A810-8017DA0C238F}.Debug|x64.ActiveCfg = Debug|x64
-		{C739E6D2-5680-4804-A810-8017DA0C238F}.Debug|x64.Build.0 = Debug|x64
-		{C739E6D2-5680-4804-A810-8017DA0C238F}.Debug|x86.ActiveCfg = Debug|x86
-		{C739E6D2-5680-4804-A810-8017DA0C238F}.Debug|x86.Build.0 = Debug|x86
 		{C739E6D2-5680-4804-A810-8017DA0C238F}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C739E6D2-5680-4804-A810-8017DA0C238F}.Release|Any CPU.Build.0 = Release|Any CPU
-		{C739E6D2-5680-4804-A810-8017DA0C238F}.Release|x64.ActiveCfg = Release|x64
-		{C739E6D2-5680-4804-A810-8017DA0C238F}.Release|x64.Build.0 = Release|x64
-		{C739E6D2-5680-4804-A810-8017DA0C238F}.Release|x86.ActiveCfg = Release|x86
-		{C739E6D2-5680-4804-A810-8017DA0C238F}.Release|x86.Build.0 = Release|x86
 		{BFAAC00C-B884-458D-BD74-98C94BFAFA41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{BFAAC00C-B884-458D-BD74-98C94BFAFA41}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{BFAAC00C-B884-458D-BD74-98C94BFAFA41}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{BFAAC00C-B884-458D-BD74-98C94BFAFA41}.Debug|x86.ActiveCfg = Debug|Any CPU
 		{BFAAC00C-B884-458D-BD74-98C94BFAFA41}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{BFAAC00C-B884-458D-BD74-98C94BFAFA41}.Release|Any CPU.Build.0 = Release|Any CPU
-		{BFAAC00C-B884-458D-BD74-98C94BFAFA41}.Release|x64.ActiveCfg = Release|Any CPU
-		{BFAAC00C-B884-458D-BD74-98C94BFAFA41}.Release|x86.ActiveCfg = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.Designer.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.Designer.cs	(revision 7318)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.Designer.cs	(revision 7319)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -45,9 +45,68 @@
     /// </summary>
     private void InitializeComponent() {
-      components = new System.ComponentModel.Container();
+      this.assignmentTreeView = new System.Windows.Forms.TreeView();
+      this.label1 = new System.Windows.Forms.Label();
+      this.qualityTextBox = new System.Windows.Forms.TextBox();
+      this.label2 = new System.Windows.Forms.Label();
+      this.SuspendLayout();
+      // 
+      // assignmentTreeView
+      // 
+      this.assignmentTreeView.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.assignmentTreeView.Location = new System.Drawing.Point(3, 52);
+      this.assignmentTreeView.Name = "assignmentTreeView";
+      this.assignmentTreeView.Size = new System.Drawing.Size(349, 329);
+      this.assignmentTreeView.TabIndex = 0;
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(3, 7);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(42, 13);
+      this.label1.TabIndex = 1;
+      this.label1.Text = "Quality:";
+      // 
+      // qualityTextBox
+      // 
+      this.qualityTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.qualityTextBox.Location = new System.Drawing.Point(51, 4);
+      this.qualityTextBox.Name = "qualityTextBox";
+      this.qualityTextBox.Size = new System.Drawing.Size(301, 20);
+      this.qualityTextBox.TabIndex = 2;
+      // 
+      // label2
+      // 
+      this.label2.AutoSize = true;
+      this.label2.Location = new System.Drawing.Point(3, 36);
+      this.label2.Name = "label2";
+      this.label2.Size = new System.Drawing.Size(64, 13);
+      this.label2.TabIndex = 1;
+      this.label2.Text = "Assignment:";
+      // 
+      // GQAPAssignmentView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.qualityTextBox);
+      this.Controls.Add(this.label2);
+      this.Controls.Add(this.label1);
+      this.Controls.Add(this.assignmentTreeView);
+      this.Name = "GQAPAssignmentView";
+      this.Size = new System.Drawing.Size(355, 384);
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
     }
 
     #endregion
+
+    private System.Windows.Forms.TreeView assignmentTreeView;
+    private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.TextBox qualityTextBox;
+    private System.Windows.Forms.Label label2;
   }
 }
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.cs	(revision 7318)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.cs	(revision 7319)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -21,6 +21,9 @@
 
 using System;
+using System.Collections.Generic;
+using System.Linq;
 using System.Windows.Forms;
 using HeuristicLab.Core.Views;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
@@ -52,8 +55,10 @@
     protected override void OnContentChanged() {
       base.OnContentChanged();
+      assignmentTreeView.Nodes.Clear();
       if (Content == null) {
-        // TODO: Put code here when content is null
+        qualityTextBox.Text = String.Empty;
       } else {
-        // TODO: Put code here when content has been changed and is not null
+        qualityTextBox.Text = Content.Quality.Value.ToString();
+        BuildAssignmentTree();
       }
     }
@@ -61,5 +66,6 @@
     protected override void SetEnabledStateOfControls() {
       base.SetEnabledStateOfControls();
-      // TODO: Put code here to enable or disable controls based on whether the Content is/not null or the view is ReadOnly
+      qualityTextBox.Enabled = !ReadOnly && !Locked && Content != null;
+      assignmentTreeView.Enabled = !ReadOnly && !Locked && Content != null;
     }
 
@@ -67,4 +73,29 @@
     // TODO: Put event handlers here
     #endregion
+
+    private void BuildAssignmentTree() {
+      IntegerVector assignment = Content.Assignment;
+      Dictionary<int, TreeNode> locationNodes = new Dictionary<int, TreeNode>();
+      for (int i = 0; i < assignment.Length; i++) {
+        if (!locationNodes.ContainsKey(assignment[i])) {
+          string locationName = assignment[i].ToString();
+          if (Content.LocationNames != null && Content.LocationNames.Length > 0)
+            locationName = Content.LocationNames[assignment[i] % Content.LocationNames.Length];
+          locationNodes.Add(assignment[i], new TreeNode(locationName));
+        }
+        string equipmentName = i.ToString();
+        if (Content.EquipmentNames != null && Content.EquipmentNames.Length > 0)
+          equipmentName = Content.EquipmentNames[i % Content.EquipmentNames.Length];
+        locationNodes[assignment[i]].Nodes.Add(equipmentName);
+      }
+
+      assignmentTreeView.BeginUpdate();
+      try {
+        foreach (var node in locationNodes.OrderBy(x => x.Key).Select(x => x.Value)) {
+          assignmentTreeView.Nodes.Add(node);
+          node.Expand();
+        }
+      } finally { assignmentTreeView.EndUpdate(); }
+    }
   }
 }
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.resx
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.resx	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/GQAPAssignmentView.resx	(revision 7319)
@@ -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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views-3.3.csproj
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views-3.3.csproj	(revision 7318)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views-3.3.csproj	(revision 7319)
@@ -38,7 +38,26 @@
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="HeuristicLab.Core.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86" />
-    <Reference Include="HeuristicLab.MainForm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86" />
-    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86" />
+    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
+    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Core.Views-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core.Views-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Data-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Encodings.IntegerVectorEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
+    <Reference Include="HeuristicLab.MainForm-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.MainForm.WindowsForms-3.3">
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
+    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
+    <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
+    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -72,4 +91,9 @@
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="GQAPAssignmentView.resx">
+      <DependentUpon>GQAPAssignmentView.cs</DependentUpon>
+    </EmbeddedResource>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
@@ -79,6 +103,5 @@
 set Outdir=$(Outdir)
 
-call PreBuildEvent.cmd
-SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\Plugin.cs.frame" "%25ProjectDir%25\Plugin.cs"</PreBuildEvent>
+call PreBuildEvent.cmd</PreBuildEvent>
   </PropertyGroup>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/Plugin.cs.frame
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/Plugin.cs.frame	(revision 7318)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views/3.3/Plugin.cs.frame	(revision 7319)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -29,10 +29,13 @@
   [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
   [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
   [PluginDependency("HeuristicLab.Data", "3.3")]
   [PluginDependency("HeuristicLab.Encodings.IntegerVectorEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.MainForm", "3.3")]
+  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
   [PluginDependency("HeuristicLab.Operators", "3.3")]
   [PluginDependency("HeuristicLab.Optimization", "3.3")]
   [PluginDependency("HeuristicLab.Parameters", "3.3")]
-  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Problems.GeneralizedQuadraticAssignment", "3.3")]
   public class HeuristicLabProblemsGeneralizedQuadraticAssignmentViewsPlugin : PluginBase {
   }
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/BestGQAPSolutionAnalyzer.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/BestGQAPSolutionAnalyzer.cs	(revision 7318)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/BestGQAPSolutionAnalyzer.cs	(revision 7319)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Evaluators/GQAPEvaluator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Evaluators/GQAPEvaluator.cs	(revision 7318)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Evaluators/GQAPEvaluator.cs	(revision 7319)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/ExtensionMethods.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/ExtensionMethods.cs	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/ExtensionMethods.cs	(revision 7319)
@@ -0,0 +1,77 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
+  public static class ExtensionMethods {
+    /// <summary>
+    /// Selects an element from an enumerable randomly with equal probability for each element.
+    /// </summary>
+    /// <typeparam name="T">The type of the items that are to be selected.</typeparam>
+    /// <param name="source">The enumerable that contains the items.</param>
+    /// <param name="random">The random number generator, its NextDouble() method must return a value in the range [0;1).</param>
+    /// <param name="selected">True if an element was selected, false otherwise (mainly because of an empty sequence).</param>
+    /// <returns>The selected item.</returns>
+    public static T SelectRandomOrDefault<T>(this IEnumerable<T> source, IRandom random, out bool selected) {
+      int counter = 1;
+      selected = false;
+      T selectedItem = default(T);
+      foreach (T item in source) {
+        if (random.NextDouble() < 1.0 / counter) {
+          selectedItem = item;
+          selected = true;
+        }
+      }
+      return selectedItem;
+    }
+
+    /// <summary>
+    /// Shuffles an enumerable and returns an new enumerable according to the Fisher-Yates shuffle.
+    /// </summary>
+    /// <remarks>
+    /// Source code taken from http://stackoverflow.com/questions/1287567/c-is-using-random-and-orderby-a-good-shuffle-algorithm.
+    /// Note that this is an online shuffle, but the source enumerable is transformed into an array.
+    /// </remarks>
+    /// <typeparam name="T">The type of the items that are to be shuffled.</typeparam>
+    /// <param name="source">The enumerable that contains the items.</param>
+    /// <param name="random">The random number generator, its Next(int) method must deliver uniformly distributed random numbers.</param>
+    /// <returns>An enumerable with the elements shuffled.</returns>
+    public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> source, IRandom random) {
+      T[] elements = source.ToArray();
+      // Note i > 0 to avoid final pointless iteration
+      for (int i = elements.Length - 1; i > 0; i--) {
+        // Swap element "i" with a random earlier element it (or itself)
+        int swapIndex = random.Next(i + 1);
+        yield return elements[swapIndex];
+        elements[swapIndex] = elements[i];
+        // we don't actually perform the swap, we can forget about the
+        // swapped element because we already returned it.
+      }
+
+      // there is one item remaining that was not returned - we return it now
+      yield return elements[0];
+    }
+
+  }
+}
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPAssignment.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPAssignment.cs	(revision 7318)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPAssignment.cs	(revision 7319)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs	(revision 7318)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs	(revision 7319)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -146,4 +146,5 @@
       Capacities[0] = 4; Capacities[1] = 1; Capacities[2] = 4;
 
+      SolutionCreator.IntegerVectorParameter.ActualName = "Assignment";
       Parameterize();
 
@@ -200,4 +201,5 @@
     private void InitializeOperators() {
       Operators.AddRange(ApplicationManager.Manager.GetInstances<IIntegerVectorOperator>());
+      Operators.AddRange(ApplicationManager.Manager.GetInstances<IGQAPOperator>());
       Operators.RemoveAll(x => x is ISingleObjectiveMoveEvaluator);
       Operators.Add(new BestGQAPSolutionAnalyzer());
@@ -212,17 +214,29 @@
       Evaluator.DemandsParameter.ActualName = DemandsParameter.Name;
       Evaluator.CapacitiesParameter.ActualName = CapacitiesParameter.Name;
-      Evaluator.AssignmentParameter.ActualName = "Assignment";
+      Evaluator.AssignmentParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
 
       SolutionCreator.LengthParameter.Value = new IntValue(Demands.Length);
       SolutionCreator.MinimumParameter.Value = new IntValue(0);
       SolutionCreator.MaximumParameter.Value = new IntValue(Capacities.Length);
-      SolutionCreator.IntegerVectorParameter.ActualName = "Assignment";
-
-      foreach (IIntegerVectorCrossover op in Operators.OfType<IIntegerVectorCrossover>()) {
+
+      foreach (var op in Operators.OfType<IIntegerVectorCrossover>()) {
         op.ParentsParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
         op.ChildParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
       }
-      foreach (IIntegerVectorManipulator op in Operators.OfType<IIntegerVectorManipulator>()) {
+      foreach (var op in Operators.OfType<IIntegerVectorManipulator>()) {
         op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+      }
+      foreach (var op in Operators.OfType<IGQAPCrossover>()) {
+        op.ParentsParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+        op.ChildParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+      }
+      foreach (var op in Operators.OfType<IGQAPManipulator>()) {
+        op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+      }
+      foreach (var op in Operators.OfType<ILocationAwareGQAPOperator>()) {
+        op.CapacitiesParameter.ActualName = CapacitiesParameter.Name;
+      }
+      foreach (var op in Operators.OfType<IEquipmentAwareGQAPManipulator>()) {
+        op.DemandsParameter.ActualName = DemandsParameter.Name;
       }
 
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment-3.3.csproj
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment-3.3.csproj	(revision 7318)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment-3.3.csproj	(revision 7319)
@@ -36,68 +36,4 @@
   <PropertyGroup>
     <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>bin\x86\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x86</PlatformTarget>
-    <CodeAnalysisLogFile>bin\Debug\Plugin.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
-    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
-    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
-    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
-    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
-    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
-    <OutputPath>bin\x86\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x86</PlatformTarget>
-    <CodeAnalysisLogFile>bin\Release\Plugin.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
-    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
-    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
-    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
-    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
-    <DebugSymbols>true</DebugSymbols>
-    <OutputPath>bin\x64\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <DebugType>full</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <CodeAnalysisLogFile>bin\Debug\Plugin.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
-    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
-    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
-    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
-    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
-    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
-    <OutputPath>bin\x64\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <Optimize>true</Optimize>
-    <DebugType>pdbonly</DebugType>
-    <PlatformTarget>x64</PlatformTarget>
-    <CodeAnalysisLogFile>bin\Release\Plugin.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
-    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
-    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
-    <ErrorReport>prompt</ErrorReport>
-    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
-    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
-    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
-    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
-    <CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
   </PropertyGroup>
   <ItemGroup>
@@ -153,12 +89,25 @@
   <ItemGroup>
     <Compile Include="Analyzers\BestGQAPSolutionAnalyzer.cs" />
+    <Compile Include="ExtensionMethods.cs" />
     <Compile Include="GQAPAssignment.cs" />
     <None Include="Plugin.cs.frame" />
     <Compile Include="Evaluators\GQAPEvaluator.cs" />
     <Compile Include="GeneralizedQuadraticAssignmentProblem.cs" />
+    <Compile Include="Interfaces\IEquipmentAwareGQAPOperator.cs" />
+    <Compile Include="Interfaces\IGQAPCrossover.cs" />
     <Compile Include="Interfaces\IGQAPEvaluator.cs" />
+    <Compile Include="Interfaces\IGQAPManipulator.cs" />
+    <Compile Include="Interfaces\IGQAPOperator.cs" />
+    <Compile Include="Interfaces\ILocationAwareGQAPOperator.cs" />
+    <Compile Include="Operators\DemandEquivalentSwapEquipmentManipluator.cs" />
+    <Compile Include="Operators\GQAPCrossover.cs" />
+    <Compile Include="Operators\DiscreteLocationCrossover.cs" />
+    <Compile Include="Operators\RelocateEquipmentManipluator.cs" />
+    <Compile Include="Operators\GQAPManipulator.cs" />
+    <Compile Include="Operators\SwapEquipmentManipluator.cs" />
+    <Compile Include="Operators\SwapLocationManipulator.cs" />
     <Compile Include="Plugin.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <None Include="Properties\AssemblyInfo.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
   </ItemGroup>
   <ItemGroup>
@@ -172,6 +121,5 @@
 set Outdir=$(Outdir)
 
-call PreBuildEvent.cmd
-SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\Plugin.cs.frame" "%25ProjectDir%25\Plugin.cs"</PreBuildEvent>
+call PreBuildEvent.cmd</PreBuildEvent>
   </PropertyGroup>
   <PropertyGroup>
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment-3.3.csproj.user
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment-3.3.csproj.user	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment-3.3.csproj.user	(revision 7319)
@@ -0,0 +1,10 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
+    <StartAction>Program</StartAction>
+    <StartProgram>..\..\trunk\sources\bin\HeuristicLab 3.3.exe</StartProgram>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ProjectView>ProjectFiles</ProjectView>
+  </PropertyGroup>
+</Project>
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IEquipmentAwareGQAPOperator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IEquipmentAwareGQAPOperator.cs	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IEquipmentAwareGQAPOperator.cs	(revision 7319)
@@ -0,0 +1,29 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
+  public interface IEquipmentAwareGQAPManipulator : IGQAPManipulator {
+    ILookupParameter<DoubleArray> DemandsParameter { get; }
+  }
+}
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPCrossover.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPCrossover.cs	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPCrossover.cs	(revision 7319)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Core;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
+  public interface IGQAPCrossover : IGQAPOperator {
+    IScopeTreeLookupParameter<IntegerVector> ParentsParameter { get; }
+    ILookupParameter<IntegerVector> ChildParameter { get; }
+  }
+}
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPEvaluator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPEvaluator.cs	(revision 7318)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPEvaluator.cs	(revision 7319)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPManipulator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPManipulator.cs	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPManipulator.cs	(revision 7319)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Core;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
+  public interface IGQAPManipulator : IGQAPOperator {
+    ILookupParameter<IRandom> RandomParameter { get; }
+    ILookupParameter<IntegerVector> IntegerVectorParameter { get; }
+  }
+}
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPOperator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPOperator.cs	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPOperator.cs	(revision 7319)
@@ -0,0 +1,26 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Core;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
+  public interface IGQAPOperator : IOperator { }
+}
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/ILocationAwareGQAPOperator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/ILocationAwareGQAPOperator.cs	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/ILocationAwareGQAPOperator.cs	(revision 7319)
@@ -0,0 +1,29 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
+  public interface ILocationAwareGQAPOperator : IGQAPOperator {
+    ILookupParameter<DoubleArray> CapacitiesParameter { get; }
+  }
+}
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/DemandEquivalentSwapEquipmentManipluator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/DemandEquivalentSwapEquipmentManipluator.cs	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/DemandEquivalentSwapEquipmentManipluator.cs	(revision 7319)
@@ -0,0 +1,91 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
+
+  [Item("DemandEquivalentSwapEquipmentManipluator", "Swaps equipment X from location A with as much equipments from location B that the demand of X is less than or equal to the demand of the swapped equipments in B.")]
+  [StorableClass]
+  public class DemandEquivalentSwapEquipmentManipluator : GQAPManipulator, ILocationAwareGQAPOperator, IEquipmentAwareGQAPManipulator {
+    
+    public ILookupParameter<DoubleArray> CapacitiesParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
+    }
+    public ILookupParameter<DoubleArray> DemandsParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["Demands"]; }
+    }
+
+    [StorableConstructor]
+    protected DemandEquivalentSwapEquipmentManipluator(bool deserializing) : base(deserializing) { }
+    protected DemandEquivalentSwapEquipmentManipluator(DemandEquivalentSwapEquipmentManipluator original, Cloner cloner) : base(original, cloner) { }
+    public DemandEquivalentSwapEquipmentManipluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations."));
+      Parameters.Add(new LookupParameter<DoubleArray>("Demands", "The demands vector describes the space requirements of the equipments."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new DemandEquivalentSwapEquipmentManipluator(this, cloner);
+    }
+
+    public static void Apply(IRandom random, IntegerVector assignment, DoubleArray capacities, DoubleArray demands) {
+      if (assignment.Length < 2) throw new InvalidOperationException("Vector is too small for swap operation.");
+      int equipment1 = random.Next(assignment.Length), equipment2 = random.Next(assignment.Length);
+      int counter = 1;
+      while (assignment[equipment1] == assignment[equipment2] && counter < assignment.Length) {
+        equipment2 = random.Next(assignment.Length);
+        counter++;
+      }
+      if (assignment[equipment1] != assignment[equipment2]) {
+        var groupedLocations = assignment
+              .Select((value, index) => new { Index = index, Value = value })
+              .GroupBy(x => x.Value)
+              .ToDictionary(x => x.Key, y => new HashSet<int>(y.Select(x => x.Index)));
+        double demand = demands[equipment1];
+        int location1 = assignment[equipment1];
+        int location2 = assignment[equipment2];
+
+        assignment[equipment1] = location2;
+        while (demand > 0) {
+          demand -= demands[equipment2];
+          assignment[equipment2] = location1;
+          groupedLocations[location2].Remove(equipment2);
+          bool selected;
+          equipment2 = groupedLocations[location2].SelectRandomOrDefault(random, out selected);
+          if (!selected) break;
+        }
+      }
+    }
+
+    protected override void Manipulate(IRandom random, IntegerVector vector) {
+      Apply(random, vector, CapacitiesParameter.ActualValue, DemandsParameter.ActualValue);
+    }
+  }
+}
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/DiscreteLocationCrossover.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/DiscreteLocationCrossover.cs	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/DiscreteLocationCrossover.cs	(revision 7319)
@@ -0,0 +1,85 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Operators {
+  [Item("DiscreteLocationCrossover", "Combines the assignment to locations from various parents.")]
+  [StorableClass]
+  public class DiscreteLocationCrossover : GQAPCrossover, ILocationAwareGQAPOperator {
+
+    public ILookupParameter<DoubleArray> CapacitiesParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
+    }
+
+    [StorableConstructor]
+    protected DiscreteLocationCrossover(bool deserializing) : base(deserializing) { }
+    protected DiscreteLocationCrossover(DiscreteLocationCrossover original, Cloner cloner)
+      : base(original, cloner) { }
+    public DiscreteLocationCrossover()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new DiscreteLocationCrossover(this, cloner);
+    }
+
+    public static IntegerVector Apply(IRandom random, ItemArray<IntegerVector> parents, DoubleArray capacities) {
+      
+      var groupedLocations = parents
+              .Select(p => p.Select((value, index) => new { Equipment = index, Location = value })
+              .GroupBy(x => x.Location)
+              .ToDictionary(x => x.Key, y => y.AsEnumerable())).ToArray();
+
+      IntegerVector child = new IntegerVector(parents[0].Length);
+      HashSet<int> remainingEquipment = new HashSet<int>(Enumerable.Range(0, child.Length));
+      int locations = capacities.Length;
+      foreach (var i in Enumerable.Range(0, locations).Shuffle(random)) {
+        int parent = random.Next(parents.Length);
+        foreach (var item in groupedLocations[parent][i]) {
+          if (remainingEquipment.Contains(item.Equipment)) {
+            child[item.Equipment] = i;
+            remainingEquipment.Remove(item.Equipment);
+          }
+        }
+      }
+
+      foreach (var equipment in remainingEquipment) {
+        int parent = random.Next(parents.Length);
+        child[equipment] = parents[parent][equipment];
+      }
+
+      return child;
+    }
+
+    protected override IntegerVector Cross(IRandom random, ItemArray<IntegerVector> parents) {
+      return Apply(random, parents, CapacitiesParameter.ActualValue);
+    }
+  }
+}
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/GQAPCrossover.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/GQAPCrossover.cs	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/GQAPCrossover.cs	(revision 7319)
@@ -0,0 +1,65 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
+
+  [Item("GQAPCrossover", "A base class for operators that cross assignment vectors of the GeneralizedQuadraticAssignment problems.")]
+  [StorableClass]
+  public abstract class GQAPCrossover : SingleSuccessorOperator, IGQAPCrossover, IStochasticOperator {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public IScopeTreeLookupParameter<IntegerVector> ParentsParameter {
+      get { return (ScopeTreeLookupParameter<IntegerVector>)Parameters["Parents"]; }
+    }
+    public ILookupParameter<IntegerVector> ChildParameter {
+      get { return (ILookupParameter<IntegerVector>)Parameters["Child"]; }
+    }
+
+    [StorableConstructor]
+    protected GQAPCrossover(bool deserializing) : base(deserializing) { }
+    protected GQAPCrossover(GQAPCrossover original, Cloner cloner) : base(original, cloner) { }
+    protected GQAPCrossover()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic crossover operators."));
+      Parameters.Add(new ScopeTreeLookupParameter<IntegerVector>("Parents", "The parent vectors which should be crossed.", "Assignment"));
+      Parameters.Add(new LookupParameter<IntegerVector>("Child", "The child vector resulting from the crossover.", "Assignment"));
+    }
+
+    public sealed override IOperation Apply() {
+      ChildParameter.ActualValue = Cross(RandomParameter.ActualValue, ParentsParameter.ActualValue);
+      return base.Apply();
+    }
+
+    protected abstract IntegerVector Cross(IRandom random, ItemArray<IntegerVector> parents);
+  }
+}
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/GQAPManipulator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/GQAPManipulator.cs	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/GQAPManipulator.cs	(revision 7319)
@@ -0,0 +1,60 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
+  [Item("GQAPManipulator", "A base class for operators that manipulate assignment vectors of the GeneralizedQuadraticAssignment problems.")]
+  [StorableClass]
+  public abstract class GQAPManipulator : SingleSuccessorOperator, IGQAPManipulator, IStochasticOperator {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public ILookupParameter<IntegerVector> IntegerVectorParameter {
+      get { return (ILookupParameter<IntegerVector>)Parameters["IntegerVector"]; }
+    }
+
+    [StorableConstructor]
+    protected GQAPManipulator(bool deserializing) : base(deserializing) { }
+    protected GQAPManipulator(GQAPManipulator original, Cloner cloner) : base(original, cloner) { }
+    protected GQAPManipulator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
+      Parameters.Add(new LookupParameter<IntegerVector>("IntegerVector", "The assignment vector which should be manipulated."));
+    }
+
+    public sealed override IOperation Apply() {
+      Manipulate(RandomParameter.ActualValue, IntegerVectorParameter.ActualValue);
+      return base.Apply();
+    }
+
+    protected abstract void Manipulate(IRandom random, IntegerVector integerVector);
+  }
+}
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/RelocateEquipmentManipluator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/RelocateEquipmentManipluator.cs	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/RelocateEquipmentManipluator.cs	(revision 7319)
@@ -0,0 +1,95 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
+
+  [Item("RelocateEquipmentManipluator", "Relocates a random equipment from an overstuffed location to a random one with space or a random equipment if constraints are satisfied.")]
+  [StorableClass]
+  public class RelocateEquipmentManipluator : GQAPManipulator, ILocationAwareGQAPOperator, IEquipmentAwareGQAPManipulator {
+
+    public ILookupParameter<DoubleArray> CapacitiesParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
+    }
+    public ILookupParameter<DoubleArray> DemandsParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["Demands"]; }
+    }
+
+    [StorableConstructor]
+    protected RelocateEquipmentManipluator(bool deserializing) : base(deserializing) { }
+    protected RelocateEquipmentManipluator(RelocateEquipmentManipluator original, Cloner cloner) : base(original, cloner) { }
+    public RelocateEquipmentManipluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations."));
+      Parameters.Add(new LookupParameter<DoubleArray>("Demands", "The demands vector describes the space requirements of the equipments."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RelocateEquipmentManipluator(this, cloner);
+    }
+
+    public static void Apply(IRandom random, IntegerVector assignment, DoubleArray capacities, DoubleArray demands) {
+      int locations = capacities.Length;
+      if (locations < 2) throw new InvalidOperationException("There are not enough locations for relocation operations.");
+
+      Dictionary<int, double> usedCapacities = new Dictionary<int,double>();
+      Dictionary<int, List<int>> groupedLocations = new Dictionary<int, List<int>>();
+      for (int i = 0; i < locations; i++) {
+        usedCapacities[i] = 0.0;
+        groupedLocations.Add(i, new List<int>());
+      }
+      for (int i = 0; i < assignment.Length; i++) {
+        usedCapacities[assignment[i]] += demands[i];
+        groupedLocations[assignment[i]].Add(i);
+      }
+
+      bool selected;
+      var overstuffedLocation = usedCapacities.Where(x => capacities[x.Key] < x.Value).SelectRandomOrDefault(random, out selected);
+      if (selected) {
+        int equipment = groupedLocations[overstuffedLocation.Key].SelectRandomOrDefault(random, out selected);
+        var freeLocations = usedCapacities.Where(x => capacities[x.Key] > x.Value).ToList();
+        var location = freeLocations.Where(x => capacities[x.Key] > x.Value + demands[equipment]).SelectRandomOrDefault(random, out selected);
+        if (selected) {
+          assignment[equipment] = location.Key;
+        } else {
+          location = freeLocations.SelectRandomOrDefault(random, out selected);
+          if (selected) assignment[equipment] = location.Key;
+          else assignment[equipment] = random.Next(locations);
+        }
+      } else {
+        assignment[random.Next(assignment.Length)] = random.Next(locations);
+      }
+    }
+
+    protected override void Manipulate(IRandom random, IntegerVector vector) {
+      Apply(random, vector, CapacitiesParameter.ActualValue, DemandsParameter.ActualValue);
+    }
+  }
+}
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/SwapEquipmentManipluator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/SwapEquipmentManipluator.cs	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/SwapEquipmentManipluator.cs	(revision 7319)
@@ -0,0 +1,62 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
+
+  [Item("SwapEquipmentManipluator", "Swaps two equipments by placing each in the location of the other.")]
+  [StorableClass]
+  public class SwapEquipmentManipluator : GQAPManipulator {
+
+    [StorableConstructor]
+    protected SwapEquipmentManipluator(bool deserializing) : base(deserializing) { }
+    protected SwapEquipmentManipluator(SwapEquipmentManipluator original, Cloner cloner) : base(original, cloner) { }
+    public SwapEquipmentManipluator()
+      : base() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SwapEquipmentManipluator(this, cloner);
+    }
+
+    public static void Apply(IRandom random, IntegerVector assignment) {
+      if (assignment.Length < 2) throw new InvalidOperationException("Vector is too small for swap operation.");
+      int equipment1 = random.Next(assignment.Length), equipment2 = random.Next(assignment.Length);
+      int counter = 1;
+      while (assignment[equipment1] == assignment[equipment2] && counter < assignment.Length) {
+        equipment2 = random.Next(assignment.Length);
+        counter++;
+      }
+      int location = assignment[equipment1];
+      assignment[equipment1] = assignment[equipment2];
+      assignment[equipment2] = location;
+    }
+
+    protected override void Manipulate(IRandom random, IntegerVector vector) {
+      Apply(random, vector);
+    }
+  }
+}
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/SwapLocationManipulator.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/SwapLocationManipulator.cs	(revision 7319)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/SwapLocationManipulator.cs	(revision 7319)
@@ -0,0 +1,78 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
+
+  [Item("SwapLocationManipluator", "Swaps two locations by exchanging all equipments between the locations.")]
+  [StorableClass]
+  public class SwapLocationManipluator : GQAPManipulator, ILocationAwareGQAPOperator {
+
+    public ILookupParameter<DoubleArray> CapacitiesParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
+    }
+
+    [StorableConstructor]
+    protected SwapLocationManipluator(bool deserializing) : base(deserializing) { }
+    protected SwapLocationManipluator(SwapLocationManipluator original, Cloner cloner) : base(original, cloner) { }
+    public SwapLocationManipluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SwapLocationManipluator(this, cloner);
+    }
+
+    public static void Apply(IRandom random, IntegerVector assignment, int locations) {
+      if (assignment.Length < 2) throw new InvalidOperationException("Vector is too small for swap operation.");
+      var groupedLocations = assignment
+        .Select((value, index) => new { Index = index, Value = value })
+        .GroupBy(x => x.Value)
+        .ToDictionary(x => x.Key, y => y.AsEnumerable());
+      if (locations < 2) throw new InvalidOperationException("There doesn't exist more than one location.");
+
+      int location1 = random.Next(locations), location2 = random.Next(locations);
+      while (location1 == location2) location2 = random.Next(locations);
+
+      if (groupedLocations.ContainsKey(location1)) {
+        foreach (var index in groupedLocations[location1])
+          assignment[index.Index] = location2;
+      }
+      if (groupedLocations.ContainsKey(location2)) {
+        foreach (var index in groupedLocations[location2])
+          assignment[index.Index] = location1;
+      }
+    }
+
+    protected override void Manipulate(IRandom random, IntegerVector vector) {
+      Apply(random, vector, CapacitiesParameter.ActualValue.Length);
+    }
+  }
+}
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Plugin.cs.frame
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Plugin.cs.frame	(revision 7318)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Plugin.cs.frame	(revision 7319)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Properties/AssemblyInfo.cs.frame	(revision 7318)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Properties/AssemblyInfo.cs.frame	(revision 7319)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
