Index: trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/BestQAPSolutionAnalyzer.cs
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/BestQAPSolutionAnalyzer.cs	(revision 5855)
+++ trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/BestQAPSolutionAnalyzer.cs	(revision 5933)
@@ -40,7 +40,4 @@
       get { return (LookupParameter<BoolValue>)Parameters["Maximization"]; }
     }
-    public LookupParameter<DoubleMatrix> CoordinatesParameter {
-      get { return (LookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
-    }
     public LookupParameter<DoubleMatrix> DistancesParameter {
       get { return (LookupParameter<DoubleMatrix>)Parameters["Distances"]; }
@@ -77,5 +74,4 @@
       : base() {
       Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem."));
-      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the locations."));
       Parameters.Add(new LookupParameter<DoubleMatrix>("Distances", "The distances between the locations."));
       Parameters.Add(new LookupParameter<DoubleMatrix>("Weights", "The weights between the facilities."));
Index: trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPInversionMoveEvaluator.cs
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPInversionMoveEvaluator.cs	(revision 5855)
+++ trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPInversionMoveEvaluator.cs	(revision 5933)
@@ -54,13 +54,17 @@
       int min = Math.Min(move.Index1, move.Index2);
       int max = Math.Max(move.Index1, move.Index2);
+
       for (int i = min; i <= max; i++) {
+        int locI = assignment[i];
+        int newlocI = assignment[max - i + min];
+
         for (int j = 0; j < assignment.Length; j++) {
-          moveQuality -= weights[i, j] * distances[assignment[i], assignment[j]];
-          if (j < min || j > max) {
-            moveQuality -= weights[j, i] * distances[assignment[j], assignment[i]];
-            moveQuality += weights[i, j] * distances[assignment[max - i + min], assignment[j]];
-            moveQuality += weights[j, i] * distances[assignment[j], assignment[max - i + min]];
+          int locJ = assignment[j];
+          if (j >= min && j <= max) {
+            int newlocJ = assignment[max - j + min];
+            moveQuality += weights[i, j] * (distances[newlocI, newlocJ] - distances[locI, locJ]);
           } else {
-            moveQuality += weights[i, j] * distances[assignment[max - i + min], assignment[max - j + min]];
+            moveQuality += weights[i, j] * (distances[newlocI, locJ] - distances[locI, locJ]);
+            moveQuality += weights[j, i] * (distances[locJ, newlocI] - distances[locJ, locI]);
           }
         }
Index: trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPSwap2MoveEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPSwap2MoveEvaluator.cs	(revision 5933)
+++ trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPSwap2MoveEvaluator.cs	(revision 5933)
@@ -0,0 +1,88 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.QuadraticAssignment {
+  [Item("QAPSwap2MoveEvaluator", "Evaluated a swap-2 move on a QAP solution.")]
+  [StorableClass]
+  public class QAPSwap2MoveEvaluator : QAPMoveEvaluator, IPermutationSwap2MoveOperator {
+    public ILookupParameter<Swap2Move> Swap2MoveParameter {
+      get { return (ILookupParameter<Swap2Move>)Parameters["Swap2Move"]; }
+    }
+
+    [StorableConstructor]
+    protected QAPSwap2MoveEvaluator(bool deserializing) : base(deserializing) { }
+    protected QAPSwap2MoveEvaluator(QAPSwap2MoveEvaluator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public QAPSwap2MoveEvaluator() {
+      Parameters.Add(new LookupParameter<Swap2Move>("Swap2Move", "The move to evaluate."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new QAPSwap2MoveEvaluator(this, cloner);
+    }
+
+    public static double Apply(Permutation assignment, Swap2Move move, DoubleMatrix weights, DoubleMatrix distances) {
+      if (move.Index1 == move.Index2) return 0;
+      double moveQuality = 0;
+      int fac1 = move.Index1, fac2 = move.Index2;
+      int loc1 = assignment[fac1], loc2 = assignment[fac2];
+
+      for (int j = 0; j < assignment.Length; j++) {
+        if (j == fac1) {
+          moveQuality += weights[fac1, fac1] * (distances[loc2, loc2] - distances[loc1, loc1]);
+          moveQuality += weights[fac1, fac2] * (distances[loc2, loc1] - distances[loc1, loc2]);
+        } else if (j == fac2) {
+          moveQuality += weights[fac2, fac2] * (distances[loc1, loc1] - distances[loc2, loc2]);
+          moveQuality += weights[fac2, fac1] * (distances[loc1, loc2] - distances[loc2, loc1]);
+        } else {
+          int locJ = assignment[j];
+          moveQuality += weights[fac1, j] * (distances[loc2, locJ] - distances[loc1, locJ]);
+          moveQuality += weights[j, fac1] * (distances[locJ, loc2] - distances[locJ, loc1]);
+          moveQuality += weights[fac2, j] * (distances[loc1, locJ] - distances[loc2, locJ]);
+          moveQuality += weights[j, fac2] * (distances[locJ, loc1] - distances[locJ, loc2]);
+        }
+      }
+      return moveQuality;
+    }
+
+    public override IOperation Apply() {
+      Swap2Move move = Swap2MoveParameter.ActualValue;
+      if (move == null) throw new InvalidOperationException("Swap-2 move is not found.");
+      Permutation assignment = PermutationParameter.ActualValue;
+      DoubleMatrix distances = DistancesParameter.ActualValue;
+      DoubleMatrix weights = WeightsParameter.ActualValue;
+
+      double moveQuality = QualityParameter.ActualValue.Value;
+      moveQuality += Apply(assignment, move, weights, distances);
+      MoveQualityParameter.ActualValue = new DoubleValue(moveQuality);
+      return base.Apply();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPSwapMoveEvaluator.cs
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Evaluators/QAPSwapMoveEvaluator.cs	(revision 5855)
+++ 	(revision )
@@ -1,84 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Data;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.QuadraticAssignment {
-  [Item("QAPSwap2MoveEvaluator", "Evaluated a swap-2 move on a QAP solution.")]
-  [StorableClass]
-  public class QAPSwap2MoveEvaluator : QAPMoveEvaluator, IPermutationSwap2MoveOperator {
-    public ILookupParameter<Swap2Move> Swap2MoveParameter {
-      get { return (ILookupParameter<Swap2Move>)Parameters["Swap2Move"]; }
-    }
-
-    [StorableConstructor]
-    protected QAPSwap2MoveEvaluator(bool deserializing) : base(deserializing) { }
-    protected QAPSwap2MoveEvaluator(QAPSwap2MoveEvaluator original, Cloner cloner)
-      : base(original, cloner) {
-    }
-    public QAPSwap2MoveEvaluator() {
-      Parameters.Add(new LookupParameter<Swap2Move>("Swap2Move", "The move to evaluate."));
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new QAPSwap2MoveEvaluator(this, cloner);
-    }
-
-    public static double Apply(Permutation assignment, Swap2Move move, DoubleMatrix weights, DoubleMatrix distances) {
-      if (move.Index1 == move.Index2) return 0;
-      double moveQuality = 0;
-      for (int j = 0; j < assignment.Length; j++) {
-        moveQuality -= weights[move.Index1, j] * distances[assignment[move.Index1], assignment[j]];
-        moveQuality -= weights[j, move.Index1] * distances[assignment[j], assignment[move.Index1]];
-        moveQuality -= weights[move.Index2, j] * distances[assignment[move.Index2], assignment[j]];
-        moveQuality -= weights[j, move.Index2] * distances[assignment[j], assignment[move.Index2]];
-
-        int facility1 = j == move.Index1 ? assignment[move.Index2] : assignment[j];
-        int facility2 = j == move.Index2 ? assignment[move.Index1] : assignment[j];
-
-        moveQuality += weights[move.Index1, j] * distances[assignment[move.Index2], facility2];
-        moveQuality += weights[j, move.Index1] * distances[facility2, assignment[move.Index2]];
-        moveQuality += weights[move.Index2, j] * distances[assignment[move.Index1], facility1];
-        moveQuality += weights[j, move.Index2] * distances[facility1, assignment[move.Index1]];
-      }
-      return moveQuality;
-    }
-
-    public override IOperation Apply() {
-      Swap2Move move = Swap2MoveParameter.ActualValue;
-      if (move == null) throw new InvalidOperationException("Swap-2 move is not found.");
-      Permutation assignment = PermutationParameter.ActualValue;
-      DoubleMatrix distances = DistancesParameter.ActualValue;
-      DoubleMatrix weights = WeightsParameter.ActualValue;
-
-      double moveQuality = QualityParameter.ActualValue.Value;
-      moveQuality += Apply(assignment, move, weights, distances);
-      MoveQualityParameter.ActualValue = new DoubleValue(moveQuality);
-      return base.Apply();
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/HeuristicLab.Problems.QuadraticAssignment-3.3.csproj
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/HeuristicLab.Problems.QuadraticAssignment-3.3.csproj	(revision 5855)
+++ trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/HeuristicLab.Problems.QuadraticAssignment-3.3.csproj	(revision 5933)
@@ -102,31 +102,4 @@
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="HeuristicLab.Collections-3.3">
-      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath>
-    </Reference>
-    <Reference Include="HeuristicLab.Common-3.3">
-      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
-    </Reference>
-    <Reference Include="HeuristicLab.Common.Resources-3.3">
-      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Common.Resources-3.3.dll</HintPath>
-    </Reference>
-    <Reference Include="HeuristicLab.Core-3.3">
-      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath>
-    </Reference>
-    <Reference Include="HeuristicLab.Data-3.3">
-      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Data-3.3.dll</HintPath>
-    </Reference>
-    <Reference Include="HeuristicLab.Operators-3.3">
-      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Operators-3.3.dll</HintPath>
-    </Reference>
-    <Reference Include="HeuristicLab.Parameters-3.3">
-      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Parameters-3.3.dll</HintPath>
-    </Reference>
-    <Reference Include="HeuristicLab.Persistence-3.3">
-      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Persistence-3.3.dll</HintPath>
-    </Reference>
-    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
-      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -136,5 +109,5 @@
   <ItemGroup>
     <Compile Include="Analyzers\BestQAPSolutionAnalyzer.cs" />
-    <Compile Include="Evaluators\QAPSwapMoveEvaluator.cs" />
+    <Compile Include="Evaluators\QAPSwap2MoveEvaluator.cs" />
     <Compile Include="Evaluators\QAPEvaluator.cs" />
     <Compile Include="Evaluators\QAPInversionMoveEvaluator.cs" />
@@ -413,11 +386,47 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</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\3.3\HeuristicLab.Core-3.3.csproj">
+      <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.PermutationEncoding\3.3\HeuristicLab.Encodings.PermutationEncoding-3.3.csproj">
       <Project>{DBECB8B0-B166-4133-BAF1-ED67C3FD7FCA}</Project>
       <Name>HeuristicLab.Encodings.PermutationEncoding-3.3</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
+      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
+      <Name>HeuristicLab.Operators-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
       <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
       <Name>HeuristicLab.Optimization-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
+      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
+      <Name>HeuristicLab.Parameters-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\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
     </ProjectReference>
   </ItemGroup>
@@ -434,5 +443,6 @@
   </PropertyGroup>
   <PropertyGroup>
-    <PostBuildEvent>copy "$(TargetPath)" "C:\Program Files\HeuristicLab 3.3\"</PostBuildEvent>
+    <PostBuildEvent>
+    </PostBuildEvent>
   </PropertyGroup>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
Index: trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/QAPAssignment.cs
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/QAPAssignment.cs	(revision 5855)
+++ trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/QAPAssignment.cs	(revision 5933)
@@ -1,3 +1,24 @@
-﻿using System.ComponentModel;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.ComponentModel;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
Index: trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs	(revision 5855)
+++ trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs	(revision 5933)
@@ -50,7 +50,4 @@
       get { return (IValueParameter<Permutation>)Parameters["BestKnownSolution"]; }
     }
-    public IValueParameter<DoubleMatrix> CoordinatesParameter {
-      get { return (IValueParameter<DoubleMatrix>)Parameters["Coordinates"]; }
-    }
     public IValueParameter<DoubleMatrix> WeightsParameter {
       get { return (IValueParameter<DoubleMatrix>)Parameters["Weights"]; }
@@ -65,8 +62,4 @@
       get { return BestKnownSolutionParameter.Value; }
       set { BestKnownSolutionParameter.Value = value; }
-    }
-    public DoubleMatrix Coordinates {
-      get { return CoordinatesParameter.Value; }
-      set { CoordinatesParameter.Value = value; }
     }
     public DoubleMatrix Weights {
@@ -102,19 +95,10 @@
     }
     public QuadraticAssignmentProblem()
-      : base() {
+      : base(new QAPEvaluator(), new RandomPermutationCreator()) {
       Parameters.Add(new OptionalValueParameter<Permutation>("BestKnownSolution", "The best known solution which is updated whenever a new better solution is found or may be the optimal solution if it is known beforehand.", null));
-      Parameters.Add(new OptionalValueParameter<DoubleMatrix>("Coordinates", "The coordinates of the locations. If this is changed the distance matrix is calculated automatically using the euclidean distance."));
       Parameters.Add(new ValueParameter<DoubleMatrix>("Weights", "The strength of the connection between the facilities.", new DoubleMatrix(5, 5)));
       Parameters.Add(new ValueParameter<DoubleMatrix>("Distances", "The distance matrix which can either be specified directly without the coordinates, or can be calculated automatically from the coordinates.", new DoubleMatrix(5, 5)));
 
       Maximization = new BoolValue(false);
-
-      Coordinates = new DoubleMatrix(new double[,] {
-        { 294.000,   3.000 },
-        { 585.246, 214.603 },
-        { 474.000, 556.983 },
-        { 114.000, 556.983 },
-        {   2.754, 214.603 }
-      });
 
       Weights = new DoubleMatrix(new double[,] {
@@ -134,11 +118,7 @@
       });
 
-      RandomPermutationCreator solutionCreator = new RandomPermutationCreator();
-      solutionCreator.LengthParameter.Value = new IntValue(5);
-      solutionCreator.PermutationParameter.ActualName = "Assignment";
-      QAPEvaluator evaluator = new QAPEvaluator();
-
-      SolutionCreatorParameter.Value = solutionCreator;
-      EvaluatorParameter.Value = evaluator;
+      SolutionCreator.PermutationParameter.ActualName = "Assignment";
+      ParameterizeSolutionCreator();
+      ParameterizeEvaluator();
 
       InitializeOperators();
@@ -231,17 +211,4 @@
         AdjustWeightsMatrix();
       }
-    }
-    private void CoordinatesParameter_ValueChanged(object sender, EventArgs e) {
-      if (Coordinates != null) {
-        Coordinates.Reset += new EventHandler(Coordinates_Reset);
-        Coordinates.ItemChanged += new EventHandler<EventArgs<int, int>>(Coordinates_ItemChanged);
-        UpdateDistancesFromCoordinates();
-      }
-    }
-    private void Coordinates_ItemChanged(object sender, EventArgs<int, int> e) {
-      UpdateDistancesFromCoordinates();
-    }
-    private void Coordinates_Reset(object sender, EventArgs e) {
-      UpdateDistancesFromCoordinates();
     }
     #endregion
@@ -262,7 +229,4 @@
       Distances.RowsChanged += new EventHandler(Distances_RowsChanged);
       Distances.ColumnsChanged += new EventHandler(Distances_ColumnsChanged);
-      CoordinatesParameter.ValueChanged += new EventHandler(CoordinatesParameter_ValueChanged);
-      Coordinates.Reset += new EventHandler(Coordinates_Reset);
-      Coordinates.ItemChanged += new EventHandler<EventArgs<int, int>>(Coordinates_ItemChanged);
     }
 
@@ -289,5 +253,4 @@
       if (BestQAPSolutionAnalyzer != null) {
         BestQAPSolutionAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
-        BestQAPSolutionAnalyzer.CoordinatesParameter.ActualName = CoordinatesParameter.Name;
         BestQAPSolutionAnalyzer.DistancesParameter.ActualName = DistancesParameter.Name;
         BestQAPSolutionAnalyzer.WeightsParameter.ActualName = WeightsParameter.Name;
@@ -335,19 +298,4 @@
       }
     }
-
-    private void UpdateDistancesFromCoordinates() {
-      if (Coordinates != null && Coordinates.Columns == 2 && Coordinates.Rows > 1) {
-        DoubleMatrix distance = new DoubleMatrix(Coordinates.Rows, Coordinates.Rows);
-        for (int i = 0; i < Coordinates.Rows - 1; i++) {
-          for (int j = i + 1; j < Coordinates.Rows; j++) {
-            double dx = Coordinates[i, 0] - Coordinates[j, 0];
-            double dy = Coordinates[i, 1] - Coordinates[j, 1];
-            distance[i, j] = Math.Sqrt(dx * dx + dy * dy);
-            distance[j, i] = Distances[i, j];
-          }
-        }
-        Distances = distance;
-      }
-    }
     #endregion
 
@@ -356,5 +304,4 @@
       parser.Parse(filename);
       if (parser.Error != null) throw parser.Error;
-      Coordinates = new DoubleMatrix();
       Distances = new DoubleMatrix(parser.Distances);
       Weights = new DoubleMatrix(parser.Weights);
@@ -372,5 +319,4 @@
         parser.Parse(stream);
         if (parser.Error != null) throw parser.Error;
-        Coordinates = new DoubleMatrix();
         Distances = new DoubleMatrix(parser.Distances);
         Weights = new DoubleMatrix(parser.Weights);
Index: trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/HeuristicLab.Problems.QuadraticAssignment.Tests-3.3.csproj
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/HeuristicLab.Problems.QuadraticAssignment.Tests-3.3.csproj	(revision 5855)
+++ trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/HeuristicLab.Problems.QuadraticAssignment.Tests-3.3.csproj	(revision 5933)
@@ -112,5 +112,5 @@
     <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86" />
     <Reference Include="HeuristicLab.Random-3.3">
-      <HintPath>..\..\..\..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Random-3.3.dll</HintPath>
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Random-3.3.dll</HintPath>
     </Reference>
     <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
Index: trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/QAPLIBInstancesTest.cs
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/QAPLIBInstancesTest.cs	(revision 5855)
+++ trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/QAPLIBInstancesTest.cs	(revision 5933)
@@ -1,3 +1,24 @@
-﻿using System;
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Text;
 using HeuristicLab.Common;
Index: trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/QAPMoveEvaluatorTest.cs
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/QAPMoveEvaluatorTest.cs	(revision 5855)
+++ trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/QAPMoveEvaluatorTest.cs	(revision 5933)
@@ -34,4 +34,8 @@
   [TestClass()]
   public class QAPSwapMoveEvaluatorTest {
+    private const int ProblemSize = 10;
+    private static DoubleMatrix symmetricDistances, symmetricWeights, asymmetricDistances, asymmetricWeights, nonZeroDiagonalWeights, nonZeroDiagonalDistances;
+    private static Permutation assignment;
+    private static MersenneTwister random;
 
     private TestContext testContextInstance;
@@ -45,58 +49,68 @@
     }
 
-    #region Additional test attributes
-    // 
-    //You can use the following additional attributes as you write your tests:
-    //
-    //Use ClassInitialize to run code before running the first test in the class
-    //[ClassInitialize()]
-    //public static void MyClassInitialize(TestContext testContext)
-    //{
-    //}
-    //
-    //Use ClassCleanup to run code after all tests in a class have run
-    //[ClassCleanup()]
-    //public static void MyClassCleanup()
-    //{
-    //}
-    //
-    //Use TestInitialize to run code before running each test
-    //[TestInitialize()]
-    //public void MyTestInitialize()
-    //{
-    //}
-    //
-    //Use TestCleanup to run code after each test has run
-    //[TestCleanup()]
-    //public void MyTestCleanup()
-    //{
-    //}
-    //
-    #endregion
+    [ClassInitialize]
+    public static void MyClassInitialize(TestContext testContext) {
+      random = new MersenneTwister();
+      symmetricDistances = new DoubleMatrix(ProblemSize, ProblemSize);
+      symmetricWeights = new DoubleMatrix(ProblemSize, ProblemSize);
+      asymmetricDistances = new DoubleMatrix(ProblemSize, ProblemSize);
+      asymmetricWeights = new DoubleMatrix(ProblemSize, ProblemSize);
+      nonZeroDiagonalDistances = new DoubleMatrix(ProblemSize, ProblemSize);
+      nonZeroDiagonalWeights = new DoubleMatrix(ProblemSize, ProblemSize);
+      for (int i = 0; i < ProblemSize - 1; i++) {
+        for (int j = i + 1; j < ProblemSize; j++) {
+          symmetricDistances[i, j] = random.Next(ProblemSize);
+          symmetricDistances[j, i] = symmetricDistances[i, j];
+          symmetricWeights[i, j] = random.Next(ProblemSize);
+          symmetricWeights[j, i] = symmetricWeights[i, j];
+          asymmetricDistances[i, j] = random.Next(ProblemSize);
+          asymmetricDistances[j, i] = random.Next(ProblemSize);
+          asymmetricWeights[i, j] = random.Next(ProblemSize);
+          asymmetricWeights[j, i] = random.Next(ProblemSize);
+          nonZeroDiagonalDistances[i, j] = random.Next(ProblemSize);
+          nonZeroDiagonalDistances[j, i] = random.Next(ProblemSize);
+          nonZeroDiagonalWeights[i, j] = random.Next(ProblemSize);
+          nonZeroDiagonalWeights[j, i] = random.Next(ProblemSize);
+        }
+        nonZeroDiagonalDistances[i, i] = random.Next(ProblemSize);
+        nonZeroDiagonalWeights[i, i] = random.Next(ProblemSize);
+      }
+      int index = random.Next(ProblemSize);
+      if (nonZeroDiagonalDistances[index, index] == 0)
+        nonZeroDiagonalDistances[index, index] = random.Next(1, ProblemSize);
+      index = random.Next(ProblemSize);
+      if (nonZeroDiagonalWeights[index, index] == 0)
+        nonZeroDiagonalWeights[index, index] = random.Next(1, ProblemSize);
+      assignment = new Permutation(PermutationTypes.Absolute, ProblemSize, random);
+    }
 
     [TestMethod]
-    public void SwapMoveEvaluatorTest() {
-      DoubleMatrix distances = new DoubleMatrix(
-        new double[,] { { 0, 1, 2, 3 },
-                        { 1, 0, 3, 4 },
-                        { 2, 3, 0, 5 },
-                        { 3, 4, 5, 0 } });
-      DoubleMatrix weights = new DoubleMatrix(
-        new double[,] { { 0, 1, 0, 0 },
-                        { 1, 0, 2, 0 },
-                        { 0, 2, 0, 1 },
-                        { 0, 0, 1, 0 } });
-      Permutation assignment = new Permutation(PermutationTypes.Absolute,
-        new int[] { 0, 1, 2, 3 });
-      MersenneTwister random = new MersenneTwister();
+    public void Swap2MoveEvaluatorTest() {
       for (int i = 0; i < 500; i++) {
-        int index1 = random.Next(4);
-        int index2 = random.Next(4);
-        double before = QAPEvaluator.Apply(assignment, weights, distances);
+        int index1 = random.Next(ProblemSize);
+        int index2 = random.Next(ProblemSize);
+
+        // SYMMETRIC MATRICES
+        double before = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
         Swap2Manipulator.Apply(assignment, index1, index2);
-        double after = QAPEvaluator.Apply(assignment, weights, distances);
-        // evaluate swap back
-        double move = QAPSwap2MoveEvaluator.Apply(assignment, new Swap2Move(index1, index2, assignment), weights, distances);
-        Assert.IsTrue(move.IsAlmost(before - after));
+        double after = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
+        double move = QAPSwap2MoveEvaluator.Apply(assignment, new Swap2Move(index1, index2, assignment), symmetricWeights, symmetricDistances);
+        Assert.IsTrue(move.IsAlmost(before - after), "Failed on symmetric matrices");
+
+        // ASYMMETRIC MATRICES
+        before = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        Permutation clone = (Permutation)assignment.Clone();
+        Swap2Manipulator.Apply(assignment, index1, index2);
+        after = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        move = QAPSwap2MoveEvaluator.Apply(clone, new Swap2Move(index1, index2), asymmetricWeights, asymmetricDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on asymmetric matrices");
+
+        // NON-ZERO DIAGONAL ASSYMETRIC MATRICES
+        before = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        clone = (Permutation)assignment.Clone();
+        Swap2Manipulator.Apply(assignment, index1, index2);
+        after = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        move = QAPSwap2MoveEvaluator.Apply(clone, new Swap2Move(index1, index2), nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on non-zero diagonal matrices");
       }
     }
@@ -104,27 +118,31 @@
     [TestMethod]
     public void InversionMoveEvaluatorTest() {
-      DoubleMatrix distances = new DoubleMatrix(
-        new double[,] { { 0, 1, 2, 3 },
-                        { 1, 0, 3, 4 },
-                        { 2, 3, 0, 5 },
-                        { 3, 4, 5, 0 } });
-      DoubleMatrix weights = new DoubleMatrix(
-        new double[,] { { 0, 1, 0, 0 },
-                        { 1, 0, 2, 0 },
-                        { 0, 2, 0, 1 },
-                        { 0, 0, 1, 0 } });
-      Permutation assignment = new Permutation(PermutationTypes.Absolute,
-        new int[] { 0, 1, 2, 3 });
-      MersenneTwister random = new MersenneTwister();
       for (int i = 0; i < 500; i++) {
-        int index1 = random.Next(4);
-        int index2 = random.Next(4);
-        double before = QAPEvaluator.Apply(assignment, weights, distances);
-        // invert
+        int index1 = random.Next(ProblemSize);
+        int index2 = random.Next(ProblemSize);
+        if (index1 > index2) { int h = index1; index1 = index2; index2 = h; }
+
+        // SYMMETRIC MATRICES
+        double before = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
         InversionManipulator.Apply(assignment, Math.Min(index1, index2), Math.Max(index1, index2));
-        double after = QAPEvaluator.Apply(assignment, weights, distances);
-        // evaluate invert back
-        double move = QAPInversionMoveEvaluator.Apply(assignment, new InversionMove(index1, index2, assignment), weights, distances);
-        Assert.IsTrue(move.IsAlmost(before - after));
+        double after = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
+        double move = QAPInversionMoveEvaluator.Apply(assignment, new InversionMove(index1, index2, assignment), symmetricWeights, symmetricDistances);
+        Assert.IsTrue(move.IsAlmost(before - after), "Failed on symmetric matrices");
+
+        // ASYMMETRIC MATRICES
+        before = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        Permutation clone = (Permutation)assignment.Clone();
+        InversionManipulator.Apply(assignment, index1, index2);
+        after = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        move = QAPInversionMoveEvaluator.Apply(clone, new InversionMove(index1, index2), asymmetricWeights, asymmetricDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on asymmetric matrices");
+
+        // NON-ZERO DIAGONAL ASYMMETRIC MATRICES
+        before = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        clone = (Permutation)assignment.Clone();
+        InversionManipulator.Apply(assignment, index1, index2);
+        after = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        move = QAPInversionMoveEvaluator.Apply(clone, new InversionMove(index1, index2), nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on non-zero diagonal matrices");
       }
     }
@@ -132,17 +150,4 @@
     [TestMethod]
     public void TranslocationMoveEvaluatorTest() {
-      DoubleMatrix distances = new DoubleMatrix(
-        new double[,] { { 0, 1, 2, 3 },
-                        { 1, 0, 3, 4 },
-                        { 2, 3, 0, 5 },
-                        { 3, 4, 5, 0 } });
-      DoubleMatrix weights = new DoubleMatrix(
-        new double[,] { { 0, 1, 0, 0 },
-                        { 1, 0, 2, 0 },
-                        { 0, 2, 0, 1 },
-                        { 0, 0, 1, 0 } });
-      Permutation assignment = new Permutation(PermutationTypes.Absolute,
-        new int[] { 0, 1, 2, 3 });
-      MersenneTwister random = new MersenneTwister();
       for (int i = 0; i < 500; i++) {
         int index1 = random.Next(assignment.Length - 1);
@@ -154,12 +159,28 @@
         else
           insertPoint = 0;
-        double before = QAPEvaluator.Apply(assignment, weights, distances);
-        // translocate
+
+        // SYMMETRIC MATRICES
+        double before = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
         Permutation clone = new Cloner().Clone(assignment);
         TranslocationManipulator.Apply(assignment, index1, index2, insertPoint);
-        double after = QAPEvaluator.Apply(assignment, weights, distances);
-        // evaluate translocate move
-        double move = QAPTranslocationMoveEvaluator.Apply(clone, new TranslocationMove(index1, index2, insertPoint, assignment), weights, distances);
-        Assert.IsTrue(move.IsAlmost(after - before));
+        double after = QAPEvaluator.Apply(assignment, symmetricWeights, symmetricDistances);
+        double move = QAPTranslocationMoveEvaluator.Apply(clone, new TranslocationMove(index1, index2, insertPoint, assignment), symmetricWeights, symmetricDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on symmetric matrices");
+
+        // ASYMMETRIC MATRICES
+        before = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        clone = new Cloner().Clone(assignment);
+        TranslocationManipulator.Apply(assignment, index1, index2, insertPoint);
+        after = QAPEvaluator.Apply(assignment, asymmetricWeights, asymmetricDistances);
+        move = QAPTranslocationMoveEvaluator.Apply(clone, new TranslocationMove(index1, index2, insertPoint, assignment), asymmetricWeights, asymmetricDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on asymmetric matrices");
+
+        // NON-ZERO DIAGONAL ASYMMETRIC MATRICES
+        before = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        clone = new Cloner().Clone(assignment);
+        TranslocationManipulator.Apply(assignment, index1, index2, insertPoint);
+        after = QAPEvaluator.Apply(assignment, nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        move = QAPTranslocationMoveEvaluator.Apply(clone, new TranslocationMove(index1, index2, insertPoint, assignment), nonZeroDiagonalWeights, nonZeroDiagonalDistances);
+        Assert.IsTrue(move.IsAlmost(after - before), "Failed on non-zero diagonal matrices");
       }
     }
