Index: trunk/sources/HeuristicLab.Encodings.Permutation/3.3/CosaCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/CosaCrossover.cs	(revision 2906)
+++ 	(revision )
@@ -1,102 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/Creators/RandomPermutationCreator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Creators/RandomPermutationCreator.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Creators/RandomPermutationCreator.cs	(revision 2907)
@@ -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.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.")]
+  [EmptyStorableClass]
+  [Creatable("Test")]
+  public sealed class RandomPermutationCreator : SingleSuccessorOperator, IPermutationCreator, IStochasticOperator {
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public IValueLookupParameter<IntData> LengthParameter {
+      get { return (IValueLookupParameter<IntData>)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<IntData>("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.Permutation/3.3/Crossovers/CosaCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/CosaCrossover.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/CosaCrossover.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/Crossovers/CyclicCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/CyclicCrossover.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/CyclicCrossover.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/Crossovers/CyclicCrossover2.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/CyclicCrossover2.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/CyclicCrossover2.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/Crossovers/EdgeRecombinationCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/EdgeRecombinationCrossover.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/EdgeRecombinationCrossover.cs	(revision 2907)
@@ -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 ov 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 ov Genetic Algorithms, New York, pp. 350-372.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/Crossovers/MaximalPreservativeCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/MaximalPreservativeCrossover.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/MaximalPreservativeCrossover.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/Crossovers/OrderBasedCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/OrderBasedCrossover.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/OrderBasedCrossover.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/Crossovers/OrderCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/OrderCrossover.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/OrderCrossover.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/Crossovers/OrderCrossover2.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/OrderCrossover2.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/OrderCrossover2.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/Crossovers/PartiallyMatchedCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/PartiallyMatchedCrossover.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/PartiallyMatchedCrossover.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/Crossovers/PositionBasedCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/PositionBasedCrossover.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Crossovers/PositionBasedCrossover.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/CyclicCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/CyclicCrossover.cs	(revision 2906)
+++ 	(revision )
@@ -1,108 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/CyclicCrossover2.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/CyclicCrossover2.cs	(revision 2906)
+++ 	(revision )
@@ -1,95 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/EdgeRecombinationCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/EdgeRecombinationCrossover.cs	(revision 2906)
+++ 	(revision )
@@ -1,154 +1,0 @@
-#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 ov 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 ov Genetic Algorithms, New York, pp. 350-372.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/HeuristicLab.Encodings.Permutation-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/HeuristicLab.Encodings.Permutation-3.3.csproj	(revision 2906)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/HeuristicLab.Encodings.Permutation-3.3.csproj	(revision 2907)
@@ -81,33 +81,31 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="CyclicCrossover2.cs" />
+    <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="IPermutationCreator.cs" />
-    <Compile Include="IPermutationOperator.cs" />
-    <Compile Include="CosaCrossover.cs" />
-    <Compile Include="CyclicCrossover.cs" />
-    <Compile Include="EdgeRecombinationCrossover.cs" />
-    <Compile Include="InsertionManipulator.cs" />
-    <Compile Include="InversionManipulator.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="IPermutationCrossover.cs" />
-    <Compile Include="IPermutationManipulator.cs" />
-    <Compile Include="MaximalPreservativeCrossover.cs" />
-    <Compile Include="OrderBasedCrossover.cs" />
-    <Compile Include="OrderCrossover2.cs" />
-    <Compile Include="PartiallyMatchedCrossover.cs" />
+    <Compile Include="Interfaces\IPermutationCreator.cs" />
+    <Compile Include="Interfaces\IPermutationCrossover.cs" />
+    <Compile Include="Interfaces\IPermutationManipulator.cs" />
+    <Compile Include="Interfaces\IPermutationOperator.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="PermutationManipulator.cs" />
-    <Compile Include="OrderCrossover.cs" />
     <Compile Include="PermutationCrossover.cs" />
     <Compile Include="Permutation.cs" />
-    <Compile Include="PositionBasedCrossover.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="RandomPermutationCreator.cs" />
-    <Compile Include="ScrambleManipulator.cs" />
-    <Compile Include="Swap2Manipulator.cs" />
-    <Compile Include="Swap3Manipulator.cs" />
-    <Compile Include="TranslocationInversionManipulator.cs" />
-    <Compile Include="TranslocationManipulator.cs" />
   </ItemGroup>
   <ItemGroup>
Index: trunk/sources/HeuristicLab.Encodings.Permutation/3.3/IPermutationCreator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/IPermutationCreator.cs	(revision 2906)
+++ 	(revision )
@@ -1,34 +1,0 @@
-#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<IntData> LengthParameter { get; }
-    ILookupParameter<Permutation> PermutationParameter { get; }
-  }
-}
Index: trunk/sources/HeuristicLab.Encodings.Permutation/3.3/IPermutationCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/IPermutationCrossover.cs	(revision 2906)
+++ 	(revision )
@@ -1,33 +1,0 @@
-#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.Permutation/3.3/IPermutationManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/IPermutationManipulator.cs	(revision 2906)
+++ 	(revision )
@@ -1,32 +1,0 @@
-#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.Permutation/3.3/IPermutationOperator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/IPermutationOperator.cs	(revision 2906)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#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.Permutation/3.3/InsertionManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/InsertionManipulator.cs	(revision 2906)
+++ 	(revision )
@@ -1,79 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/Interfaces/IPermutationCreator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Interfaces/IPermutationCreator.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Interfaces/IPermutationCreator.cs	(revision 2907)
@@ -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<IntData> LengthParameter { get; }
+    ILookupParameter<Permutation> PermutationParameter { get; }
+  }
+}
Index: trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Interfaces/IPermutationCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Interfaces/IPermutationCrossover.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Interfaces/IPermutationCrossover.cs	(revision 2907)
@@ -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.Permutation/3.3/Interfaces/IPermutationManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Interfaces/IPermutationManipulator.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Interfaces/IPermutationManipulator.cs	(revision 2907)
@@ -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.Permutation/3.3/Interfaces/IPermutationOperator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Interfaces/IPermutationOperator.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Interfaces/IPermutationOperator.cs	(revision 2907)
@@ -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.Permutation/3.3/InversionManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/InversionManipulator.cs	(revision 2906)
+++ 	(revision )
@@ -1,66 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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; }
-
-      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.Permutation/3.3/Manipulators/InsertionManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/InsertionManipulator.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/InsertionManipulator.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/Manipulators/InversionManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/InversionManipulator.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/InversionManipulator.cs	(revision 2907)
@@ -0,0 +1,66 @@
+#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.")]
+  [EmptyStorableClass]
+  [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; }
+
+      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.Permutation/3.3/Manipulators/ScrambleManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/ScrambleManipulator.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/ScrambleManipulator.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/Manipulators/Swap2Manipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/Swap2Manipulator.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/Swap2Manipulator.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/Manipulators/Swap3Manipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/Swap3Manipulator.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/Swap3Manipulator.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/Manipulators/TranslocationInversionManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/TranslocationInversionManipulator.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/TranslocationInversionManipulator.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/Manipulators/TranslocationManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/TranslocationManipulator.cs	(revision 2907)
+++ trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Manipulators/TranslocationManipulator.cs	(revision 2907)
@@ -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.")]
+  [EmptyStorableClass]
+  [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.Permutation/3.3/MaximalPreservativeCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/MaximalPreservativeCrossover.cs	(revision 2906)
+++ 	(revision )
@@ -1,141 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/OrderBasedCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/OrderBasedCrossover.cs	(revision 2906)
+++ 	(revision )
@@ -1,107 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/OrderCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/OrderCrossover.cs	(revision 2906)
+++ 	(revision )
@@ -1,98 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/OrderCrossover2.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/OrderCrossover2.cs	(revision 2906)
+++ 	(revision )
@@ -1,90 +1,0 @@
-﻿#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.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/PartiallyMatchedCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/PartiallyMatchedCrossover.cs	(revision 2906)
+++ 	(revision )
@@ -1,102 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/PositionBasedCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/PositionBasedCrossover.cs	(revision 2906)
+++ 	(revision )
@@ -1,93 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/RandomPermutationCreator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/RandomPermutationCreator.cs	(revision 2906)
+++ 	(revision )
@@ -1,59 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [Creatable("Test")]
-  public sealed class RandomPermutationCreator : SingleSuccessorOperator, IPermutationCreator, IStochasticOperator {
-    public ILookupParameter<IRandom> RandomParameter {
-      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
-    }
-    public IValueLookupParameter<IntData> LengthParameter {
-      get { return (IValueLookupParameter<IntData>)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<IntData>("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.Permutation/3.3/ScrambleManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/ScrambleManipulator.cs	(revision 2906)
+++ 	(revision )
@@ -1,89 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/Swap2Manipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Swap2Manipulator.cs	(revision 2906)
+++ 	(revision )
@@ -1,62 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/Swap3Manipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/Swap3Manipulator.cs	(revision 2906)
+++ 	(revision )
@@ -1,78 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/TranslocationInversionManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/TranslocationInversionManipulator.cs	(revision 2906)
+++ 	(revision )
@@ -1,86 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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.Permutation/3.3/TranslocationManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.Permutation/3.3/TranslocationManipulator.cs	(revision 2906)
+++ 	(revision )
@@ -1,86 +1,0 @@
-#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.")]
-  [EmptyStorableClass]
-  [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);
-    }
-  }
-}
