Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Creators/RandomPermutationCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Creators/RandomPermutationCreator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Creators/RandomPermutationCreator.cs	(revision 3052)
@@ -0,0 +1,63 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// An operator which creates a new random permutation of integer values.
+  /// </summary>
+  [Item("RandomPermutationCreator", "An operator which creates a new random permutation of integer values.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public sealed class RandomPermutationCreator : SingleSuccessorOperator, IPermutationCreator, IStochasticOperator {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public IValueLookupParameter<IntValue> LengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["Length"]; }
+    }
+    public ILookupParameter<Permutation> PermutationParameter {
+      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
+    }
+
+    public RandomPermutationCreator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used to initialize the new random permutation."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("Length", "The length of the new random permutation."));
+      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The new random permutation."));
+    }
+
+    public override IOperation Apply() {
+      PermutationParameter.ActualValue = new Permutation(LengthParameter.ActualValue.Value, RandomParameter.ActualValue);
+      return base.Apply();
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CosaCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CosaCrossover.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CosaCrossover.cs	(revision 3052)
@@ -0,0 +1,102 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// Performs the crossover described in the COSA optimization method.
+  /// </summary>
+  /// <remarks>
+  /// It is implemented as described in Wendt, O. 1994. COSA: COoperative Simulated Annealing - Integration von Genetischen Algorithmen und Simulated Annealing am Beispiel der Tourenplanung. Dissertation Thesis. IWI Frankfurt.<br />
+  /// The operator actually performs a 2-opt mutation on the first parent, but it uses the second parent to determine which new edge should be inserted.
+  /// Thus the mutation is not random as the second breakpoint depends on the information that is encoded in other members of the population.
+  /// The idea is that the child should not sit right inbetween the two parents, but rather go a little bit from one parent in direction to the other.
+  /// </remarks>
+  [Item("CosaCrossover", "An operator which performs the crossover described in the COSA optimization method. It is implemented as described in Wendt, O. 1994. COSA: COoperative Simulated Annealing - Integration von Genetischen Algorithmen und Simulated Annealing am Beispiel der Tourenplanung. Dissertation Thesis. IWI Frankfurt.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class CosaCrossover : PermutationCrossover {
+    /// <summary>
+    /// The operator actually performs a 2-opt mutation on the first parent, but it uses the second parent to determine which new edge should be inserted.
+    /// Thus the mutation is not random as the second breakpoint depends on the information that is encoded in other members of the population.
+    /// The idea is that the child should not sit right inbetween the two parents, but rather go a little bit from one parent in direction to the other.
+    /// </summary>
+    /// <exception cref="ArgumentException">Thrown when <paramref name="parent1"/> and <paramref name="parent2"/> are not of equal length.</exception>
+    /// <param name="random">The random number generator.</param>
+    /// <param name="parent1">The parent scope 1 to cross over.</param>
+    /// <param name="parent2">The parent scope 2 to cross over.</param>
+    /// <returns>The created cross over permutation as int array.</returns>
+    public static Permutation Apply(IRandom random, Permutation parent1, Permutation parent2) {
+      if (parent1.Length != parent2.Length) throw new ArgumentException("CosaCrossover: The parent permutations are of unequal length.");
+      int length = parent1.Length;
+      int[] result = new int[length];
+      int crossPoint, startIndex, endIndex;
+
+      crossPoint = random.Next(length);
+      startIndex = (crossPoint + 1) % length;
+
+      int i = 0;
+      while ((i < parent2.Length) && (parent2[i] != parent1[crossPoint])) {  // find index of cross point in second permutation
+        i++;
+      }
+      int newEdge = parent2[(i + 1) % length]; // the number that follows the cross point number in parent2 is the new edge that we want to insert
+      endIndex = 0;
+      while ((endIndex < parent1.Length) && (parent1[endIndex] != newEdge)) {  // find index of the new edge in the first permutation
+        endIndex++;
+      }
+
+      if (startIndex <= endIndex) {
+        // copy parent1 to child and reverse the order in between startIndex and endIndex
+        for (i = 0; i < parent1.Length; i++) {
+          if (i >= startIndex && i <= endIndex) {
+            result[i] = parent1[endIndex - i + startIndex];
+          } else {
+            result[i] = parent1[i];
+          }
+        }
+      } else { // startIndex > endIndex
+        for (i = 0; i < parent1.Length; i++) {
+          if (i >= startIndex || i <= endIndex) {
+            result[i] = parent1[(endIndex - i + startIndex + length) % length]; // add length to wrap around when dropping below index 0
+          } else {
+            result[i] = parent1[i];
+          }
+        }
+      }
+      return new Permutation(result);
+    }
+
+    /// <summary>
+    /// Checks number of parents and calls <see cref="Apply(IRandom, Permutation, Permutation)"/>.
+    /// </summary>
+    /// <exception cref="InvalidOperationException">Thrown if there are not exactly two parents.</exception>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parents">An array containing the two permutations that should be crossed.</param>
+    /// <returns>The newly created permutation, resulting from the crossover operation.</returns>
+    protected override Permutation Cross(IRandom random, ItemArray<Permutation> parents) {
+      if (parents.Length != 2) throw new InvalidOperationException("CosaCrossover: The number of parents is not equal to 2");
+      return Apply(random, parents[0], parents[1]);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CyclicCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CyclicCrossover.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CyclicCrossover.cs	(revision 3052)
@@ -0,0 +1,108 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// An operator which performs the cyclic crossover on two permutations.
+  /// </summary>
+  /// <remarks>It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg.<br />
+  /// The operator first determines all cycles in the permutation and then composes the offspring by alternating between the cycles of the two parents.
+  /// </remarks>
+  [Item("CyclicCrossover", "An operator which performs the cyclic crossover on two permutations. It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class CyclicCrossover : PermutationCrossover {
+    /// <summary>
+    /// Performs the cyclic crossover on <paramref name="parent1"/> and <paramref name="parent2"/>.
+    /// </summary>
+    /// <exception cref="ArgumentException">Thrown when <paramref name="parent1"/> and <paramref name="parent2"/> are not of equal length.</exception>
+    /// <exception cref="InvalidOperationException">Thrown if the numbers in the permutation elements are not in the range [0;N) with N = length of the permutation.</exception>
+    /// <remarks>
+    /// First this method randomly determines from which parent to start with equal probability.
+    /// Then it copies the first cycle from the chosen parent starting from index 0 in the permutation.
+    /// After the cycle is complete it copies the next cycle starting from the index closest to 0 which was not yet copied from the other parent.
+    /// It continues to switch between parents for each completed cycle until no new cycle is found anymore.<br /><br />
+    /// The stochasticity of this operator is rather low. There are only two possible outcomes for a given pair of parents.
+    /// </remarks>
+    /// <exception cref="ArgumentException">Thrown if the two parents are not of equal length.</exception>
+    /// <param name="random">The random number generator.</param>
+    /// <param name="parent1">The parent scope 1 to cross over.</param>
+    /// <param name="parent2">The parent scope 2 to cross over.</param>
+    /// <returns>The created cross over permutation as int array.</returns>
+    public static Permutation Apply(IRandom random, Permutation parent1, Permutation parent2) {
+      if (parent1.Length != parent2.Length) throw new ArgumentException("CyclicCrossover: The parent permutations are of unequal length.");
+      int length = parent1.Length;
+      int[] result = new int[length];
+      bool[] indexCopied = new bool[length];
+      int[] invParent1 = new int[length];
+      int[] invParent2 = new int[length];
+
+      // calculate inverse mappings (number -> index) for parent1 and parent2
+      try {
+        for (int i = 0; i < length; i++) {
+          invParent1[parent1[i]] = i;
+          invParent2[parent2[i]] = i;
+        }
+      } catch (IndexOutOfRangeException) {
+        throw new InvalidOperationException("CyclicCrossover: The permutation must consist of numbers in the interval [0;N) with N = length of the permutation.");
+      }
+
+      // randomly choose whether to start copying from parent1 or parent2
+      bool copyFromParent1 = ((random.NextDouble() < 0.5) ? (false) : (true));
+
+      int j = 0;
+      do {
+        do {
+          if (copyFromParent1) {
+            result[j] = parent1[j]; // copy number at position j from parent1
+            indexCopied[j] = true;
+            j = invParent2[result[j]]; // set position j to the position of the copied number in parent2
+          } else {
+            result[j] = parent2[j]; // copy number at position j from parent2
+            indexCopied[j] = true;
+            j = invParent1[result[j]]; // set position j to the position of the copied number in parent1
+          }
+        } while (!indexCopied[j]);
+        copyFromParent1 = !copyFromParent1;
+        j = 0;
+        while (j < length && indexCopied[j]) j++;
+      } while (j < length);
+
+      return new Permutation(result);
+    }
+
+    /// <summary>
+    /// Checks number of parents and calls <see cref="Apply(IRandom, Permutation, Permutation)"/>.
+    /// </summary>
+    /// <exception cref="InvalidOperationException">Thrown if there are not exactly two parents.</exception>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parents">An array containing the two permutations that should be crossed.</param>
+    /// <returns>The newly created permutation, resulting from the crossover operation.</returns>
+    protected override Permutation Cross(IRandom random, ItemArray<Permutation> parents) {
+      if (parents.Length != 2) throw new InvalidOperationException("CyclicCrossover: The number of parents is not equal to 2.");
+      return Apply(random, parents[0], parents[1]);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CyclicCrossover2.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CyclicCrossover2.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/CyclicCrossover2.cs	(revision 3052)
@@ -0,0 +1,95 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// An operator which performs a variant of the cyclic crossover on two permutations.
+  /// </summary>
+  /// <remarks>It is implemented as described in Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications. CRC Press. p. 136.<br />
+  /// The operator first selects a random position in the permutation and from that position copies the first cycle to the offspring.
+  /// Then all empty positions are filled from the second parent.
+  /// </remarks>
+  [Item("CyclicCrossover2", "An operator which performs the cyclic crossover on two permutations. It is implemented as described in Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications. CRC Press. p. 136.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class CyclicCrossover2 : PermutationCrossover {
+    /// <summary>
+    /// Performs a variant of the cyclic crossover on <paramref name="parent1"/> and <paramref name="parent2"/>.
+    /// </summary>
+    /// <exception cref="ArgumentException">Thrown when <paramref name="parent1"/> and <paramref name="parent2"/> are not of equal length.</exception>
+    /// <exception cref="InvalidOperationException">Thrown if the numbers in the permutation elements are not in the range [0;N) with N = length of the permutation.</exception>
+    /// <remarks>
+    /// Start at a randomly chosen position x in parent1 and transfer it to the child at the same position.
+    /// Now this position x is no longer available for the node on position x in parent2, so
+    /// the value of the node at position x in parent2 is searched in parent1 and is then transferred
+    /// to the child preserving the position. Now this new position y is no longer available for the node in parent2 and so on.<br/>
+    /// This procedure is repeated until it is again at position x, then the cycle is over.<br/>
+    /// All further positions are copied from the second permutation.
+    /// </remarks>
+    /// <exception cref="ArgumentException">Thrown if the two parents are not of equal length.</exception>
+    /// <param name="random">The random number generator.</param>
+    /// <param name="parent1">The parent scope 1 to cross over.</param>
+    /// <param name="parent2">The parent scope 2 to cross over.</param>
+    /// <returns>The created cross over permutation as int array.</returns>
+    public static Permutation Apply(IRandom random, Permutation parent1, Permutation parent2) {
+      if (parent1.Length != parent2.Length) throw new ArgumentException("CyclicCrossover2: The parent permutations are of unequal length.");
+      int length = parent1.Length;
+      int[] result = new int[length];
+      bool[] indexCopied = new bool[length];
+      int j, number;
+
+      j = random.Next(length);  // get number to start cycle
+      while (!indexCopied[j]) {  // copy whole cycle to new permutation
+        result[j] = parent1[j];
+        number = parent2[j];
+        indexCopied[j] = true;
+
+        j = 0;
+        while ((j < length) && (parent1[j] != number)) {  // search copied number in second permutation
+          j++;
+        }
+      }
+
+      for (int i = 0; i < length; i++) {  // copy rest of secound permutation to new permutation
+        if (!indexCopied[i]) {
+          result[i] = parent2[i];
+        }
+      }
+      return new Permutation(result);
+    }
+
+    /// <summary>
+    /// Checks number of parents and calls <see cref="Apply(IRandom, Permutation, Permutation)"/>.
+    /// </summary>
+    /// <exception cref="InvalidOperationException">Thrown if there are not exactly two parents.</exception>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parents">An array containing the two permutations that should be crossed.</param>
+    /// <returns>The newly created permutation, resulting from the crossover operation.</returns>
+    protected override Permutation Cross(IRandom random, ItemArray<Permutation> parents) {
+      if (parents.Length != 2) throw new InvalidOperationException("CyclicCrossover2: The number of parents is not equal to 2.");
+      return Apply(random, parents[0], parents[1]);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/EdgeRecombinationCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/EdgeRecombinationCrossover.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/EdgeRecombinationCrossover.cs	(revision 3052)
@@ -0,0 +1,154 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// Performs a cross over permutation between two permutation arrays by calculating the edges (neighbours)
+  /// of each element. Starts at a randomly chosen position, the next element is a neighbour with the least 
+  /// number of neighbours, the next again a neighbour and so on.
+  /// </summary>
+  /// <remarks>
+  /// It is implemented as described in Whitley et.al. 1991, The Traveling Salesman and Sequence Scheduling, in Davis, L. (Ed.), Handbook of Genetic Algorithms, New York, pp. 350-372.<br />
+  /// The operator first determines all cycles in the permutation and then composes the offspring by alternating between the cycles of the two parents.
+  /// </remarks>
+  [Item("EdgeRecombinationCrossover", "An operator which performs the edge recombination crossover on two permutations. It is implemented as described in Whitley et.al. 1991, The Traveling Salesman and Sequence Scheduling, in Davis, L. (Ed.), Handbook of Genetic Algorithms, New York, pp. 350-372.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class EdgeRecombinationCrossover : PermutationCrossover {
+    /// <summary>
+    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="2"/>
+    /// by calculating the edges of each element. Starts at a randomly chosen position, 
+    /// the next element is a neighbour with the least 
+    /// number of neighbours, the next again a neighbour and so on.
+    /// </summary>
+    /// <exception cref="ArgumentException">Thrown when <paramref name="parent1"/> and <paramref name="parent2"/> are not of equal length.</exception>
+    /// <exception cref="InvalidOperationException">Thrown when the permutation lacks a number.
+    /// </exception>
+    /// <param name="random">The random number generator.</param>
+    /// <param name="parent1">The parent scope 1 to cross over.</param>
+    /// <param name="parent2">The parent scope 2 to cross over.</param>
+    /// <returns>The created cross over permutation as int array.</returns>
+    public static Permutation Apply(IRandom random, Permutation parent1, Permutation parent2) {
+      if (parent1.Length != parent2.Length) throw new ArgumentException("EdgeRecombinationCrossover: The parent permutations are of unequal length.");
+      int length = parent1.Length;
+      int[] result = new int[length];
+      int[,] edgeList = new int[length, 4];
+      bool[] remainingNumbers = new bool[length];
+      int index, currentEdge, currentNumber, nextNumber, currentEdgeCount, minEdgeCount;
+
+      for (int i = 0; i < length; i++) {  // generate edge list for every number
+        remainingNumbers[i] = true;
+
+        index = 0;
+        while ((index < length) && (parent1[index] != i)) {  // search edges in parent1
+          index++;
+        }
+        if (index == length) {
+          throw (new InvalidOperationException("Permutation doesn't contain number " + i + "."));
+        } else {
+          edgeList[i, 0] = parent1[(index - 1 + length) % length];
+          edgeList[i, 1] = parent1[(index + 1) % length];
+        }
+        index = 0;
+        while ((index < length) && (parent2[index] != i)) {  // search edges in parent2
+          index++;
+        }
+        if (index == length) {
+          throw (new InvalidOperationException("Permutation doesn't contain number " + i + "."));
+        } else {
+          currentEdge = parent2[(index - 1 + length) % length];
+          if ((edgeList[i, 0] != currentEdge) && (edgeList[i, 1] != currentEdge)) {  // new edge found ?
+            edgeList[i, 2] = currentEdge;
+          } else {
+            edgeList[i, 2] = -1;
+          }
+          currentEdge = parent2[(index + 1) % length];
+          if ((edgeList[i, 0] != currentEdge) && (edgeList[i, 1] != currentEdge)) {  // new edge found ?
+            edgeList[i, 3] = currentEdge;
+          } else {
+            edgeList[i, 3] = -1;
+          }
+        }
+      }
+
+      currentNumber = random.Next(length);  // get number to start
+      for (int i = 0; i < length; i++) {
+        result[i] = currentNumber;
+        remainingNumbers[currentNumber] = false;
+
+        for (int j = 0; j < 4; j++) {  // remove all edges to / from currentNumber
+          if (edgeList[currentNumber, j] != -1) {
+            for (int k = 0; k < 4; k++) {
+              if (edgeList[edgeList[currentNumber, j], k] == currentNumber) {
+                edgeList[edgeList[currentNumber, j], k] = -1;
+              }
+            }
+          }
+        }
+
+        minEdgeCount = 5;  // every number hasn't more than 4 edges
+        nextNumber = -1;
+        for (int j = 0; j < 4; j++) {  // find next number with least edges
+          if (edgeList[currentNumber, j] != -1) {  // next number found
+            currentEdgeCount = 0;
+            for (int k = 0; k < 4; k++) {  // count edges of next number
+              if (edgeList[edgeList[currentNumber, j], k] != -1) {
+                currentEdgeCount++;
+              }
+            }
+            if ((currentEdgeCount < minEdgeCount) ||
+              ((currentEdgeCount == minEdgeCount) && (random.NextDouble() < 0.5))) {
+              nextNumber = edgeList[currentNumber, j];
+              minEdgeCount = currentEdgeCount;
+            }
+          }
+        }
+        currentNumber = nextNumber;
+        if (currentNumber == -1) {  // current number has no more edge
+          index = 0;
+          while ((index < length) && (!remainingNumbers[index])) {  // choose next remaining number
+            index++;
+          }
+          if (index < length) {
+            currentNumber = index;
+          }
+        }
+      }
+      return new Permutation(result);
+    }
+
+    /// <summary>
+    /// Checks number of parents and calls <see cref="Apply(IRandom, Permutation, Permutation)"/>.
+    /// </summary>
+    /// <exception cref="InvalidOperationException">Thrown if there are not exactly two parents.</exception>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parents">An array containing the two permutations that should be crossed.</param>
+    /// <returns>The newly created permutation, resulting from the crossover operation.</returns>
+    protected override Permutation Cross(IRandom random, ItemArray<Permutation> parents) {
+      if (parents.Length != 2) throw new InvalidOperationException("ERROR in EdgeRecombinationCrossover: The number of parents is not equal to 2");
+      return Apply(random, parents[0], parents[1]);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/MaximalPreservativeCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/MaximalPreservativeCrossover.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/MaximalPreservativeCrossover.cs	(revision 3052)
@@ -0,0 +1,141 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>An operator which performs the maximal preservative crossover on two permutations.</summary>
+  /// <remarks>
+  /// Performs a crossover between two permuation arrays by preserving a large number of edges in both parents.
+  /// The operator also maintains the position in the arrays to some extent.
+  /// It is implemented as described in Mühlenbein, H. 1991. Evolution in time and space - the parallel genetic algorithm. FOUNDATIONS OF GENETIC ALGORITHMS, pp. 316-337. Morgan Kaufmann.<br /><br />
+  /// The length of the segment copied from the first parent to the offspring is uniformly distributed in the interval [3;N/3) with N = length of the permutation.
+  /// This recommendation is mentioned in Pohlheim, H. 1999. Evolutionäre Algorithmen: Verfahren, Operatoren und Hinweise für die Praxis, p. 44, Springer.
+  /// If the length of the permutation is smaller than 15, the size of the segment is always equal to 3.
+  /// </remarks>
+  [Item("MaximalPreservativeCrossover", "An operator which performs the maximal preservative crossover on two permutations. It is implemented as described in Mühlenbein, H. 1991. Evolution in time and space - the parallel genetic algorithm. FOUNDATIONS OF GENETIC ALGORITHMS, pp. 316-337. Morgan Kaufmann.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class MaximalPreservativeCrossover : PermutationCrossover {
+    /// <summary>
+    /// Performs the maximal preservative crossover on <paramref name="parent1"/> and <paramref name="parent2"/>
+    /// by preserving a large number of edges in both parents.
+    /// </summary>
+    /// <exception cref="ArgumentException">Thrown when <paramref name="parent1"/> and <paramref name="parent2"/> are not of equal length or when the permutations are shorter than 4 elements.</exception>
+    /// <exception cref="InvalidOperationException">Thrown if the numbers in the permutation elements are not in the range [0;N) with N = length of the permutation.</exception>
+    /// <remarks>
+    /// First one segment is copied from the first parent to the offspring in the same position.
+    /// Then the tour is completed by adding the next number from the second parent if such an edge exists,
+    /// or from the first parent, or from the next number of the second parent.
+    /// The last case results in an unwanted mutation.
+    /// </remarks>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parent1">The first parent permutation to cross.</param>
+    /// <param name="parent2">The second parent permutation to cross.</param>
+    /// <returns>The new permutation resulting from the crossover.</returns>
+    public static Permutation Apply(IRandom random, Permutation parent1, Permutation parent2) {
+      if (parent1.Length != parent2.Length) throw new ArgumentException("MaximalPreservativeCrossover: The parent permutations are of unequal length.");
+      if (parent1.Length < 4) throw new ArgumentException("MaximalPreservativeCrossover: The parent permutation must be at least of size 4.");
+      int length = parent1.Length;
+      int[] result = new int[length];
+      bool[] numberCopied = new bool[length];
+      int breakPoint1, breakPoint2, subsegmentLength, index;
+
+      subsegmentLength = random.Next(3, Math.Max(length / 3, 4)); // as mentioned in Pohlheim, H. Evolutionäre Algorithmen: Verfahren, Operatoren und Hinweise für die Praxis, 1999, p.44, Springer.
+      breakPoint1 = random.Next(length);
+      breakPoint2 = breakPoint1 + subsegmentLength;
+      if (breakPoint2 >= length) breakPoint2 -= length;
+
+      // copy string between position [breakPoint1, breakPoint2) from parent1 to the offspring
+      index = breakPoint1;
+      do {
+        result[index] = parent1[index];
+        numberCopied[result[index]] = true;
+        index++;
+        if (index >= length) index -= length;
+      } while (index != breakPoint2);
+
+      // calculate inverse permutation (number -> index) to help finding the follower of a given number
+      int[] invParent1 = new int[length];
+      int[] invParent2 = new int[length];
+      try {
+        for (int i = 0; i < length; i++) {
+          invParent1[parent1[i]] = i;
+          invParent2[parent2[i]] = i;
+        }
+      } catch (IndexOutOfRangeException) {
+        throw new InvalidOperationException("MaximalPreservativeCrossover: The permutation must consist of numbers in the interval [0;N) with N = length of the permutation.");
+      }
+
+      int prevIndex = ((index > 0) ? (index - 1) : (length - 1));
+      do {
+        // look for the follower of the last number in parent2
+        int p2Follower = GetFollower(parent2, invParent2[result[prevIndex]]);
+        if (!numberCopied[p2Follower]) {
+          result[index] = p2Follower;
+        } else {
+          // if that follower has already been added, look for the follower of the last number in parent1
+          int p1Follower = GetFollower(parent1, invParent1[result[prevIndex]]);
+          if (!numberCopied[p1Follower]) {
+            result[index] = p1Follower;
+          } else {
+            // if that has also been added, look for the next not already added number in parent2
+            int tempIndex = index;
+            for (int i = 0; i < parent2.Length; i++) {
+              if (!numberCopied[parent2[tempIndex]]) {
+                result[index] = parent2[tempIndex];
+                break;
+              }
+              tempIndex++;
+              if (tempIndex >= parent2.Length) tempIndex = 0;
+            }
+          }
+        }
+        numberCopied[result[index]] = true;
+        prevIndex = index;
+        index++;
+        if (index >= length) index -= length;
+      } while (index != breakPoint1);
+
+      return new Permutation(result);
+    }
+
+    private static int GetFollower(Permutation parent, int index) {
+      if (index + 1 == parent.Length)
+        return parent[0];
+      return parent[index + 1];
+    }
+
+    /// <summary>
+    /// Checks number of parents and calls <see cref="Apply(IRandom, Permutation, Permutation)"/>.
+    /// </summary>
+    /// <exception cref="InvalidOperationException">Thrown if there are not exactly two permutations in <paramref name="parents"/>.</exception>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parents">An array containing the two permutations that should be crossed.</param>
+    /// <returns>The newly created permutation, resulting from the crossover operation.</returns>
+    protected override Permutation Cross(IRandom random, ItemArray<Permutation> parents) {
+      if (parents.Length != 2) throw new InvalidOperationException("MaximalPreservativeCrossover: Number of parents is not equal to 2.");
+      return Apply(random, parents[0], parents[1]);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderBasedCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderBasedCrossover.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderBasedCrossover.cs	(revision 3052)
@@ -0,0 +1,107 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// Performs a cross over permutation of two permutation arrays by taking randomly a selection of values 
+  /// (not an interval!) from the first permutation keeping the correct order and filling 
+  /// the missing entries with the elements from the second permutation, also in the right order.
+  /// </summary>
+  /// <remarks>
+  /// This is in some papers also called Order Crossover #2.<br />
+  /// It is implemented as described in Syswerda, G. (1991). Schedule Optimization Using Genetic Algorithms. In Davis, L. (Ed.) Handbook of Genetic Algorithms, Van Nostrand Reinhold, New York, pp. 332-349.
+  /// </remarks>
+  [Item("OrderBasedCrossover", "An operator which performs an order based crossover of two permutations. It is implemented as described in Syswerda, G. (1991). Schedule Optimization Using Genetic Algorithms. In Davis, L. (Ed.) Handbook of Genetic Algorithms, Van Nostrand Reinhold, New York, pp. 332-349.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class OrderBasedCrossover : PermutationCrossover {
+    /// <summary>
+    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/> by
+    /// randomly selecting some values from the first permutation that will be inserted one after each 
+    /// other; the missing ones are picked in the correct order from the second permutation.
+    /// </summary>
+    /// <exception cref="ArgumentException">Thrown when <paramref name="parent1"/> and <paramref name="parent2"/> are not of equal length.</exception>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parent1">The first parent permutation to cross.</param>
+    /// <param name="parent2">The second parent permutation to cross.</param>
+    /// <returns>The new permutation resulting from the crossover.</returns>
+    public static Permutation Apply(IRandom random, Permutation parent1, Permutation parent2) {
+      if (parent1.Length != parent2.Length) throw new ArgumentException("OrderBasedCrossover: The parent permutations are of unequal length.");
+      int length = parent1.Length;
+      int[] result = new int[length];
+      int[] selectedNumbers = new int[random.Next(length + 1)];
+      bool[] numberSelected = new bool[length];
+      int index, selectedIndex, currentIndex;
+
+      for (int i = 0; i < selectedNumbers.Length; i++) {  // select numbers for array
+        index = 0;
+        while (numberSelected[parent1[index]]) {  // find first valid index
+          index++;
+        }
+
+        selectedIndex = random.Next(length - i);
+        currentIndex = 0;
+        while ((index < parent1.Length) && (currentIndex != selectedIndex)) {  // find selected number
+          index++;
+          if (!numberSelected[parent1[index]]) {
+            currentIndex++;
+          }
+        }
+        numberSelected[parent1[index]] = true;
+      }
+
+      index = 0;
+      for (int i = 0; i < parent1.Length; i++) {  // copy selected numbers in array
+        if (numberSelected[parent1[i]]) {
+          selectedNumbers[index] = parent1[i];
+          index++;
+        }
+      }
+
+      index = 0;
+      for (int i = 0; i < result.Length; i++) {  // copy rest of second permutation and selected numbers in order of first permutation
+        if (numberSelected[parent2[i]]) {
+          result[i] = selectedNumbers[index];
+          index++;
+        } else {
+          result[i] = parent2[i];
+        }
+      }
+      return new Permutation(result);
+    }
+
+    /// <summary>
+    /// Checks number of parents and calls <see cref="Apply(IRandom, Permutation, Permutation)"/>.
+    /// </summary>
+    /// <exception cref="InvalidOperationException">Thrown if there are not exactly two parents.</exception>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parents">An array containing the two permutations that should be crossed.</param>
+    /// <returns>The new permutation resulting from the crossover.</returns>
+    protected override Permutation Cross(IRandom random, ItemArray<Permutation> parents) {
+      if (parents.Length != 2) throw new InvalidOperationException("OrderCrossover: Number of parents is not equal to 2.");
+      return Apply(random, parents[0], parents[1]);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderCrossover.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderCrossover.cs	(revision 3052)
@@ -0,0 +1,98 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// An operator which performs the order crossover on two permutations.
+  /// </summary>
+  /// <remarks>
+  /// It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg.<br />
+  /// Crosses two permutations by copying a randomly chosen interval from the first permutation, preserving
+  /// the positions. Then, starting from the end of the copied interval, copies the missing values from the second permutation
+  /// in the order they occur.
+  /// </remarks>
+  [Item("OrderCrossover", "An operator which performs an order crossover of two permutations. It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class OrderCrossover : PermutationCrossover {
+    /// <summary>
+    /// Performs the order crossover of two permutations.
+    /// </summary>
+    /// <exception cref="ArgumentException">Thrown when <paramref name="parent1"/> and <paramref name="parent2"/> are not of equal length.</exception>
+    /// <exception cref="InvalidOperationException">Thrown if the numbers in the permutation elements are not in the range [0,N) with N = length of the permutation.</exception>
+    /// <remarks>
+    /// Crosses two permutations by copying a randomly chosen interval from the first permutation, preserving
+    /// the positions. Then, starting from the end of the copied interval, copies the missing values from the second permutation
+    /// in the order they occur.
+    /// </remarks>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parent1">The first parent permutation to cross.</param>
+    /// <param name="parent2">The second parent permutation to cross.</param>
+    /// <returns>The new permutation resulting from the crossover.</returns>
+    public static Permutation Apply(IRandom random, Permutation parent1, Permutation parent2) {
+      if (parent1.Length != parent2.Length) throw new ArgumentException("OrderCrossover: The parent permutations are of unequal length.");
+      int length = parent1.Length;
+      int[] result = new int[length];
+      bool[] copied = new bool[length];
+
+      int breakPoint1 = random.Next(length - 1);
+      int breakPoint2 = random.Next(breakPoint1 + 1, length);
+
+      try {
+        for (int j = breakPoint1; j <= breakPoint2; j++) {  // copy part of first permutation
+          result[j] = parent1[j];
+          copied[parent1[j]] = true;
+        }
+
+        int index = ((breakPoint2 + 1 >= length) ? (0) : (breakPoint2 + 1));
+        int i = index; // for moving in parent2
+        while (index != breakPoint1) {
+          if (!copied[parent2[i]]) {
+            result[index] = parent2[i];
+            index++;
+            if (index >= length) index = 0;
+          }
+          i++;
+          if (i >= length) i = 0;
+        }
+      } catch (IndexOutOfRangeException) {
+        throw new InvalidOperationException("OrderCrossover: The permutation must consist of numbers in the interval [0;N) with N = length of the permutation.");
+      }
+      return new Permutation(result);
+    }
+
+    /// <summary>
+    /// Checks number of parents and calls <see cref="Apply(IRandom, Permutation, Permutation)"/>.
+    /// </summary>
+    /// <exception cref="InvalidOperationException">Thrown if there are not exactly two parents.</exception>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parents">An array containing the two permutations that should be crossed.</param>
+    /// <returns>The new permutation resulting from the crossover.</returns>
+    protected override Permutation Cross(IRandom random, ItemArray<Permutation> parents) {
+      if (parents.Length != 2) throw new InvalidOperationException("OrderCrossover: Number of parents is not equal to 2.");
+      return Apply(random, parents[0], parents[1]);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderCrossover2.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderCrossover2.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/OrderCrossover2.cs	(revision 3052)
@@ -0,0 +1,90 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// An operator which performs a slight variant of the order crossover on two permutations.
+  /// </summary>
+  /// <remarks>
+  /// It is implemented as described in Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications. CRC Press. p. 135.<br />
+  /// Crosses two permutations by copying a randomly chosen interval from the first permutation, preserving
+  /// the positions. But then, instead of starting from the end of the copied interval, the missing values are copied from the start of the permutation in the order they occur.
+  /// </remarks>
+  [Item("OrderCrossover2", "An operator which performs an order crossover of two permutations. It is implemented as described in Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications. CRC Press. p. 135.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class OrderCrossover2 : PermutationCrossover {
+    /// <summary>
+    /// Performs a slight variation of the order crossover of two permutations.
+    /// </summary>
+    /// <exception cref="ArgumentException">Thrown when <paramref name="parent1"/> and <paramref name="parent2"/> are not of equal length.</exception>
+    /// <remarks>
+    /// Crosses two permutations by copying a randomly chosen interval from the first permutation, preserving
+    /// the positions. Then, from the beginning of the permutation, copies the missing values from the second permutation
+    /// in the order they occur.
+    /// </remarks>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parent1">The first parent permutation to cross.</param>
+    /// <param name="parent2">The second parent permutation to cross.</param>
+    /// <returns>The new permutation resulting from the crossover.</returns>
+    public static Permutation Apply(IRandom random, Permutation parent1, Permutation parent2) {
+      if (parent1.Length != parent2.Length) throw new ArgumentException("OrderCrossover2: The parent permutations are of unequal length.");
+      int[] result = new int[parent1.Length];
+      bool[] copied = new bool[result.Length];
+
+      int breakPoint1 = random.Next(result.Length - 1);
+      int breakPoint2 = random.Next(breakPoint1 + 1, result.Length);
+
+      for (int i = breakPoint1; i <= breakPoint2; i++) {  // copy part of first permutation
+        result[i] = parent1[i];
+        copied[parent1[i]] = true;
+      }
+
+      int index = 0;
+      for (int i = 0; i < parent2.Length; i++) {  // copy remaining part of second permutation
+        if (index == breakPoint1) {  // skip already copied part
+          index = breakPoint2 + 1;
+        }
+        if (!copied[parent2[i]]) {
+          result[index] = parent2[i];
+          index++;
+        }
+      }
+      return new Permutation(result);
+    }
+
+    /// <summary>
+    /// Checks number of parents and calls <see cref="Apply(IRandom, Permutation, Permutation)"/>.
+    /// </summary>
+    /// <exception cref="InvalidOperationException">Thrown if there are not exactly two parents.</exception>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parents">An array containing the two permutations that should be crossed.</param>
+    /// <returns>The new permutation resulting from the crossover.</returns>
+    protected override Permutation Cross(IRandom random, ItemArray<Permutation> parents) {
+      if (parents.Length != 2) throw new InvalidOperationException("OrderCrossover2: Number of parents is not equal to 2.");
+      return Apply(random, parents[0], parents[1]);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/PartiallyMatchedCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/PartiallyMatchedCrossover.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/PartiallyMatchedCrossover.cs	(revision 3052)
@@ -0,0 +1,102 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// An operator which performs the partially matched crossover on two permutations.
+  /// </summar>
+  /// <remarks>
+  /// It is implemented as described in Fogel, D.B. 1988. An Evolutionary Approach to the Traveling Salesman Problem. Biological Cybernetics, 60, pp. 139-144, Springer-Verlag.
+  /// which references Goldberg, D.E., and Lingle, R. 1985. Alleles, loci, and the traveling salesman problem. Proceedings of an International Conference on Genetic Algorithms and their Applications. Carnegie-Mellon University, pp. 154-159.
+  /// as the original source of the operator.
+  /// </remarks>
+  [Item("PartiallyMatchedCrossover", "An operator which performs the partially matched crossover on two permutations. It is implemented as described in Fogel, D.B. 1988. An Evolutionary Approach to the Traveling Salesman Problem. Biological Cybernetics, 60, pp. 139-144, Springer-Verlag.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class PartiallyMatchedCrossover : PermutationCrossover {
+    /// <summary>
+    /// Performs the partially matched crossover on <paramref name="parent1"/> and <paramref name="parent2"/>.
+    /// </summary>
+    /// <exception cref="ArgumentException">Thrown when <paramref name="parent1"/> and <paramref name="parent2"/> are not of equal length or when the permutations are shorter than 4 elements.</exception>
+    /// <exception cref="InvalidOperationException">Thrown if the numbers in the permutation elements are not in the range [0,N) with N = length of the permutation.</exception>
+    /// <remarks>
+    /// Initially the new offspring is a clone of <paramref name="parent2"/>.
+    /// Then a segment is extracted from <paramref name="parent1"/> and copied to the offspring position by position.
+    /// Whenever a position is copied, the number at that position currently in the offspring is transfered to the position where the copied number has been.
+    /// E.g.: Position 15 is selected to be copied from <paramref name="parent1"/> to <paramref name="parent2"/>. At position 15 there is a '3' in <paramref name="parent1"/> and a '5' in the new offspring.
+    /// The '5' in the offspring is then moved to replace the '3' in the offspring and '3' is written at position 15.
+    /// </remarks>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parent1">The first parent permutation to cross.</param>
+    /// <param name="parent2">The second parent permutation to cross.</param>
+    /// <returns>The new permutation resulting from the crossover.</returns>
+    public static Permutation Apply(IRandom random, Permutation parent1, Permutation parent2) {
+      if (parent1.Length != parent2.Length) throw new ArgumentException("PartiallyMatchedCrossover: The parent permutations are of unequal length.");
+      if (parent1.Length < 4) throw new ArgumentException("PartiallyMatchedCrossover: The parent permutation must be at least of size 4.");
+      int length = parent1.Length;
+      int[] result = new int[length];
+      int[] invResult = new int[length];
+
+      int breakPoint1, breakPoint2;
+      do {
+        breakPoint1 = random.Next(length - 1);
+        breakPoint2 = random.Next(breakPoint1 + 1, length);
+      } while (breakPoint2 - breakPoint1 >= length - 2); // prevent the case [0,length-1) -> clone of parent1
+
+      // clone parent2 and calculate inverse permutation (number -> index)
+      try {
+        for (int j = 0; j < length; j++) {
+          result[j] = parent2[j];
+          invResult[result[j]] = j;
+        }
+      } catch (IndexOutOfRangeException) {
+        throw new InvalidOperationException("PartiallyMatchedCrossover: The permutation must consist of consecutive numbers from 0 to N-1 with N = length of the permutation.");
+      }
+
+      for (int j = breakPoint1; j <= breakPoint2; j++) {
+        int orig = result[j]; // save the former value
+        result[j] = parent1[j]; // overwrite the former value with the new value
+        int index = invResult[result[j]]; // look where the new value is in the offspring
+        result[index] = orig; // write the former value to this position
+        invResult[orig] = index; // update the inverse mapping
+        // it's not necessary to do 'invResult[result[j]] = j' as this will not be needed again
+      }
+
+      return new Permutation(result);
+    }
+
+    /// <summary>
+    /// Checks number of parents and calls <see cref="Apply(Apply(IRandom, Permutation, Permutation)"/>.
+    /// </summary>
+    /// <exception cref="InvalidOperationException">Thrown if there are not exactly two permutations in <paramref name="parents"/>.</exception>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parents">An array containing the two permutations that should be crossed.</param>
+    /// <returns>The newly created permutation, resulting from the crossover operation.</returns>
+    protected override Permutation Cross(IRandom random, ItemArray<Permutation> parents) {
+      if (parents.Length != 2) throw new InvalidOperationException("PartiallyMatchedCrossover: The number of parents is not equal to 2.");
+      return Apply(random, parents[0], parents[1]);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/PositionBasedCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/PositionBasedCrossover.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Crossovers/PositionBasedCrossover.cs	(revision 3052)
@@ -0,0 +1,93 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// Performs a cross over permutation between two permutation arrays based on randomly chosen positions.
+  /// </summary>
+  /// <remarks>
+  /// It is implemented as described in Syswerda, G. (1991). Schedule Optimization Using Genetic Algorithms. In Davis, L. (Ed.) Handbook of Genetic Algorithms, Van Nostrand Reinhold, New York, pp 332-349.
+  /// </remarks>
+  [Item("PositionBasedCrossover", "An operator which performs the position based crossover on two permutations. It is implemented as described in Syswerda, G. (1991). Schedule Optimization Using Genetic Algorithms. In Davis, L. (Ed.) Handbook of Genetic Algorithms, Van Nostrand Reinhold, New York, pp 332-349.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class PositionBasedCrossover : PermutationCrossover {
+    /// <summary>
+    /// Performs a cross over permutation of <paramref name="parent1"/> and <paramref name="parent2"/>
+    /// based on randomly chosen positions to define which position to take from where.
+    /// </summary>
+    /// <exception cref="ArgumentException">Thrown when <paramref name="parent1"/> and <paramref name="parent2"/> are not of equal length.</exception>
+    /// <param name="random">The random number generator.</param>
+    /// <param name="parent1">First parent</param>
+    /// <param name="parent2">Second Parent</param>
+    /// <returns>Child</returns>
+    public static Permutation Apply(IRandom random, Permutation parent1, Permutation parent2) {
+      if (parent1.Length != parent2.Length) throw new ArgumentException("PositionBasedCrossover: The parent permutations are of unequal length.");
+      int length = parent1.Length;
+      int[] result = new int[length];
+      bool[] randomPosition = new bool[length];
+      bool[] numberCopied = new bool[length];
+      int randomPosNumber = random.Next(length);
+
+      for (int i = 0; i < randomPosNumber; i++) {  // generate random bit mask
+        randomPosition[random.Next(length)] = true;
+      }
+
+      for (int i = 0; i < length; i++) {  // copy numbers masked as true from second permutation
+        if (randomPosition[i]) {
+          result[i] = parent2[i];
+          numberCopied[parent2[i]] = true;
+        }
+      }
+
+      int index = 0;
+      for (int i = 0; i < length; i++) {  // copy numbers masked as false from first permutation
+        if (!numberCopied[parent1[i]]) {
+          if (randomPosition[index]) {
+            while (randomPosition[index]) {
+              index++;
+            }
+          }
+          result[index] = parent1[i];
+          index++;
+        }
+      }
+
+      return new Permutation(result);
+    }
+
+    /// <summary>
+    /// Checks number of parents and calls <see cref="Apply(IRandom, Permutation, Permutation)"/>.
+    /// </summary>
+    /// <exception cref="InvalidOperationException">Thrown if there are not exactly two parents.</exception>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="parents">An array containing the two permutations that should be crossed.</param>
+    /// <returns>The newly created permutation, resulting from the crossover operation.</returns>
+    protected override Permutation Cross(IRandom random, ItemArray<Permutation> parents) {
+      if (parents.Length != 2) throw new InvalidOperationException("ERROR in PositionBasedCrossover: The number of parents is not equal to 2");
+      return Apply(random, parents[0], parents[1]);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/HeuristicLab.Encodings.Permutation-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/HeuristicLab.Encodings.Permutation-3.3.csproj	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/HeuristicLab.Encodings.Permutation-3.3.csproj	(revision 3052)
@@ -0,0 +1,196 @@
+﻿<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{00282156-589D-424F-9CE4-A8038636C926}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Encodings.Permutation</RootNamespace>
+    <AssemblyName>HeuristicLab.Encodings.Permutation-3.3</AssemblyName>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>2.0</OldToolsVersion>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <DocumentationFile>bin\Release\HeuristicLab.Encodings.Permutation-3.3.xml</DocumentationFile>
+  </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>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <DocumentationFile>bin\x86\Release\HeuristicLab.Encodings.Permutation-3.3.xml</DocumentationFile>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </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>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <DocumentationFile>bin\x64\Release\HeuristicLab.Permutation-3.2.xml</DocumentationFile>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Creators\RandomPermutationCreator.cs" />
+    <Compile Include="Crossovers\CosaCrossover.cs" />
+    <Compile Include="Crossovers\CyclicCrossover.cs" />
+    <Compile Include="Crossovers\CyclicCrossover2.cs" />
+    <Compile Include="Crossovers\EdgeRecombinationCrossover.cs" />
+    <Compile Include="Crossovers\MaximalPreservativeCrossover.cs" />
+    <Compile Include="Crossovers\OrderBasedCrossover.cs" />
+    <Compile Include="Crossovers\OrderCrossover.cs" />
+    <Compile Include="Crossovers\OrderCrossover2.cs" />
+    <Compile Include="Crossovers\PartiallyMatchedCrossover.cs" />
+    <Compile Include="Crossovers\PositionBasedCrossover.cs" />
+    <Compile Include="HeuristicLabEncodingsPermutationPlugin.cs" />
+    <Compile Include="Interfaces\IPermutationCreator.cs" />
+    <Compile Include="Interfaces\IPermutationCrossover.cs" />
+    <Compile Include="Interfaces\IPermutationManipulator.cs" />
+    <Compile Include="Interfaces\IPermutationMoveOperator.cs" />
+    <Compile Include="Interfaces\IPermutationOperator.cs" />
+    <Compile Include="Interfaces\ITwoOptPermutationMoveOperator.cs" />
+    <Compile Include="Manipulators\InsertionManipulator.cs" />
+    <Compile Include="Manipulators\InversionManipulator.cs" />
+    <Compile Include="Manipulators\ScrambleManipulator.cs" />
+    <Compile Include="Manipulators\Swap2Manipulator.cs" />
+    <Compile Include="Manipulators\Swap3Manipulator.cs" />
+    <Compile Include="Manipulators\TranslocationInversionManipulator.cs" />
+    <Compile Include="Manipulators\TranslocationManipulator.cs" />
+    <Compile Include="Moves\TwoOpt\ExhaustiveTwoOptMoveGenerator.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Moves\TwoIndexMove.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Moves\TwoOpt\StochasticTwoOptMoveGenerator.cs" />
+    <Compile Include="Moves\TwoOpt\TwoOptMove.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Moves\TwoOpt\TwoOptMoveGenerator.cs" />
+    <Compile Include="Moves\TwoOpt\TwoOptMoveMaker.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Moves\TwoOpt\TwoOptMoveTabuAttribute.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Moves\TwoOpt\TwoOptMoveTabuEvaluator.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Moves\TwoOpt\TwoOptMoveTabuMaker.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="PermutationManipulator.cs" />
+    <Compile Include="PermutationCrossover.cs" />
+    <Compile Include="Permutation.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="HeuristicLabEncodingsPermutationPlugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </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\3.2\HeuristicLab.Common-3.2.csproj">
+      <Project>{1FC004FC-59AF-4249-B1B6-FF25873A20E4}</Project>
+      <Name>HeuristicLab.Common-3.2</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.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\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabEncodingsPermutationPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabEncodingsPermutationPlugin.cs"</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/HeuristicLabEncodingsPermutationPlugin.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/HeuristicLabEncodingsPermutationPlugin.cs.frame	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/HeuristicLabEncodingsPermutationPlugin.cs.frame	(revision 3052)
@@ -0,0 +1,40 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// Plugin class for HeuristicLab.Encodings.Permutation plugin.
+  /// </summary>
+  [Plugin("HeuristicLab.Encodings.Permutation", "3.3.0.$WCREV$")]
+  [PluginFile("HeuristicLab.Encodings.Permutation-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.2")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  public class HeuristicLabEncodingsPermutationPlugin : PluginBase {
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationCreator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationCreator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationCreator.cs	(revision 3052)
@@ -0,0 +1,34 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// An interface which represents an operator for creating permutations.
+  /// </summary>
+  public interface IPermutationCreator : IPermutationOperator, ISolutionCreator {
+    IValueLookupParameter<IntValue> LengthParameter { get; }
+    ILookupParameter<Permutation> PermutationParameter { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationCrossover.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationCrossover.cs	(revision 3052)
@@ -0,0 +1,33 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// An interface which represents an operator for crossing permutations.
+  /// </summary>
+  public interface IPermutationCrossover : IPermutationOperator, ICrossover {
+    ILookupParameter<ItemArray<Permutation>> ParentsParameter { get; }
+    ILookupParameter<Permutation> ChildParameter { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationManipulator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationManipulator.cs	(revision 3052)
@@ -0,0 +1,32 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// An interface which represents an operator for manipulating solutions.
+  /// </summary>
+  public interface IPermutationManipulator : IPermutationOperator, IManipulator {
+    ILookupParameter<Permutation> PermutationParameter { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationMoveOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationMoveOperator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationMoveOperator.cs	(revision 3052)
@@ -0,0 +1,29 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Encodings.Permutation {
+  public interface IPermutationMoveOperator : IPermutationOperator, IMoveOperator {
+    ILookupParameter<Permutation> PermutationParameter { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationOperator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/IPermutationOperator.cs	(revision 3052)
@@ -0,0 +1,29 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// An interface which represents an operator dealing with permutations.
+  /// </summary>
+  public interface IPermutationOperator : IOperator { }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/ITwoOptPermutationMoveOperator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/ITwoOptPermutationMoveOperator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Interfaces/ITwoOptPermutationMoveOperator.cs	(revision 3052)
@@ -0,0 +1,29 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Encodings.Permutation {
+  public interface ITwoOptPermutationMoveOperator : IPermutationMoveOperator {
+    ILookupParameter<TwoOptMove> TwoOptMoveParameter { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/InsertionManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/InsertionManipulator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/InsertionManipulator.cs	(revision 3052)
@@ -0,0 +1,79 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// Manipulates a permutation array by moving randomly one element to another position in the array.
+  /// </summary> 
+  /// <remarks>
+  /// It is implemented as described in Fogel, D.B. (1988). An Evolutionary Approach to the Traveling Salesman Problem, Biological Cybernetics, 60, pp. 139-144.
+  /// </remarks>
+  [Item("InsertionManipulator", "An operator which moves randomly one element to another position in the permutation. It is implemented as described in Fogel, D.B. (1988). An Evolutionary Approach to the Traveling Salesman Problem, Biological Cybernetics, 60, pp. 139-144.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class InsertionManipulator : PermutationManipulator {
+    /// <summary>
+    /// Moves an randomly chosen element in the specified <paramref name="permutation"/> array 
+    /// to another randomly generated position.
+    /// </summary>
+    /// <param name="random">The random number generator.</param>
+    /// <param name="permutation">The permutation to manipulate.</param>
+    public static void Apply(IRandom random, Permutation permutation) {
+      Permutation original = (Permutation)permutation.Clone();
+      int cutIndex, insertIndex, number;
+
+      cutIndex = random.Next(original.Length);
+      insertIndex = random.Next(original.Length);
+      number = original[cutIndex];
+
+      int i = 0;  // index in new permutation
+      int j = 0;  // index in old permutation
+      while (i < original.Length) {
+        if (j == cutIndex) {
+          j++;
+        }
+        if (i == insertIndex) {
+          permutation[i] = number;
+          i++;
+        }
+        if ((i < original.Length) && (j < original.Length)) {
+          permutation[i] = original[j];
+          i++;
+          j++;
+        }
+      }
+    }
+
+    /// <summary>
+    /// Moves an randomly chosen element in the specified <paramref name="permutation"/> array 
+    /// to another randomly generated position.
+    /// </summary>
+    /// <remarks>Calls <see cref="Apply"/>.</remarks>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="permutation">The permutation to manipulate.</param>
+    protected override void Manipulate(IRandom random, Permutation permutation) {
+      Apply(random, permutation);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/InversionManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/InversionManipulator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/InversionManipulator.cs	(revision 3052)
@@ -0,0 +1,69 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// An operator which inverts a randomly chosen part of a permutation.
+  /// </summary>
+  /// <remarks>
+  /// It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg.<br />
+  /// </remarks>
+  [Item("InversionManipulator", "An operator which inverts a randomly chosen part of a permutation. It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class InversionManipulator : PermutationManipulator {
+    /// <summary>
+    /// Inverts a randomly chosen part of a permutation.
+    /// </summary>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="permutation">The permutation to manipulate.</param>
+    public static void Apply(IRandom random, Permutation permutation) {
+      int breakPoint1, breakPoint2;
+
+      breakPoint1 = random.Next(permutation.Length - 1);
+      do {
+        breakPoint2 = random.Next(permutation.Length - 1);
+      } while (breakPoint2 == breakPoint1);
+      if (breakPoint2 < breakPoint1) { int h = breakPoint1; breakPoint1 = breakPoint2; breakPoint2 = h; }
+      Apply(permutation, breakPoint1, breakPoint2);
+    }
+
+    public static void Apply(Permutation permutation, int breakPoint1, int breakPoint2) {
+      for (int i = 0; i <= (breakPoint2 - breakPoint1) / 2; i++) {  // invert permutation between breakpoints
+        int temp = permutation[breakPoint1 + i];
+        permutation[breakPoint1 + i] = permutation[breakPoint2 - i];
+        permutation[breakPoint2 - i] = temp;
+      }
+    }
+
+    /// <summary>
+    /// Inverts a randomly chosen part of a permutation.
+    /// </summary>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="permutation">The permutation to manipulate.</param>
+    protected override void Manipulate(IRandom random, Permutation permutation) {
+      Apply(random, permutation);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/ScrambleManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/ScrambleManipulator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/ScrambleManipulator.cs	(revision 3052)
@@ -0,0 +1,89 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// Manipulates a permutation array by randomly scrambling the elements in a randomly chosen interval.
+  /// </summary>
+  /// <remarks>
+  /// It is implemented as described in Syswerda, G. (1991). Schedule Optimization Using Genetic Algorithms. In Davis, L. (Ed.) Handbook of Genetic Algorithms, Van Nostrand Reinhold, New York, pp 332-349.
+  /// </remarks>
+  [Item("ScrambleManipulator", "An operator which manipulates a permutation array by randomly scrambling the elements in a randomly chosen interval. It is implemented as described in Syswerda, G. (1991). Schedule Optimization Using Genetic Algorithms. In Davis, L. (Ed.) Handbook of Genetic Algorithms, Van Nostrand Reinhold, New York, pp 332-349.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class ScrambleManipulator : PermutationManipulator {
+    /// <summary>
+    /// Mixes the elements of the given <paramref name="permutation"/> randomly 
+    /// in a randomly chosen interval.
+    /// </summary>
+    /// <param name="random">The random number generator.</param>
+    /// <param name="permutation">The permutation to manipulate.</param>
+    public static void Apply(IRandom random, Permutation permutation) {
+      Permutation original = (Permutation)permutation.Clone();
+
+      int breakPoint1, breakPoint2;
+      int[] scrambledIndices, remainingIndices, temp;
+      int selectedIndex, index;
+
+      breakPoint1 = random.Next(original.Length - 1);
+      breakPoint2 = random.Next(breakPoint1 + 1, original.Length);
+
+      scrambledIndices = new int[breakPoint2 - breakPoint1 + 1];
+      remainingIndices = new int[breakPoint2 - breakPoint1 + 1];
+      for (int i = 0; i < remainingIndices.Length; i++) {  // initialise indices
+        remainingIndices[i] = i;
+      }
+      for (int i = 0; i < scrambledIndices.Length; i++) {  // generate permutation of indices
+        selectedIndex = random.Next(remainingIndices.Length);
+        scrambledIndices[i] = remainingIndices[selectedIndex];
+
+        temp = remainingIndices;
+        remainingIndices = new int[temp.Length - 1];
+        index = 0;
+        for (int j = 0; j < remainingIndices.Length; j++) {
+          if (index == selectedIndex) {
+            index++;
+          }
+          remainingIndices[j] = temp[index];
+          index++;
+        }
+      }
+
+      for (int i = 0; i <= (breakPoint2 - breakPoint1); i++) {  // scramble permutation between breakpoints
+        permutation[breakPoint1 + i] = original[breakPoint1 + scrambledIndices[i]];
+      }
+    }
+
+    /// <summary>
+    /// Mixes the elements of the given <paramref name="permutation"/> randomly 
+    /// in a randomly chosen interval.
+    /// </summary>
+    /// <remarks>Calls <see cref="Apply"/>.</remarks>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="permutation">The permutation to manipulate.</param>
+    protected override void Manipulate(IRandom random, Permutation permutation) {
+      Apply(random, permutation);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/Swap2Manipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/Swap2Manipulator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/Swap2Manipulator.cs	(revision 3052)
@@ -0,0 +1,62 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// Manipulates a permutation array by swapping to randomly chosen elements.
+  /// </summary>
+  ///   /// <remarks>
+  /// It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg.
+  /// </remarks>
+  [Item("Swap2Manipulator", "An operator which manipulates a permutation array by swapping to randomly chosen elements. It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class Swap2Manipulator : PermutationManipulator {
+    /// <summary>
+    /// Swaps two randomly chosen elements in the given <paramref name="permutation"/> permutation.
+    /// </summary>
+    /// <param name="random">The random number generator.</param>
+    /// <param name="permutation">The permutation to manipulate.</param>
+    public static void Apply(IRandom random, Permutation permutation) {
+      int index1, index2, temp;
+
+      index1 = random.Next(permutation.Length);
+      index2 = random.Next(permutation.Length);
+
+      temp = permutation[index1];
+      permutation[index1] = permutation[index2];
+      permutation[index2] = temp;
+    }
+
+    /// <summary>
+    /// Swaps two randomly chosen elements in the given <paramref name="permutation"/> array.
+    /// </summary>
+    /// <remarks>Calls <see cref="Apply"/>.</remarks>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="permutation">The permutation to manipulate.</param>
+    protected override void Manipulate(IRandom random, Permutation permutation) {
+      Apply(random, permutation);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/Swap3Manipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/Swap3Manipulator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/Swap3Manipulator.cs	(revision 3052)
@@ -0,0 +1,78 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// Manipulates a permutation array by swaping three randomly chosen elements.
+  /// </summary>
+  /// <remarks>
+  /// It is implemented such that first 3 positions are randomly chosen in the interval [0;N) with N = length of the permutation with all positions being distinct from each other.
+  /// Then position 1 is put in place of position 3, position 2 is put in place of position 1 and position 3 is put in place of position 2.
+  /// </remarks>
+  [Item("Swap3Manipulator", "An operator which manipulates a permutation array by swaping three randomly chosen elements. It is implemented such that first 3 positions are randomly chosen in the interval [0;N) with N = length of the permutation with all positions being distinct from each other. Then position 1 is put in place of position 3, position 2 is put in place of position 1 and position 3 is put in place of position 2.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class Swap3Manipulator : PermutationManipulator {
+    /// <summary>
+    /// Swaps three randomly chosen elements of the given <paramref name="permutation"/> array.
+    /// </summary>
+    /// <exception cref="ArgumentException">Thrown when the <paramref name="permutation"/> contains less than 3 elements.</exception>
+    /// <remarks>
+    /// It is implemented such that first 3 positions are randomly chosen in the interval [0;N) with N = length of the permutation with all positions being distinct from each other.
+    /// Then position 1 is put in place of position 3, position 2 is put in place of position 1 and position 3 is put in place of position 2.
+    /// </remarks>
+    /// <param name="random">The random number generator.</param>
+    /// <param name="permutation">The permutation to manipulate.</param>
+    public static void Apply(IRandom random, Permutation permutation) {
+      if (permutation.Length < 3) throw new ArgumentException("Swap3Manipulator: The permutation must be at least of size 3.", "permutation");
+      int index1, index2, index3, temp;
+
+      do {
+        index1 = random.Next(permutation.Length);
+        index2 = random.Next(permutation.Length);
+        index3 = random.Next(permutation.Length);
+      } while (index1 == index2 || index2 == index3 || index1 == index3);
+
+      // swap positions 1 and 2
+      temp = permutation[index1];
+      permutation[index1] = permutation[index2];
+      permutation[index2] = temp;
+      // swap positions 2 and 3
+      temp = permutation[index2];
+      permutation[index2] = permutation[index3];
+      permutation[index3] = temp;
+    }
+
+    /// <summary>
+    /// Swaps three randomly chosen elements of the given <paramref name="permutation"/> array.
+    /// </summary>
+    /// <remarks>Calls <see cref="Apply"/>.</remarks>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="permutation">The permutation to manipulate.</param>
+    protected override void Manipulate(IRandom random, Permutation permutation) {
+      Apply(random, permutation);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/TranslocationInversionManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/TranslocationInversionManipulator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/TranslocationInversionManipulator.cs	(revision 3052)
@@ -0,0 +1,86 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// Manipulates a permutation array by moving and reversing a randomly chosen interval of elements to another 
+  /// (randomly chosen) position in the array.
+  /// </summary>
+  /// <remarks>
+  /// It is implemented as described in Fogel, D.B. 1993. Applying Evolutionary Programming to Selected TSP Problems, Cybernetics and Systems, 22, pp 27-36.
+  /// </remarks>
+  [Item("TranslocationInversionManipulator", "An operator which inverts a randomly chosen part of a permutation and inserts it at a random position. It is implemented as described in Fogel, D.B. 1993. Applying Evolutionary Programming to Selected TSP Problems, Cybernetics and Systems, 22, pp. 27-36.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class TranslocationInversionManipulator : PermutationManipulator {
+    /// <summary>
+    /// Moves a randomly chosen interval of elements to another (randomly chosen) position in the given
+    /// <paramref name="permutation"/> array and reverses it.
+    /// </summary>
+    /// <param name="random">The random number generator.</param>
+    /// <param name="permutation">The permutation array to manipulate.</param>
+    public static void Apply(IRandom random, Permutation permutation) {
+      Permutation original = (Permutation)permutation.Clone();
+      int breakPoint1, breakPoint2, insertPoint, insertPointLimit;
+
+      breakPoint1 = random.Next(original.Length - 1);
+      breakPoint2 = random.Next(breakPoint1 + 1, original.Length);
+      insertPointLimit = original.Length - breakPoint2 + breakPoint1 - 1;  // get insertion point in remaining part
+      if (insertPointLimit > 0)
+        insertPoint = random.Next(insertPointLimit);
+      else
+        insertPoint = 0;
+
+      int i = 0;  // index in new permutation
+      int j = 0;  // index in old permutation
+      while (i < original.Length) {
+        if (i == insertPoint) {  // copy translocated area
+          for (int k = breakPoint2; k >= breakPoint1; k--) {
+            permutation[i] = original[k];
+            i++;
+          }
+        }
+        if (j == breakPoint1) {  // skip area between breakpoints
+          j = breakPoint2 + 1;
+        }
+        if ((i < original.Length) && (j < original.Length)) {
+          permutation[i] = original[j];
+          i++;
+          j++;
+        }
+      }
+    }
+
+    /// <summary>
+    /// Moves a randomly chosen interval of elements to another (randomly chosen) position in the given
+    /// <paramref name="permutation"/> array and reverses it.
+    /// </summary>
+    /// <remarks>Calls <see cref="Apply"/>.</remarks>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="permutation">The permutation to manipulate.</param>
+    protected override void Manipulate(IRandom random, Permutation permutation) {
+      Apply(random, permutation);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/TranslocationManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/TranslocationManipulator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/TranslocationManipulator.cs	(revision 3052)
@@ -0,0 +1,86 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// Manipulates a permutation array by moving a randomly chosen interval of elements to another 
+  /// (randomly chosen) position in the array.
+  /// </summary>
+  /// <remarks>
+  /// It is implemented as described in Michalewicz, Z. 1992. Genetic Algorithms + Data Structures = Evolution Programs, Springer Verlag, Berlin Heidelberg.
+  /// </remarks>
+  [Item("TranslocationManipulator", "An operator which Manipulates a permutation array by moving a randomly chosen interval of elements to another (randomly chosen) position in the array. It is implemented as described in Michalewicz, Z. 1992. Genetic Algorithms + Data Structures = Evolution Programs, Springer Verlag, Berlin Heidelberg.")]
+  [StorableClass]
+  [Creatable("Test")]
+  public class TranslocationManipulator : PermutationManipulator {
+    /// <summary>
+    /// Moves a randomly chosen interval of elements to another (randomly chosen) position in the given
+    /// <paramref name="permutation"/> array.
+    /// </summary>
+    /// <param name="random">The random number generator.</param>
+    /// <param name="permutation">The permutation array to manipulate.</param>
+    public static void Apply(IRandom random, Permutation permutation) {
+      Permutation original = (Permutation)permutation.Clone();
+      int breakPoint1, breakPoint2, insertPoint, insertPointLimit;
+
+      breakPoint1 = random.Next(permutation.Length - 1);
+      breakPoint2 = random.Next(breakPoint1 + 1, permutation.Length);
+      insertPointLimit = permutation.Length - breakPoint2 + breakPoint1 - 1;  // get insertion point in remaining part
+      if (insertPointLimit > 0)
+        insertPoint = random.Next(insertPointLimit);
+      else
+        insertPoint = 0;
+
+      int i = 0;  // index in new permutation
+      int j = 0;  // index in old permutation
+      while (i < original.Length) {
+        if (i == insertPoint) {  // copy translocated area
+          for (int k = breakPoint1; k <= breakPoint2; k++) {
+            permutation[i] = original[k];
+            i++;
+          }
+        }
+        if (j == breakPoint1) {  // skip area between breakpoints
+          j = breakPoint2 + 1;
+        }
+        if ((i < original.Length) && (j < original.Length)) {
+          permutation[i] = original[j];
+          i++;
+          j++;
+        }
+      }
+    }
+
+    /// <summary>
+    /// Moves a randomly chosen interval of elements to another (randomly chosen) position in the given
+    /// <paramref name="permutation"/> array.
+    /// </summary>
+    /// <remarks>Calls <see cref="Apply"/>.</remarks>
+    /// <param name="random">A random number generator.</param>
+    /// <param name="permutation">The permutation to manipulate.</param>
+    protected override void Manipulate(IRandom random, Permutation permutation) {
+      Apply(random, permutation);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoIndexMove.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoIndexMove.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoIndexMove.cs	(revision 3052)
@@ -0,0 +1,59 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  [Item("TwoIndexMove", "A move on a permutation that is specified by 2 indices")]
+  [StorableClass]
+  public class TwoIndexMove : Item {
+    [Storable]
+    public int Index1 { get; protected set; }
+    [Storable]
+    public int Index2 { get; protected set; }
+    [Storable]
+    public Permutation Permutation { get; protected set; }
+
+    public TwoIndexMove()
+      : base() {
+      Index1 = -1;
+      Index2 = -1;
+      Permutation = null;
+    }
+
+    public TwoIndexMove(int index1, int index2, Permutation permutation)
+      : base() {
+      Index1 = index1;
+      Index2 = index2;
+      Permutation = permutation;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      TwoIndexMove clone = (TwoIndexMove)base.Clone(cloner);
+      clone.Index1 = Index1;
+      clone.Index2 = Index2;
+      if (Permutation != null)
+        clone.Permutation = (Permutation)Permutation.Clone(cloner);
+      return clone;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/ExhaustiveTwoOptMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/ExhaustiveTwoOptMoveGenerator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/ExhaustiveTwoOptMoveGenerator.cs	(revision 3052)
@@ -0,0 +1,49 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  [Item("ExhaustiveTwoOptMoveGenerator", "Generates all possible 2-opt moves from a given permutation.")]
+  [StorableClass]
+  public class ExhaustiveTwoOptMoveGenerator : TwoOptMoveGenerator {
+    public static TwoOptMove[] Apply(Permutation permutation) {
+      int length = permutation.Length;
+      int totalMoves = (length) * (length - 1) / 2 - 3;
+      TwoOptMove[] moves = new TwoOptMove[totalMoves];
+      int count = 0;
+      for (int i = 0; i < length - 1; i++)
+        for (int j = i + 1; j < length; j++) {
+          // doesn't make sense to inverse the whole permutation or the whole but one
+          if (i == 0 && j >= length - 2) continue;
+          else if (i == 1 && j >= length - 1) continue;
+          moves[count++] = new TwoOptMove(i, j);
+        }
+      return moves;
+    }
+
+    protected override TwoOptMove[] GenerateMoves(Permutation permutation) {
+      return Apply(permutation);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticTwoOptMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticTwoOptMoveGenerator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticTwoOptMoveGenerator.cs	(revision 3052)
@@ -0,0 +1,64 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  [Item("StochasticTwoOptMoveGenerator", "Randomly samples n from all possible 2-opt moves from a given permutation.")]
+  [StorableClass]
+  public class StochasticTwoOptMoveGenerator : TwoOptMoveGenerator, IStochasticOperator {
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    private ValueLookupParameter<IntValue> SampleSizeParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["SampleSize"]; }
+    }
+
+    public StochasticTwoOptMoveGenerator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
+    }
+
+    public static TwoOptMove[] Apply(Permutation permutation, IRandom random, int sampleSize) {
+      int length = permutation.Length;
+      int totalMoves = (length) * (length - 1) / 2 - 3;
+      if (sampleSize >= totalMoves) throw new InvalidOperationException("StochasticTwoOptMoveGenerator: Sample size (" + sampleSize + ") is larger than the set of all possible moves (" + totalMoves + "), use the ExhaustiveTwoOptMoveGenerator instead.");
+      TwoOptMove[] moves = new TwoOptMove[sampleSize];
+      for (int i = 0; i < sampleSize; i++) {
+        int index1 = random.Next(length - 1);
+        int index2 = random.Next(index1 + 1, length);
+        moves[i] = new TwoOptMove(index1, index2);
+      }
+      return moves;
+    }
+
+    protected override TwoOptMove[] GenerateMoves(Permutation permutation) {
+      IRandom random = RandomParameter.ActualValue;
+      return Apply(permutation, random, SampleSizeParameter.ActualValue.Value);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMove.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMove.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMove.cs	(revision 3052)
@@ -0,0 +1,41 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  [Item("TwoOptMove", "Item that describes a 2-Opt move.")]
+  [StorableClass]
+  public class TwoOptMove : TwoIndexMove {
+    public TwoOptMove()
+      : base() {
+    }
+
+    public TwoOptMove(int index1, int index2)
+      : base(index1, index2, null) {
+    }
+
+    public TwoOptMove(int index1, int index2, Permutation permutation)
+      : base(index1, index2, permutation) {
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveGenerator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveGenerator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveGenerator.cs	(revision 3052)
@@ -0,0 +1,64 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  [Item("TwoOptMoveGenerator", "Base class for all 2-opt move generators.")]
+  [StorableClass]
+  public abstract class TwoOptMoveGenerator : SingleSuccessorOperator, ITwoOptPermutationMoveOperator, IMoveGenerator {
+    public ILookupParameter<Permutation> PermutationParameter {
+      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
+    }
+    public ILookupParameter<TwoOptMove> TwoOptMoveParameter {
+      get { return (LookupParameter<TwoOptMove>)Parameters["Move"]; }
+    }
+    protected ScopeParameter CurrentScopeParameter {
+      get { return (ScopeParameter)Parameters["CurrentScope"]; }
+    }
+
+    public TwoOptMoveGenerator()
+      : base() {
+      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation for which moves should be generated."));
+      Parameters.Add(new LookupParameter<TwoOptMove>("Move", "The moves that should be generated in subscopes."));
+      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
+    }
+
+    public override IOperation Apply() {
+      Permutation p = PermutationParameter.ActualValue;
+      TwoOptMove[] moves = GenerateMoves(p);
+      Scope[] moveScopes = new Scope[moves.Length];
+      for (int i = 0; i < moveScopes.Length; i++) {
+        moveScopes[i] = new Scope(i.ToString());
+        moveScopes[i].Variables.Add(new Variable(TwoOptMoveParameter.ActualName, moves[i]));
+      }
+      CurrentScopeParameter.ActualValue.SubScopes.AddRange(moveScopes);
+      return base.Apply();
+    }
+
+    protected abstract TwoOptMove[] GenerateMoves(Permutation permutation);
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveMaker.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveMaker.cs	(revision 3052)
@@ -0,0 +1,67 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  [Item("TwoOptMoveMaker", "Peforms a 2-opt move on a given permutation and updates the quality.")]
+  [StorableClass]
+  public class TwoOptMoveMaker : SingleSuccessorOperator, ITwoOptPermutationMoveOperator, IMoveMaker {
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveQualityParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
+    }
+    public ILookupParameter<TwoOptMove> TwoOptMoveParameter {
+      get { return (LookupParameter<TwoOptMove>)Parameters["Move"]; }
+    }
+    public ILookupParameter<Permutation> PermutationParameter {
+      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
+    }
+
+    public TwoOptMoveMaker()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution."));
+      Parameters.Add(new LookupParameter<TwoOptMove>("Move", "The move to evaluate."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move."));
+      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
+    }
+
+    public override IOperation Apply() {
+      TwoOptMove move = TwoOptMoveParameter.ActualValue;
+      Permutation permutation = PermutationParameter.ActualValue;
+      DoubleValue moveQuality = MoveQualityParameter.ActualValue;
+      DoubleValue quality = QualityParameter.ActualValue;
+
+      InversionManipulator.Apply(permutation, move.Index1, move.Index2);
+      quality.Value = moveQuality.Value;
+
+      return base.Apply();
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveTabuAttribute.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveTabuAttribute.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveTabuAttribute.cs	(revision 3052)
@@ -0,0 +1,51 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  [Item("TwoOptMoveTabuAttribute", "Specifies the tabu attributes for a 2-opt move.")]
+  [StorableClass]
+  public class TwoOptMoveTabuAttribute : Item {
+    [Storable]
+    public int Edge1Source { get; private set; }
+    [Storable]
+    public int Edge1Target { get; private set; }
+    [Storable]
+    public int Edge2Source { get; private set; }
+    [Storable]
+    public int Edge2Target { get; private set; }
+
+    [StorableConstructor]
+    private TwoOptMoveTabuAttribute()
+      : base() {
+    }
+
+    public TwoOptMoveTabuAttribute(int edge1Source, int edge1Target, int edge2Source, int edge2Target)
+      : base() {
+      Edge1Source = edge1Source;
+      Edge1Target = edge1Target;
+      Edge2Source = edge2Source;
+      Edge2Target = edge2Target;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveTabuEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveTabuEvaluator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveTabuEvaluator.cs	(revision 3052)
@@ -0,0 +1,89 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  [Item("TwoOptMoveTabuEvaluator", "Evaluates whether a given 2-opt move is tabu.")]
+  [StorableClass]
+  public class TwoOptMoveTabuEvaluator : SingleSuccessorOperator, ITwoOptPermutationMoveOperator, ITabuMoveEvaluator {
+    public ILookupParameter<TwoOptMove> TwoOptMoveParameter {
+      get { return (LookupParameter<TwoOptMove>)Parameters["Move"]; }
+    }
+    public ILookupParameter<Permutation> PermutationParameter {
+      get { return (LookupParameter<Permutation>)Parameters["Permutation"]; }
+    }
+    public LookupParameter<ItemList<IItem>> TabuListParameter {
+      get { return (LookupParameter<ItemList<IItem>>)Parameters["TabuList"]; }
+    }
+    public LookupParameter<BoolValue> MoveTabuParameter {
+      get { return (LookupParameter<BoolValue>)Parameters["MoveTabu"]; }
+    }
+    private ScopeParameter CurrentScopeParameter {
+      get { return (ScopeParameter)Parameters["CurrentScope"]; }
+    }
+
+    public TwoOptMoveTabuEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<TwoOptMove>("Move", "The move to evaluate."));
+      Parameters.Add(new LookupParameter<BoolValue>("MoveTabu", "The variable to store if a move was tabu."));
+      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
+      Parameters.Add(new LookupParameter<ItemList<IItem>>("TabuList", "The tabu list."));
+      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope."));
+    }
+
+    public override IOperation Apply() {
+      ItemList<IItem> tabuList = TabuListParameter.ActualValue;
+      TwoOptMove move = TwoOptMoveParameter.ActualValue;
+      Permutation permutation = PermutationParameter.ActualValue;
+      int length = permutation.Length;
+      int E1S = permutation.GetCircular(move.Index1 - 1);
+      int E1T = permutation[move.Index1];
+      int E2S = permutation[move.Index2];
+      int E2T = permutation.GetCircular(move.Index2 + 1);
+      bool isTabu = false;
+      foreach (IItem tabuMove in tabuList) {
+        TwoOptMoveTabuAttribute attribute = (tabuMove as TwoOptMoveTabuAttribute);
+        if (attribute != null) {
+          // if previously deleted Edge1Source-Target is readded
+          if (attribute.Edge1Source == E1S && attribute.Edge1Target == E2S || attribute.Edge1Source == E2S && attribute.Edge1Target == E1S
+            // if previously deleted Edge2Source-Target is readded
+            || attribute.Edge2Source == E1T && attribute.Edge2Target == E2T || attribute.Edge2Source == E2T && attribute.Edge2Target == E1T
+            // if previously added Edge1Source-Edge2Source is deleted
+            || attribute.Edge1Source == E1S && attribute.Edge2Source == E1T || attribute.Edge1Source == E1T && attribute.Edge2Source == E1S
+            // if previously added Edge1Target-Edge2Target is deleted
+            || attribute.Edge1Target == E2S && attribute.Edge2Target == E2T || attribute.Edge1Target == E2T && attribute.Edge2Target == E2S) {
+            isTabu = true;
+            break;
+          }
+        }
+      }
+      MoveTabuParameter.ActualValue = new BoolValue(isTabu);
+      return base.Apply();
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveTabuMaker.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveTabuMaker.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/TwoOptMoveTabuMaker.cs	(revision 3052)
@@ -0,0 +1,74 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation.Moves {
+  [Item("TwoOptMoveTabuMaker", "Declares a given 2-opt move as tabu, by adding its attributes to the tabu list. It also removes the oldest entry in the tabu list when its size is greater than tenure.")]
+  [StorableClass]
+  public class TwoOptMoveTabuMaker : SingleSuccessorOperator, ITwoOptPermutationMoveOperator, ITabuMoveMaker {
+    public ILookupParameter<Permutation> PermutationParameter {
+      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
+    }
+    public ILookupParameter<TwoOptMove> TwoOptMoveParameter {
+      get { return (LookupParameter<TwoOptMove>)Parameters["Move"]; }
+    }
+    public LookupParameter<ItemList<IItem>> TabuListParameter {
+      get { return (LookupParameter<ItemList<IItem>>)Parameters["TabuList"]; }
+    }
+    public ValueLookupParameter<IntValue> TabuTenureParameter {
+      get { return (ValueLookupParameter<IntValue>)Parameters["TabuTenure"]; }
+    }
+
+    public TwoOptMoveTabuMaker()
+      : base() {
+      Parameters.Add(new LookupParameter<TwoOptMove>("Move", "The move that was made."));
+      Parameters.Add(new LookupParameter<ItemList<IItem>>("TabuList", "The tabu list where move attributes are stored."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("TabuTenure", "The tenure of the tabu list."));
+      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
+    }
+
+    public override IOperation Apply() {
+      ItemList<IItem> tabuList = TabuListParameter.ActualValue;
+      TwoOptMove move = TwoOptMoveParameter.ActualValue;
+      IntValue tabuTenure = TabuTenureParameter.ActualValue;
+      Permutation permutation = PermutationParameter.ActualValue;
+      
+      if (tabuList.Count >= tabuTenure.Value) {
+        for (int i = 0; i < tabuTenure.Value - 1; i++)
+          tabuList[i] = tabuList[i + 1];
+        tabuList.RemoveAt(tabuList.Count - 1);
+      }
+
+      TwoOptMoveTabuAttribute attribute = new TwoOptMoveTabuAttribute(
+        permutation.GetCircular(move.Index1 - 1), permutation[move.Index1],
+        permutation[move.Index2], permutation.GetCircular(move.Index2 + 1));
+      tabuList.Add(attribute);
+      return base.Apply();
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Permutation.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Permutation.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Permutation.cs	(revision 3052)
@@ -0,0 +1,126 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  [StorableClass]
+  [Item("Permutation", "Represents a permutation of integer values.")]
+  [Creatable("Test")]
+  public sealed class Permutation : ValueTypeArray<int>, IStringConvertibleArray {
+    public Permutation() : base() { }
+    public Permutation(int length)
+      : base(length) {
+      for (int i = 0; i < length; i++)
+        this[i] = i;
+    }
+    public Permutation(int length, IRandom random)
+      : this(length) {
+      Randomize(random);
+    }
+    public Permutation(int[] elements)
+      : base(elements) {
+    }
+    private Permutation(Permutation elements) : base(elements) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      Permutation clone = new Permutation(this);
+      cloner.RegisterClonedObject(this, clone);
+      return clone;
+    }
+
+    public bool Validate() {
+      bool[] values = new bool[Length];
+      int value;
+
+      for (int i = 0; i < values.Length; i++)
+        values[i] = false;
+      for (int i = 0; i < Length; i++) {
+        value = this[i];
+        if ((value < 0) || (value >= values.Length)) return false;
+        if (values[value]) return false;
+        values[value] = true;
+      }
+      return true;
+    }
+
+    public void Randomize(IRandom random, int startIndex, int length) {  // Knuth shuffle
+      int index1, index2;
+      int val;
+      for (int i = length - 1; i > 0; i--) {
+        index1 = startIndex + i;
+        index2 = startIndex + random.Next(i + 1);
+        if (index1 != index2) {
+          val = this[index1];
+          this[index1] = this[index2];
+          this[index2] = val;
+        }
+      }
+    }
+    public void Randomize(IRandom random) {
+      Randomize(random, 0, Length);
+    }
+
+    public int GetCircular(int position) {
+      if (position >= Length) position = position % Length;
+      while (position < 0) position += Length;
+      return this[position];
+    }
+
+    #region IStringConvertibleArrayData Members
+    int IStringConvertibleArray.Length {
+      get { return Length; }
+      set { Length = value; }
+    }
+
+    bool IStringConvertibleArray.Validate(string value, out string errorMessage) {
+      int val;
+      bool valid = int.TryParse(value, out val);
+      errorMessage = string.Empty;
+      if (!valid) {
+        StringBuilder sb = new StringBuilder();
+        sb.Append("Invalid Value (Valid Value Format: \"");
+        sb.Append(FormatPatterns.GetIntFormatPattern());
+        sb.Append("\")");
+        errorMessage = sb.ToString();
+      }
+      return valid;
+    }
+    string IStringConvertibleArray.GetValue(int index) {
+      return this[index].ToString();
+    }
+    bool IStringConvertibleArray.SetValue(string value, int index) {
+      int val;
+      if (int.TryParse(value, out val)) {
+        this[index] = val;
+        return true;
+      } else {
+        return false;
+      }
+    }
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationCrossover.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationCrossover.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationCrossover.cs	(revision 3052)
@@ -0,0 +1,65 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// A base class for permutation crossover operators.
+  /// </summary>
+  [Item("PermutationCrossover", "A base class for permutation crossover operators.")]
+  [StorableClass]
+  public abstract class PermutationCrossover : SingleSuccessorOperator, IPermutationCrossover, IStochasticOperator {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public ILookupParameter<ItemArray<Permutation>> ParentsParameter {
+      get { return (SubScopesLookupParameter<Permutation>)Parameters["Parents"]; }
+    }
+    public ILookupParameter<Permutation> ChildParameter {
+      get { return (ILookupParameter<Permutation>)Parameters["Child"]; }
+    }
+
+    protected PermutationCrossover()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic crossover operators."));
+      Parameters.Add(new SubScopesLookupParameter<Permutation>("Parents", "The parent permutations which should be crossed."));
+      ParentsParameter.ActualName = "Permutation";
+      Parameters.Add(new LookupParameter<Permutation>("Child", "The child permutation resulting from the crossover."));
+      ChildParameter.ActualName = "Permutation";
+    }
+
+    public sealed override IOperation Apply() {
+      ChildParameter.ActualValue = Cross(RandomParameter.ActualValue, ParentsParameter.ActualValue);
+      return base.Apply();
+    }
+
+    protected abstract Permutation Cross(IRandom random, ItemArray<Permutation> parents);
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationManipulator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationManipulator.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationManipulator.cs	(revision 3052)
@@ -0,0 +1,59 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.Permutation {
+  /// <summary>
+  /// A base class for permutation manipulation operators.
+  /// </summary>
+  [Item("PermutationManipulator", "A base class for permutation manipulation operators.")]
+  [StorableClass]
+  public abstract class PermutationManipulator : SingleSuccessorOperator, IPermutationManipulator, IStochasticOperator {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public ILookupParameter<Permutation> PermutationParameter {
+      get { return (ILookupParameter<Permutation>)Parameters["Permutation"]; }
+    }
+
+    protected PermutationManipulator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
+      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The permutation which should be manipulated."));
+    }
+
+    public sealed override IOperation Apply() {
+      Manipulate(RandomParameter.ActualValue, PermutationParameter.ActualValue);
+      return base.Apply();
+    }
+
+    protected abstract void Manipulate(IRandom random, Permutation permutation);
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Properties/AssemblyInfo.frame
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Properties/AssemblyInfo.frame	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Properties/AssemblyInfo.frame	(revision 3052)
@@ -0,0 +1,56 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Encodings.Permutation")]
+[assembly: AssemblyDescription("HeuristicLab permutation encoding and related operators")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2010 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("8819e533-c557-42e0-8cee-09dda7686cd2")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.0.$WCREV$")]
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/AuthoringTests.txt
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/AuthoringTests.txt	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/AuthoringTests.txt	(revision 3052)
@@ -0,0 +1,136 @@
+﻿==========================================================================
+    Visual Studio Team System: Overview of Authoring and Running Tests    
+==========================================================================
+
+This overview describes the features for authoring and running tests in 
+Visual Studio Team System and Visual Studio Team Edition for Software Testers.
+
+Opening Tests
+-------------
+To open a test, open a test project or a test metadata file (a file with
+extension .vsmdi) that contains the definition of the test. You can find
+test projects and metadata files in Solution Explorer.
+
+Viewing Tests
+-------------
+To see which tests are available to you, open the Test View window. Or,
+if you have installed Team Edition for Software Testers, you can also open
+the Test List Editor window to view tests.
+
+To open the Test View window, click the Test menu, point to Windows, and
+then click Test View. To open the Test List Editor window (if you have
+installed Team Edition for Software Testers), click Test, point to Windows,
+and then click Test List Editor.
+
+Running Tests
+-------------
+You can run tests from the Test View window and the Test List Editor window.
+See Viewing Tests to learn how to open these windows. To run one or more
+tests displayed in the Test View window, first select the tests in that
+window; to select multiple tests, hold either the Shift or CTRL key while
+clicking tests. Then click the Run Tests button in the Test View window
+toolbar.
+
+If you have installed Visual Studio Team Edition for Software Testers, you can
+also use the Test List Editor window to run tests. To run tests in Test List Editor,
+select the check box next to each test that you want to run. Then click the
+Run Tests button in the Test List Editor window toolbar.
+
+Viewing Test Results
+--------------------
+When you run a test or a series of tests, the results of the test run will be
+shown in the Test Results window. Each individual test in the run is shown on
+a separate line so that you can see its status. The window contains an
+embedded status bar in the top half of the window that provides you with
+summary details of the complete test run.
+
+To see more detailed results for a particular test result, double-click it in
+the Test Results window. This opens a window that provides more information
+about the particular test result, such as any specific error messages returned
+by the test.
+
+Changing the way that tests are run
+-----------------------------------
+Each time you run one or more tests, a collection of settings is used to
+determine how those tests are run. These settings are contained in a “test
+run configuration” file.
+
+Here is a partial list of the changes you can make with a test run 
+configuration file:
+
+ - Change the naming scheme for each test run.
+ - Change the test controller that the tests are run on so that you can run
+   tests remotely.
+ - Gather code coverage data for the code being tested so that you can see
+   which lines of code are covered by your tests.
+ - Enable and disable test deployment. 
+ - Specify additional files to deploy before tests are run.
+ - Select a different host, ASP.NET, for running ASP.NET unit tests.
+ - Select a different host, the smart device test host, for running smart device unit tests.
+ - Set various properties for the test agents that run your tests.
+ - Run custom scripts at the start and end of each test run so that you can
+   set up the test environment exactly as required each time tests are run.
+ - Set time limits for tests and test runs.
+ - Set the browser mix and the number of times to repeat Web tests in the
+   test run.
+
+By default, a test run configuration file is created whenever you create a
+new test project. You make changes to this file by double-clicking it in 
+Solution Explorer and then changing its settings. (Test run configuration
+files have the extension .testrunconfig.)
+
+A solution can contain multiple test run configuration files. Only one of
+those files, known as the “Active” test run configuration file, is used to
+determine the settings that are currently used for test runs. You select
+the active test run configuration by clicking Select Active Test Run 
+Configuration on the Test menu.
+
+-------------------------------------------------------------------------------
+
+Test Types
+----------
+Using Visual Studio Team Edition for Software Testers, you can create a number
+of different test types:
+
+Unit test: Use a unit test to create a programmatic test in C++, Visual C# or
+Visual Basic that exercises source code. A unit test calls the methods of a
+class, passing suitable parameters, and verifies that the returned value is
+what you expect.
+There are three specialized variants of unit tests:
+ - Data-driven unit tests are created when you configure a unit test to be
+   called repeatedly for each row of a data source. The data from each row
+   is used by the unit test as input data.
+ - ASP.NET unit tests are unit tests that exercise code in an ASP.NET Web
+   application.
+ - Smart device unit tests are unit tests that are deployed to a smart device
+   or emulator and then executed by the smart device test host.  
+
+Web Test: Web tests consist of an ordered series of HTTP requests that you
+record in a browser session using Microsoft Internet Explorer. You can have
+the test report specific details about the pages or sites it requests, such
+as whether a particular page contains a specified string.
+
+Load Test: You use a load test to encapsulate non-manual tests, such as
+unit, Web, and generic tests, and then run them simultaneously by using
+virtual users. Running these tests under load generates test results,
+including performance and other counters, in tables and in graphs.
+
+Generic test: A generic test is an existing program wrapped to function as a
+test in Visual Studio. The following are examples of tests or programs that
+you can turn into generic tests:
+ - An existing test that uses process exit codes to communicate whether the
+   test passed or failed. 0 indicates passing and any other value indicates
+   a failure.
+ - A general program to obtain specific functionality during a test scenario.
+ - A test or program that uses a special XML file (called a “summary results
+   file”), to communicate detailed results.
+
+Manual test: The manual test type is used when the test tasks are to be
+completed by a test engineer as opposed to an automated script.
+
+Ordered test: Use an ordered test to execute a set of tests in an order you
+specify.
+
+-------------------------------------------------------------------------------
+
+
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Auxiliary.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Auxiliary.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Auxiliary.cs	(revision 3052)
@@ -0,0 +1,39 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+  public static class Auxiliary {
+    public static bool PermutationIsEqualByPosition(Permutation.Permutation p1, Permutation.Permutation p2) {
+      bool equal = (p1.Length == p2.Length);
+      if (equal) {
+        for (int i = 0; i < p1.Length; i++) {
+          if (p1[i] != p2[i]) {
+            equal = false;
+            break;
+          }
+        }
+      }
+      return equal;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CosaCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CosaCrossoverTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CosaCrossoverTest.cs	(revision 3052)
@@ -0,0 +1,157 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+    /// <summary>
+    ///This is a test class for CosaCrossoverTest and is intended
+    ///to contain all CosaCrossoverTest Unit Tests
+    ///</summary>
+  [TestClass()]
+  public class CosaCrossoverTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Cross
+    ///</summary>
+    [TestMethod()]
+    [DeploymentItem("HeuristicLab.Encodings.Permutation-3.3.dll")]
+    public void CosaCrossoverCrossTest() {
+      TestRandom random = new TestRandom();
+      CosaCrossover_Accessor target = 
+        new CosaCrossover_Accessor(new PrivateObject(typeof(CosaCrossover)));
+      // perform a test with more than two parents
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        target.Cross(random, new ItemArray<Permutation.Permutation>(new Permutation.Permutation[] { 
+          new Permutation.Permutation(4), new Permutation.Permutation(4), new Permutation.Permutation(4)}));
+      } catch (System.InvalidOperationException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void CosaCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Wendt, O. 1994. COSA: COoperative Simulated Annealing - Integration von Genetischen Algorithmen und Simulated Annealing am Beispiel der Tourenplanung. Dissertation Thesis. IWI Frankfurt.
+      random.Reset();
+      random.IntNumbers = new int[] { 1 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 5, 2, 4, 3 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 3, 0, 2, 1, 4, 5 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 0, 1, 4, 2, 5, 3 });
+      Assert.IsTrue(expected.Validate());
+      actual = CosaCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 4 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 1, 3, 5, 7, 6, 4, 2, 0 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 7, 6, 5, 3, 4, 2, 1, 0 });
+      Assert.IsTrue(expected.Validate());
+      actual = CosaCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 5 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 4, 3, 5, 1, 0, 9, 7, 2, 8, 6 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 7, 6, 2, 3, 4, 5, 1, 0, 9, 8 });
+      Assert.IsTrue(expected.Validate());
+      actual = CosaCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        CosaCrossover.Apply(random, new Permutation.Permutation(8), new Permutation.Permutation(6));
+      } catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CyclicCrossover2Test.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CyclicCrossover2Test.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CyclicCrossover2Test.cs	(revision 3052)
@@ -0,0 +1,111 @@
+﻿using HeuristicLab.Core;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+    /// <summary>
+    ///This is a test class for CyclicCrossover2Test and is intended
+    ///to contain all CyclicCrossover2Test Unit Tests
+    ///</summary>
+  [TestClass()]
+  public class CyclicCrossover2Test {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Cross
+    ///</summary>
+    [TestMethod()]
+    [DeploymentItem("HeuristicLab.Encodings.Permutation-3.3.dll")]
+    public void CyclicCrossover2CrossTest() {
+      TestRandom random = new TestRandom();
+      CyclicCrossover2_Accessor target = new CyclicCrossover2_Accessor(new PrivateObject(typeof(CyclicCrossover2)));
+      // perform a test with more than two parents
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        target.Cross(random, new ItemArray<Permutation.Permutation>(new Permutation.Permutation[] { 
+          new Permutation.Permutation(4), new Permutation.Permutation(4), new Permutation.Permutation(4)}));
+      } catch (System.InvalidOperationException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void CyclicCrossover2ApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications. CRC Press. pp. 134.
+      random.Reset();
+      random.IntNumbers = new int[] { 0 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 2, 5, 6, 0, 7, 1, 3, 8, 4, 9 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 0, 5, 2, 3, 7, 1, 6, 8, 4, 9 });
+      Assert.IsTrue(expected.Validate());
+      actual = CyclicCrossover2.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        CyclicCrossover.Apply(random, new Permutation.Permutation(8), new Permutation.Permutation(6));
+      } catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CyclicCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CyclicCrossoverTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/CyclicCrossoverTest.cs	(revision 3052)
@@ -0,0 +1,135 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+  /// <summary>
+  ///This is a test class for CyclicCrossover and is intended
+  ///to contain all CyclicCrossover Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class CyclicCrossoverTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Cross
+    ///</summary>
+    [TestMethod()]
+    [DeploymentItem("HeuristicLab.Encodings.Permutation-3.3.dll")]
+    public void CyclicCrossoverCrossTest() {
+      TestRandom random = new TestRandom();
+      CyclicCrossover_Accessor target =
+        new CyclicCrossover_Accessor(new PrivateObject(typeof(CyclicCrossover)));
+      // perform a test with more than two parents
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        target.Cross(random, new ItemArray<Permutation.Permutation>(new Permutation.Permutation[] { 
+          new Permutation.Permutation(4), new Permutation.Permutation(4), new Permutation.Permutation(4)}));
+      }
+      catch (System.InvalidOperationException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void CyclicCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Larranaga, P. et al. 1999. Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators. Artificial Intelligence Review, 13
+      random.Reset();
+      random.DoubleNumbers = new double[] { 0.9 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 1, 3, 5, 7, 6, 4, 2, 0 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 0, 1, 5, 3, 6, 4, 2, 7 });
+      Assert.IsTrue(expected.Validate());
+      actual = CyclicCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        CyclicCrossover.Apply(random, new Permutation.Permutation(8), new Permutation.Permutation(6));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/EdgeRecombinationCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/EdgeRecombinationCrossoverTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/EdgeRecombinationCrossoverTest.cs	(revision 3052)
@@ -0,0 +1,136 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+  /// <summary>
+  ///This is a test class for EdgeRecombinationCrossover and is intended
+  ///to contain all EdgeRecombinationCrossover Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class EdgeRecombinationCrossoverTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Cross
+    ///</summary>
+    [TestMethod()]
+    [DeploymentItem("HeuristicLab.Encodings.Permutation-3.3.dll")]
+    public void EdgeRecombinationCrossoverCrossoverCrossTest() {
+      TestRandom random = new TestRandom();
+      EdgeRecombinationCrossover_Accessor target =
+        new EdgeRecombinationCrossover_Accessor(new PrivateObject(typeof(EdgeRecombinationCrossover)));
+      // perform a test with more than two parents
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        target.Cross(random, new ItemArray<Permutation.Permutation>(new Permutation.Permutation[] { 
+          new Permutation.Permutation(4), new Permutation.Permutation(4), new Permutation.Permutation(4)}));
+      }
+      catch (System.InvalidOperationException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void EdgeRecombinationCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, pp. 54-55
+      random.Reset();
+      random.IntNumbers = new int[] { 0 };
+      random.DoubleNumbers = new double[] { 0.5, 0, 0, 0 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 8, 2, 6, 7, 1, 5, 4, 0, 3 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 0, 4, 5, 1, 7, 6, 2, 8, 3 });
+      Assert.IsTrue(expected.Validate());
+      actual = EdgeRecombinationCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+     
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        EdgeRecombinationCrossover.Apply(random, new Permutation.Permutation(8), new Permutation.Permutation(6));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/HeuristicLab.Encodings.Permutation-3.3.Tests.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/HeuristicLab.Encodings.Permutation-3.3.Tests.csproj	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/HeuristicLab.Encodings.Permutation-3.3.Tests.csproj	(revision 3052)
@@ -0,0 +1,153 @@
+﻿<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{4D59BEC9-A69E-4686-B8C9-0E6C073B093E}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Encodings.Permutation_33.Tests</RootNamespace>
+    <AssemblyName>HeuristicLab.Encodings.Permutation-3.3.Tests</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </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>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </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>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Auxiliary.cs" />
+    <Compile Include="CosaCrossoverTest.cs" />
+    <Compile Include="CyclicCrossover2Test.cs" />
+    <Compile Include="CyclicCrossoverTest.cs" />
+    <Compile Include="EdgeRecombinationCrossoverTest.cs" />
+    <Compile Include="InsertionManipulatorTest.cs" />
+    <Compile Include="InversionManipulatorTest.cs" />
+    <Compile Include="MaximalPreservativeCrossoverTest.cs" />
+    <Compile Include="OrderBasedCrossoverTest.cs" />
+    <Compile Include="OrderCrossover2Test.cs" />
+    <Compile Include="OrderCrossoverTest.cs" />
+    <Compile Include="PartiallyMatchedCrossoverTest.cs" />
+    <Compile Include="PositionBasedCrossoverTest.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Random.cs" />
+    <Compile Include="ScrambleManipulatorTest.cs" />
+    <Compile Include="Swap2ManipulatorTest.cs" />
+    <Compile Include="Swap3ManipulatorTest.cs" />
+    <Compile Include="TranslocationInversionManipulatorTest.cs" />
+    <Compile Include="TranslocationManipulatorTest.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="AuthoringTests.txt" />
+  </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\3.2\HeuristicLab.Common-3.2.csproj">
+      <Project>{1FC004FC-59AF-4249-B1B6-FF25873A20E4}</Project>
+      <Name>HeuristicLab.Common-3.2</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.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\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Encodings.Permutation-3.3.csproj">
+      <Project>{00282156-589D-424F-9CE4-A8038636C926}</Project>
+      <Name>HeuristicLab.Encodings.Permutation-3.3</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Shadow Include="Test References\HeuristicLab.Encodings.Permutation-3.3.accessor" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/InsertionManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/InsertionManipulatorTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/InsertionManipulatorTest.cs	(revision 3052)
@@ -0,0 +1,100 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+  /// <summary>
+  ///This is a test class for InsertionManipulator and is intended
+  ///to contain all InsertionManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class InsertionManipulatorTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void InsertionManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent, expected;
+      // The following test is based on an example from Larranaga, P. et al. 1999. Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators. Artificial Intelligence Review, 13
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 6 };
+      parent = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent.Validate());
+      
+      expected = new Permutation.Permutation(new int[] { 0, 1, 2, 4, 5, 6, 3, 7 });
+      Assert.IsTrue(expected.Validate());
+      InsertionManipulator.Apply(random, parent);
+      Assert.IsTrue(parent.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/InversionManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/InversionManipulatorTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/InversionManipulatorTest.cs	(revision 3052)
@@ -0,0 +1,100 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+  /// <summary>
+  ///This is a test class for InversionManipulator and is intended
+  ///to contain all InversionManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class InversionManipulatorTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void InversionManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent, expected;
+      // The following test is based on an example from Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, pp. 46-47
+      random.Reset();
+      random.IntNumbers = new int[] { 1, 4 };
+      parent = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 });
+      Assert.IsTrue(parent.Validate());
+      
+      expected = new Permutation.Permutation(new int[] { 0, 4, 3, 2, 1, 5, 6, 7, 8 });
+      Assert.IsTrue(expected.Validate());
+      InversionManipulator.Apply(random, parent);
+      Assert.IsTrue(parent.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/MaximalPreservativeCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/MaximalPreservativeCrossoverTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/MaximalPreservativeCrossoverTest.cs	(revision 3052)
@@ -0,0 +1,135 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+  /// <summary>
+  ///This is a test class for MaximalPreservativeCrossover and is intended
+  ///to contain all MaximalPreservativeCrossover Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class MaximalPreservativeCrossoverTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Cross
+    ///</summary>
+    [TestMethod()]
+    [DeploymentItem("HeuristicLab.Encodings.Permutation-3.3.dll")]
+    public void MaximalPreservativeCrossoverCrossTest() {
+      TestRandom random = new TestRandom();
+      MaximalPreservativeCrossover_Accessor target =
+        new MaximalPreservativeCrossover_Accessor(new PrivateObject(typeof(MaximalPreservativeCrossover)));
+      // perform a test with more than two parents
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        target.Cross(random, new ItemArray<Permutation.Permutation>(new Permutation.Permutation[] { 
+          new Permutation.Permutation(4), new Permutation.Permutation(4), new Permutation.Permutation(4)}));
+      }
+      catch (System.InvalidOperationException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void MaximalPreservativeCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Larranaga, 1999. Genetic Algorithms for the Traveling Salesman Problem.
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 2 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 1, 3, 5, 7, 6, 4, 2, 0 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 1, 0, 2, 3, 4, 5, 7, 6 });
+      Assert.IsTrue(expected.Validate());
+      actual = MaximalPreservativeCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+     
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        MaximalPreservativeCrossover.Apply(random, new Permutation.Permutation(8), new Permutation.Permutation(6));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderBasedCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderBasedCrossoverTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderBasedCrossoverTest.cs	(revision 3052)
@@ -0,0 +1,131 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+    /// <summary>
+    ///This is a test class for OrderBasedCrossoverTest and is intended
+    ///to contain all OrderBasedCrossoverTest Unit Tests
+    ///</summary>
+  [TestClass()]
+  public class OrderBasedCrossoverTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Cross
+    ///</summary>
+    [TestMethod()]
+    [DeploymentItem("HeuristicLab.Encodings.Permutation-3.3.dll")]
+    public void OrderBasedCrossoverCrossTest() {
+      TestRandom random = new TestRandom();
+      OrderBasedCrossover_Accessor target = 
+        new OrderBasedCrossover_Accessor(new PrivateObject(typeof(OrderBasedCrossover)));
+      // perform a test with more than two parents
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        target.Cross(random, new ItemArray<Permutation.Permutation>(new Permutation.Permutation[] { 
+          new Permutation.Permutation(4), new Permutation.Permutation(4), new Permutation.Permutation(4)}));
+      } catch (System.InvalidOperationException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void OrderBasedCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Larranaga, P. et al. 1999. Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators. Artificial Intelligence Review, 13
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 5, 2, 1 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 1, 3, 5, 7, 6, 4, 2, 0 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 1, 3, 2, 7, 6, 4, 5, 0 });
+      actual = OrderBasedCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        OrderBasedCrossover.Apply(random, new Permutation.Permutation(8), new Permutation.Permutation(6));
+      } catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderCrossover2Test.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderCrossover2Test.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderCrossover2Test.cs	(revision 3052)
@@ -0,0 +1,110 @@
+﻿using HeuristicLab.Core;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+    /// <summary>
+    ///This is a test class for OrderCrossover2Test and is intended
+    ///to contain all OrderCrossover2Test Unit Tests
+    ///</summary>
+  [TestClass()]
+  public class OrderCrossover2Test {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Cross
+    ///</summary>
+    [TestMethod()]
+    [DeploymentItem("HeuristicLab.Encodings.Permutation-3.3.dll")]
+    public void OrderCrossover2CrossTest() {
+      TestRandom random = new TestRandom();
+      OrderCrossover2_Accessor target = new OrderCrossover2_Accessor(new PrivateObject(typeof(OrderCrossover2)));
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        target.Cross(random, new ItemArray<Permutation.Permutation>(new Permutation.Permutation[] { 
+          new Permutation.Permutation(4), new Permutation.Permutation(4), new Permutation.Permutation(4)}));
+      } catch (System.InvalidOperationException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void OrderCrossover2ApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications. CRC Press. p. 135.
+      random.Reset();
+      random.IntNumbers = new int[] { 5, 7 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 2, 5, 6, 0, 9, 1, 3, 8, 4, 7 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 2, 0, 9, 1, 3, 5, 6, 7, 8, 4 });
+      Assert.IsTrue(expected.Validate());
+      actual = OrderCrossover2.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        OrderCrossover.Apply(random, new Permutation.Permutation(8), new Permutation.Permutation(6));
+      } catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderCrossoverTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/OrderCrossoverTest.cs	(revision 3052)
@@ -0,0 +1,184 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+    /// <summary>
+    ///This is a test class for OrderCrossoverTest and is intended
+    ///to contain all OrderCrossoverTest Unit Tests
+    ///</summary>
+  [TestClass()]
+  public class OrderCrossoverTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Cross
+    ///</summary>
+    [TestMethod()]
+    [DeploymentItem("HeuristicLab.Encodings.Permutation-3.3.dll")]
+    public void OrderCrossoverCrossTest() {
+      TestRandom random = new TestRandom();
+      OrderCrossover_Accessor target = 
+        new OrderCrossover_Accessor(new PrivateObject(typeof(OrderCrossover)));
+      // perform a test with more than two parents
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        target.Cross(random, new ItemArray<Permutation.Permutation>(new Permutation.Permutation[] { 
+          new Permutation.Permutation(4), new Permutation.Permutation(4), new Permutation.Permutation(4)}));
+      } catch (System.InvalidOperationException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void OrderCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, pp. 55-56
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 6 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 8, 2, 6, 7, 1, 5, 4, 0, 3 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 2, 7, 1, 3, 4, 5, 6, 0, 8 });
+      Assert.IsTrue(expected.Validate());
+      actual = OrderCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // The following test is based on an example from Larranaga, P. et al. 1999. Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators. Artificial Intelligence Review, 13, pp. 129-170.
+      random.Reset();
+      random.IntNumbers = new int[] { 2, 4 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 1, 3, 5, 7, 6, 4, 2, 0 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 7, 6, 2, 3, 4, 0, 1, 5 });
+      actual = OrderCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // The following test is based on an example from Talbi, E.G. 2009. Metaheuristics - From Design to Implementation. Wiley, p. 218.
+      random.Reset();
+      random.IntNumbers = new int[] { 2, 5 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 7, 3, 0, 4, 8, 2, 5, 1, 6 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 0, 8, 2, 3, 4, 5, 1, 6, 7 });
+      Assert.IsTrue(expected.Validate());
+      actual = OrderCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // The following test is not based on published examples
+      random.Reset();
+      random.IntNumbers = new int[] { 0, 5 };
+      parent1 = new Permutation.Permutation(new int[] { 2, 1, 4, 3, 7, 8, 6, 0, 5, 9 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 5, 3, 4, 0, 9, 8, 2, 7, 1, 6 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 2, 1, 4, 3, 7, 8, 6, 5, 0, 9 });
+      Assert.IsTrue(expected.Validate());
+      actual = OrderCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // based on the previous with changed breakpoints
+      random.Reset();
+      random.IntNumbers = new int[] { 6, 9 };
+      expected = new Permutation.Permutation(new int[] { 3, 4, 8, 2, 7, 1, 6, 0, 5, 9 });
+      Assert.IsTrue(expected.Validate());
+      actual = OrderCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // another one based on the previous with changed breakpoints
+      random.Reset();
+      random.IntNumbers = new int[] { 0, 9 };
+      expected = new Permutation.Permutation(new int[] { 2, 1, 4, 3, 7, 8, 6, 0, 5, 9 });
+      Assert.IsTrue(expected.Validate());
+      actual = OrderCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        OrderCrossover.Apply(random, new Permutation.Permutation(8), new Permutation.Permutation(6));
+      } catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/PartiallyMatchedCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/PartiallyMatchedCrossoverTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/PartiallyMatchedCrossoverTest.cs	(revision 3052)
@@ -0,0 +1,147 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+  /// <summary>
+  ///This is a test class for PartiallyMatchedCrossover and is intended
+  ///to contain all PartiallyMatchedCrossover Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class PartiallyMatchedCrossoverTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Cross
+    ///</summary>
+    [TestMethod()]
+    [DeploymentItem("HeuristicLab.Encodings.Permutation-3.3.dll")]
+    public void PartiallyMatchedCrossTest() {
+      TestRandom random = new TestRandom();
+      PartiallyMatchedCrossover_Accessor target =
+        new PartiallyMatchedCrossover_Accessor(new PrivateObject(typeof(PartiallyMatchedCrossover)));
+      // perform a test with more than two parents
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        target.Cross(random, new ItemArray<Permutation.Permutation>(new Permutation.Permutation[] { 
+          new Permutation.Permutation(4), new Permutation.Permutation(4), new Permutation.Permutation(4)}));
+      }
+      catch (System.InvalidOperationException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void PartiallyMatchedCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent1, parent2, expected, actual;
+      // The following test is based on an example from Larranaga, 1999. Genetic Algorithms for the Traveling Salesman Problem.
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 5 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 2, 6, 4, 0, 5, 7, 1, 3 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 2, 6, 7, 3, 4, 5, 1, 0 });
+      Assert.IsTrue(expected.Validate());
+      actual = PartiallyMatchedCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+      // The following test is based on an example from Affenzeller, M. et al. 2009. Genetic Algorithms and Genetic Programming - Modern Concepts and Practical Applications. CRC Press. p. 134.
+      random.Reset();
+      random.IntNumbers = new int[] { 5, 7 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 2, 5, 6, 0, 9, 1, 3, 8, 4, 7 });
+      Assert.IsTrue(parent2.Validate());
+      expected = new Permutation.Permutation(new int[] { 2, 1, 3, 0, 9, 5, 6, 7, 4, 8 });
+      Assert.IsTrue(expected.Validate());
+      actual = PartiallyMatchedCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when the two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        PartiallyMatchedCrossover.Apply(random, new Permutation.Permutation(8), new Permutation.Permutation(6));
+      }
+      catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/PositionBasedCrossoverTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/PositionBasedCrossoverTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/PositionBasedCrossoverTest.cs	(revision 3052)
@@ -0,0 +1,138 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+  /// <summary>
+  ///This is a test class for PositionBasedCrossover and is intended
+  ///to contain all PositionBasedCrossover Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class PositionBasedCrossoverTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Cross
+    ///</summary>
+    [TestMethod()]
+    [DeploymentItem("HeuristicLab.Encodings.Permutation-3.3.dll")]
+    public void PositionBasedCrossoverCrossTest() {
+      TestRandom random = new TestRandom();
+      PositionBasedCrossover_Accessor target = new PositionBasedCrossover_Accessor(
+        new PrivateObject(typeof(PositionBasedCrossover)));
+     
+      // perform a test with more than two parents
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        target.Cross(random, new ItemArray<Permutation.Permutation>(new Permutation.Permutation[] {
+          new Permutation.Permutation(4), new Permutation.Permutation(4), new Permutation.Permutation(4) }));
+      }
+      catch (System.InvalidOperationException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    [DeploymentItem("HeuristicLab.Encodings.Permutation-3.3.dll")]
+    public void PositionBasedCrossoverApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent1, parent2, expected, actual;
+
+      // The following test is based on an example from Larranaga, 1999. Genetic Algorithms for the Traveling Salesman Problem.
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 1, 2, 5 };
+      parent1 = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent1.Validate());
+      parent2 = new Permutation.Permutation(new int[] { 1, 3, 5, 7, 6, 4, 2, 0 });
+      Assert.IsTrue(parent2.Validate());
+
+      expected = new Permutation.Permutation(new int[] { 0, 3, 5, 1, 2, 4, 6, 7 });
+      Assert.IsTrue(expected.Validate());
+      actual = PositionBasedCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(actual.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, actual));
+
+      // perform a test when two permutations are of unequal length
+      random.Reset();
+      bool exceptionFired = false;
+      try {
+        PositionBasedCrossover.Apply(random, new Permutation.Permutation(8), new Permutation.Permutation(6));
+      } catch (System.ArgumentException) {
+        exceptionFired = true;
+      }
+      Assert.IsTrue(exceptionFired);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Properties/AssemblyInfo.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Properties/AssemblyInfo.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Properties/AssemblyInfo.cs	(revision 3052)
@@ -0,0 +1,34 @@
+﻿using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Encodings.Permutation-3.3.Tests")]
+[assembly: AssemblyDescription("Unit tests for the HeuristicLab permutation encoding and related operators.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2010 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM componenets.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c4934ec5-3305-4b68-beea-514a623afee1")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.0.0")]
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Random.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Random.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Random.cs	(revision 3052)
@@ -0,0 +1,134 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+  public class TestRandom : IRandom {
+    #region Variables and Properties
+    private int[] intNumbers;
+    public int[] IntNumbers {
+      get { return intNumbers; }
+      set {
+        if (value == null) intNumbers = new int[0];
+        else intNumbers = value;
+      }
+    }
+    private int nextIntIndex;
+    private double[] doubleNumbers;
+    public double[] DoubleNumbers {
+      get { return doubleNumbers; }
+      set {
+        if (value == null) doubleNumbers = new double[0];
+        else doubleNumbers = value;
+      }
+    }
+    private int nextDoubleIndex;
+    #endregion
+
+    public TestRandom() {
+      intNumbers = new int[0];
+      doubleNumbers = new double[0];
+      nextIntIndex = 0;
+      nextDoubleIndex = 0;
+    }
+
+    public TestRandom(int[] intNumbers, double[] doubleNumbers) {
+      if (intNumbers == null) intNumbers = new int[0];
+      else this.intNumbers = intNumbers;
+      if (doubleNumbers == null) doubleNumbers = new double[0];
+      else this.doubleNumbers = doubleNumbers;
+      nextIntIndex = 0;
+      nextDoubleIndex = 0;
+    }
+
+    #region IRandom Members
+
+    public void Reset() {
+      nextIntIndex = 0;
+      nextDoubleIndex = 0;
+    }
+
+    public void Reset(int seed) {
+      throw new NotImplementedException();
+    }
+
+    public int Next() {
+      if (nextIntIndex >= intNumbers.Length) throw new InvalidOperationException("Random: No more integer random numbers available");
+      return intNumbers[nextIntIndex++];
+    }
+
+    public int Next(int maxVal) {
+      if (nextIntIndex >= intNumbers.Length) throw new InvalidOperationException("Random: No more integer random numbers available");
+      if (IntNumbers[nextIntIndex] >= maxVal) throw new InvalidOperationException("Random: Next integer random number (" + IntNumbers[nextIntIndex] + ") is >= " + maxVal);
+      return intNumbers[nextIntIndex++];
+    }
+
+    public int Next(int minVal, int maxVal) {
+      if (nextIntIndex >= intNumbers.Length) throw new InvalidOperationException("Random: No more integer random numbers available");
+      if (IntNumbers[nextIntIndex] < minVal || IntNumbers[nextIntIndex] >= maxVal) throw new InvalidOperationException("Random: Next integer random number (" + IntNumbers[nextIntIndex] + ") is not in the range [" + minVal + ";" + maxVal + ")");
+      return intNumbers[nextIntIndex++];
+    }
+
+    public double NextDouble() {
+      if (nextDoubleIndex >= doubleNumbers.Length) throw new InvalidOperationException("Random: No more double random numbers available");
+      if (doubleNumbers[nextDoubleIndex] < 0.0 || doubleNumbers[nextDoubleIndex] >= 1.0) throw new InvalidOperationException("Random: Next double ranomd number (" + DoubleNumbers[nextDoubleIndex] + ") is not in the range [0;1)");
+      return doubleNumbers[nextDoubleIndex++];
+    }
+
+    #endregion
+
+    #region IItem Members
+
+    public string ItemName {
+      get { throw new NotImplementedException(); }
+    }
+
+    public string ItemDescription {
+      get { throw new NotImplementedException(); }
+    }
+
+    public System.Drawing.Image ItemImage {
+      get { throw new NotImplementedException(); }
+    }
+
+    public event EventHandler ToStringChanged;
+
+    #endregion
+
+    #region IDeepCloneable Members
+
+    public IDeepCloneable Clone(Cloner cloner) {
+      throw new NotImplementedException();
+    }
+
+    #endregion
+
+    #region ICloneable Members
+
+    public object Clone() {
+      throw new NotImplementedException();
+    }
+
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/ScrambleManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/ScrambleManipulatorTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/ScrambleManipulatorTest.cs	(revision 3052)
@@ -0,0 +1,100 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+  /// <summary>
+  ///This is a test class for ScrambleManipulator and is intended
+  ///to contain all ScrambleManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class ScrambleManipulatorTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void ScrambleManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent, expected;
+      // The following test is based on an example from Larranaga, P. et al. 1999. Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators. Artificial Intelligence Review, 13
+      random.Reset();
+      random.IntNumbers = new int[] { 3, 6, 1, 1, 1, 0 };
+      parent = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent.Validate());
+      
+      expected = new Permutation.Permutation(new int[] { 0, 1, 2, 4, 5, 6, 3, 7 });
+      Assert.IsTrue(expected.Validate());
+      ScrambleManipulator.Apply(random, parent);
+      Assert.IsTrue(parent.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Swap2ManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Swap2ManipulatorTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Swap2ManipulatorTest.cs	(revision 3052)
@@ -0,0 +1,100 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+  /// <summary>
+  ///This is a test class for Swap2Manipulator and is intended
+  ///to contain all Swap2Manipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class Swap2ManipulatorTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void Swap2ManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent, expected;
+      // The following test is based on an example from Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, p. 45
+      random.Reset();
+      random.IntNumbers = new int[] { 1, 4 };
+      parent = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 });
+      Assert.IsTrue(parent.Validate());
+
+      expected = new Permutation.Permutation(new int[] { 0, 4, 2, 3, 1, 5, 6, 7, 8 });
+      Assert.IsTrue(expected.Validate());
+      Swap2Manipulator.Apply(random, parent);
+      Assert.IsTrue(parent.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Swap3ManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Swap3ManipulatorTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Swap3ManipulatorTest.cs	(revision 3052)
@@ -0,0 +1,101 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+  /// <summary>
+  ///This is a test class for Swap3Manipulator and is intended
+  ///to contain all Swap3Manipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class Swap3ManipulatorTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void Swap3ManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent, expected;
+      // Test manipulator
+      random.Reset();
+      random.IntNumbers = new int[] { 1, 3, 6 };
+      random.DoubleNumbers = new double[] { 0 };
+      parent = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 });
+      Assert.IsTrue(parent.Validate());
+
+      expected = new Permutation.Permutation(new int[] { 0, 3, 2, 6, 4, 5, 1, 7, 8 });
+      Assert.IsTrue(expected.Validate());
+      Swap3Manipulator.Apply(random, parent);
+      Assert.IsTrue(parent.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Test References/HeuristicLab.Encodings.Permutation-3.3.accessor
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Test References/HeuristicLab.Encodings.Permutation-3.3.accessor	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/Test References/HeuristicLab.Encodings.Permutation-3.3.accessor	(revision 3052)
@@ -0,0 +1,2 @@
+HeuristicLab.Encodings.Permutation-3.3.dll
+Desktop
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/TranslocationInversionManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/TranslocationInversionManipulatorTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/TranslocationInversionManipulatorTest.cs	(revision 3052)
@@ -0,0 +1,100 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+  /// <summary>
+  ///This is a test class for TranslocationInversionManipulator and is intended
+  ///to contain all TranslocationInversionManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class TranslocationInversionManipulatorTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void TranslocationInversionManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent, expected;
+      // The following test is based on an example from Larranaga, P. et al. 1999. Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators. Artificial Intelligence Review, 13
+      random.Reset();
+      random.IntNumbers = new int[] { 2, 4, 4 };
+      parent = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent.Validate());
+      
+      expected = new Permutation.Permutation(new int[] { 0, 1, 5, 6, 4, 3, 2, 7 });
+      Assert.IsTrue(expected.Validate());
+      TranslocationInversionManipulator.Apply(random, parent);
+      Assert.IsTrue(parent.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, parent));
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/TranslocationManipulatorTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/TranslocationManipulatorTest.cs	(revision 3052)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Tests/TranslocationManipulatorTest.cs	(revision 3052)
@@ -0,0 +1,100 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using HeuristicLab.Encodings.Permutation;
+
+namespace HeuristicLab.Encodings.Permutation_33.Tests {
+  /// <summary>
+  ///This is a test class for TranslocationManipulator and is intended
+  ///to contain all TranslocationManipulator Unit Tests
+  ///</summary>
+  [TestClass()]
+  public class TranslocationManipulatorTest {
+
+
+    private TestContext testContextInstance;
+
+    /// <summary>
+    ///Gets or sets the test context which provides
+    ///information about and functionality for the current test run.
+    ///</summary>
+    public TestContext TestContext {
+      get {
+        return testContextInstance;
+      }
+      set {
+        testContextInstance = value;
+      }
+    }
+
+    #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
+
+
+    /// <summary>
+    ///A test for Apply
+    ///</summary>
+    [TestMethod()]
+    public void TranslocationManipulatorApplyTest() {
+      TestRandom random = new TestRandom();
+      Permutation.Permutation parent, expected;
+      // The following test is based on an example from Larranaga, P. et al. 1999. Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators. Artificial Intelligence Review, 13, p. 24
+      random.Reset();
+      random.IntNumbers = new int[] { 2, 4, 4 };
+      parent = new Permutation.Permutation(new int[] { 0, 1, 2, 3, 4, 5, 6, 7 });
+      Assert.IsTrue(parent.Validate());
+      
+      expected = new Permutation.Permutation(new int[] { 0, 1, 5, 6, 2, 3, 4, 7 });
+      Assert.IsTrue(expected.Validate());
+      TranslocationManipulator.Apply(random, parent);
+      Assert.IsTrue(parent.Validate());
+      Assert.IsTrue(Auxiliary.PermutationIsEqualByPosition(expected, parent));
+    }
+  }
+}
