Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/VRPSolution.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/VRPSolution.cs	(revision 5126)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/VRPSolution.cs	(revision 5127)
@@ -106,5 +106,5 @@
     private VRPSolution(VRPSolution original, Cloner cloner)
       : base(original, cloner) {
-      this.problemInstance = (IVRPProblemInstance)cloner.Clone(original.problemInstance);
+      this.problemInstance = original.problemInstance;
       this.solution = (IVRPEncoding)cloner.Clone(original.solution);
       this.quality = (DoubleValue)cloner.Clone(original.quality);
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveAttribute.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveAttribute.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveAttribute.cs	(revision 5127)
@@ -0,0 +1,49 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
+  [Item("VRPMoveAttribute", "Base class for specifying a move attribute")]
+  [StorableClass]
+  public class VRPMoveAttribute : Item {
+    [Storable]
+    public double MoveQuality { get; protected set; }
+
+    [StorableConstructor]
+    protected VRPMoveAttribute(bool deserializing) : base(deserializing) { }
+    protected VRPMoveAttribute(VRPMoveAttribute original, Cloner cloner)
+      : base(original, cloner) {
+      this.MoveQuality = original.MoveQuality;
+    }
+    public VRPMoveAttribute() : this(0) { }
+    public VRPMoveAttribute(double moveQuality)
+      : base() {
+      MoveQuality = moveQuality;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new VRPMoveAttribute(this, cloner);
+    }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveEvaluator.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveEvaluator.cs	(revision 5126)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveEvaluator.cs	(revision 5127)
@@ -44,4 +44,7 @@
       get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
     }
+    public ILookupParameter<DoubleValue> MovePenaltyParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MovePenalty"]; }
+    }
 
     [StorableConstructor]
@@ -52,4 +55,5 @@
       Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution."));
       Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MovePenalty", "The penalty applied to the move."));
     }
 
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveMaker.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveMaker.cs	(revision 5126)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveMaker.cs	(revision 5127)
@@ -42,4 +42,7 @@
       get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
     }
+    public ILookupParameter<DoubleValue> MovePenaltyParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MovePenalty"]; }
+    }
 
     [StorableConstructor]
@@ -50,4 +53,5 @@
       Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution."));
       Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MovePenalty", "The penalty applied to the move."));
     }
 
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/TourEncoding.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/TourEncoding.cs	(revision 5126)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/TourEncoding.cs	(revision 5127)
@@ -39,5 +39,10 @@
     #region IVRPEncoding Members
     public virtual List<Tour> GetTours() {
-      List<Tour> result = new List<Tour>(Tours);
+      List<Tour> result = new List<Tour>();
+
+      foreach(Tour tour in Tours) {
+        if (tour.Stops.Count > 0)
+          result.Add(tour);
+      }
 
      while (result.Count > ProblemInstance.Vehicles.Value) {
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/IterativeInsertionCreator.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/IterativeInsertionCreator.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/IterativeInsertionCreator.cs	(revision 5127)
@@ -0,0 +1,127 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+using HeuristicLab.Problems.VehicleRouting.ProblemInstances;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("IterativeInsertionCreator", "Creates a randomly initialized VRP solution.")]
+  [StorableClass]
+  public sealed class IterativeInsertionCreator : PotvinCreator, IStochasticOperator {
+    #region IStochasticOperator Members
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    #endregion
+
+    public IValueParameter<BoolValue> AdhereTimeWindowsParameter {
+      get { return (IValueParameter<BoolValue>)Parameters["AdhereTimeWindows"]; }
+    }
+
+    [StorableConstructor]
+    private IterativeInsertionCreator(bool deserializing) : base(deserializing) { }
+
+    public IterativeInsertionCreator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator."));
+      Parameters.Add(new ValueParameter<BoolValue>("AdhereTimeWindows", "Specifies if the time windows should be considered during construction.", new BoolValue(true)));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new IterativeInsertionCreator(this, cloner);
+    }
+
+    private IterativeInsertionCreator(IterativeInsertionCreator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    private static double CalculateAngleToDepot(IVRPProblemInstance instance, int city) {
+      double dx = instance.Coordinates[0, 0];
+      double dy = instance.Coordinates[0, 1];
+
+      double cx = instance.Coordinates[city, 0];
+      double cy = instance.Coordinates[city, 1];
+
+      double alpha = Math.Atan((cx - dx) / (dy - cy)) * (180.0 / Math.PI);
+      if (cx > dx && cy > dy)
+        alpha = (90.0 + alpha) + 90.0;
+      else if (cx < dx && cy > dy)
+        alpha = alpha + 180.0;
+      else if (cx < dx && cy < dy)
+        alpha = (90.0 + alpha) + 270.0;
+
+      return alpha;
+    }
+
+    private static PotvinEncoding CreateSolution(IVRPProblemInstance instance, IRandom random, bool adhereTimeWindows) {
+      PotvinEncoding result = new PotvinEncoding(instance);
+      IVRPEvaluator eval = instance.EvaluatorParameter.Value;
+
+      List<int> customers = new List<int>();
+      for (int i = 0; i < instance.Cities.Value; i++)
+        customers.Add(i + 1);
+      customers.Sort(delegate(int city1, int city2)
+          {
+            double angle1 = CalculateAngleToDepot(instance, city1);
+            double angle2 = CalculateAngleToDepot(instance, city2);
+
+            return angle1.CompareTo(angle2);
+          });
+
+      Tour currentTour = new Tour();
+      result.Tours.Add(currentTour);
+      int j = random.Next(customers.Count);
+      for (int i = 0; i < customers.Count; i++) {
+        int index = (i + j) % customers.Count;
+
+        int stopIdx = result.FindBestInsertionPlace(currentTour, customers[index]);
+        currentTour.Stops.Insert(stopIdx, customers[index]);
+
+        CVRPEvaluation evaluation = eval.Evaluate(instance, currentTour) as CVRPEvaluation;
+        if (result.Tours.Count < instance.Vehicles.Value && 
+          ((adhereTimeWindows && !eval.Feasible(evaluation)) || ((!adhereTimeWindows) && evaluation.Overload > double.Epsilon))) {
+          currentTour.Stops.RemoveAt(stopIdx);
+
+          currentTour = new Tour();
+          result.Tours.Add(currentTour);
+          currentTour.Stops.Add(customers[index]);
+        }
+      }
+
+      return result;
+    }
+
+    public override IOperation Apply() {
+      VRPToursParameter.ActualValue = CreateSolution(ProblemInstance, RandomParameter.ActualValue, AdhereTimeWindowsParameter.Value.Value);
+
+      return base.Apply();
+    }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/PotvinCreator.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/PotvinCreator.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/PotvinCreator.cs	(revision 5127)
@@ -0,0 +1,50 @@
+﻿#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.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinCreator", "A VRP creator.")]
+  [StorableClass]
+  public abstract class PotvinCreator : VRPCreator, IPotvinOperator, IVRPCreator {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    
+    [StorableConstructor]
+    protected PotvinCreator(bool deserializing) : base(deserializing) { }
+
+    public PotvinCreator()
+      : base() {
+    }
+
+    protected PotvinCreator(PotvinCreator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/IPotvinCustomerRelocationMoveOperator.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/IPotvinCustomerRelocationMoveOperator.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/IPotvinCustomerRelocationMoveOperator.cs	(revision 5127)
@@ -0,0 +1,31 @@
+﻿#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.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  public interface IPotvinCustomerRelocationMoveOperator : IVRPMoveOperator {
+    ILookupParameter<PotvinCustomerRelocationMove> CustomerRelocationMoveParameter { get; }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationExhaustiveMoveGenerator.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationExhaustiveMoveGenerator.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationExhaustiveMoveGenerator.cs	(revision 5127)
@@ -0,0 +1,73 @@
+﻿#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.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Parameters;
+using System.Collections.Generic;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinCustomerRelocationExhaustiveMoveGenerator", "Generates customer relocation moves from a given VRP encoding.")]
+  [StorableClass]
+  public sealed class PotvinCustomerRelocationExhaustiveMoveGenerator : PotvinCustomerRelocationMoveGenerator, IExhaustiveMoveGenerator {
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PotvinCustomerRelocationExhaustiveMoveGenerator(this, cloner);
+    }
+
+    [StorableConstructor]
+    private PotvinCustomerRelocationExhaustiveMoveGenerator(bool deserializing) : base(deserializing) { }
+
+    public PotvinCustomerRelocationExhaustiveMoveGenerator()
+      : base() {
+    }
+
+    private PotvinCustomerRelocationExhaustiveMoveGenerator(PotvinCustomerRelocationMoveGenerator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    protected override PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {
+      List<PotvinCustomerRelocationMove> result = new List<PotvinCustomerRelocationMove>();
+
+      int max = individual.Tours.Count;
+      if (individual.Tours.Count < problemInstance.Vehicles.Value)
+        max = max - 1;
+
+      for (int i = 0; i < individual.Tours.Count; i++) {
+        for (int j = 0; j < individual.Tours[i].Stops.Count; j++) {
+          for (int k = 0; k <= max; k++) {
+            if (k != i) {
+              PotvinCustomerRelocationMove move = new PotvinCustomerRelocationMove(
+                individual.Tours[i].Stops[j], i, k, individual);
+
+              result.Add(move);
+            }
+          }
+        }
+      }
+
+      return result.ToArray();
+    }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMove.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMove.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMove.cs	(revision 5127)
@@ -0,0 +1,87 @@
+﻿#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;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Common;
+using System.Collections.Generic;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+using HeuristicLab.Data;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("AlbaLambdaInterchangeMove", "Item that describes a lambda move on a VRP representation.  It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")]
+  [StorableClass]
+  public class PotvinCustomerRelocationMove: Item, IVRPMove {
+    [Storable]
+    public IVRPEncoding Individual { get; protected set; }
+    
+    [Storable]
+    public int City { get; protected set; }
+
+    [Storable]
+    public int OldTour { get; protected set; }
+
+    [Storable]
+    public int Tour { get; protected set; }
+   
+    public PotvinCustomerRelocationMove(): base() {
+      City = -1;
+      Tour = -1;
+
+      Individual = null;
+    }
+
+    public PotvinCustomerRelocationMove(int city, int oldTour, int tour, PotvinEncoding individual) {
+      City = city;
+      OldTour = oldTour;
+      Tour = tour;
+
+      this.Individual = individual.Clone() as PotvinEncoding;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PotvinCustomerRelocationMove(this, cloner);
+    }
+
+    protected PotvinCustomerRelocationMove(PotvinCustomerRelocationMove original, Cloner cloner)
+      : base(original, cloner) {
+      this.City = original.City;
+      this.OldTour = original.OldTour;
+      this.Tour = original.Tour;
+
+      this.Individual = cloner.Clone(Individual) as PotvinEncoding;
+    }
+
+    #region IVRPMove Members
+
+    public VRPMoveEvaluator GetMoveEvaluator() {
+      return new PotvinCustomerRelocationMoveEvaluator();
+    }
+
+    public VRPMoveMaker GetMoveMaker() {
+      return new PotvinCustomerRelocationMoveMaker();
+    }
+
+    #endregion
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveAttribute.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveAttribute.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveAttribute.cs	(revision 5127)
@@ -0,0 +1,67 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinCustomerRelocationMoveAttribute", "Customer relocation move attribute")]
+  [StorableClass]
+  public class PotvinCustomerRelocationMoveAttribute : VRPMoveAttribute {
+    [Storable]
+    public int Tour { get; private set; }
+    [Storable]
+    public int City { get; private set; }
+
+    [StorableConstructor]
+    protected PotvinCustomerRelocationMoveAttribute(bool deserializing) : base(deserializing) { }
+    protected PotvinCustomerRelocationMoveAttribute(PotvinCustomerRelocationMoveAttribute original, Cloner cloner)
+      : base(original, cloner) {
+        this.Tour = original.Tour;
+        this.City = original.City;
+    }
+    public PotvinCustomerRelocationMoveAttribute(double moveQuality, int tour, int city)
+      : base(moveQuality) {
+      Tour = tour;
+      City = city;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PotvinCustomerRelocationMoveAttribute(this, cloner);
+    }
+
+    public override int GetHashCode() {
+      return Tour.GetHashCode() + City.GetHashCode();
+    }
+
+    public override bool Equals(object obj) {
+      if (obj is PotvinCustomerRelocationMoveAttribute) {
+        PotvinCustomerRelocationMoveAttribute other = obj as PotvinCustomerRelocationMoveAttribute;
+
+        return Tour == other.Tour && City == other.City;
+      } else {
+        return base.Equals(obj);
+      }
+    }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveEvaluator.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveEvaluator.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveEvaluator.cs	(revision 5127)
@@ -0,0 +1,104 @@
+﻿#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.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+using HeuristicLab.Common;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinCustomerRelocationMoveEvaluator", "Evaluates a customer relocation move for a VRP representation. ")]
+  [StorableClass]
+  public sealed class PotvinCustomerRelocationMoveEvaluator : PotvinMoveEvaluator, IPotvinCustomerRelocationMoveOperator {
+    public ILookupParameter<PotvinCustomerRelocationMove> CustomerRelocationMoveParameter {
+      get { return (ILookupParameter<PotvinCustomerRelocationMove>)Parameters["PotvinCustomerRelocationMove"]; }
+    }
+
+    public override ILookupParameter VRPMoveParameter {
+      get { return CustomerRelocationMoveParameter; }
+    }
+
+    public ILookupParameter<IMemory> MemoryParameter {
+      get { return (ILookupParameter<IMemory>)Parameters["Memory"]; }
+    }
+
+    public IValueParameter<StringValue> AdditionFrequencyParameter {
+      get { return (IValueParameter<StringValue>)Parameters["AdditionFrequency"]; }
+    }
+
+    public IValueParameter<DoubleValue> LambdaParameter {
+      get { return (IValueParameter<DoubleValue>)Parameters["Lambda"]; }
+    }
+
+    [StorableConstructor]
+    private PotvinCustomerRelocationMoveEvaluator(bool deserializing) : base(deserializing) { }
+
+    public PotvinCustomerRelocationMoveEvaluator()
+      : base() {
+       Parameters.Add(new LookupParameter<PotvinCustomerRelocationMove>("PotvinCustomerRelocationMove", "The move that should be evaluated."));
+
+       Parameters.Add(new LookupParameter<IMemory>("Memory", "The TS memory."));
+       Parameters.Add(new ValueParameter<StringValue>("AdditionFrequency", "The key that is used for the addition frequency in the TS memory.", new StringValue("AdditionFrequency")));
+       Parameters.Add(new ValueParameter<DoubleValue>("Lambda", "The lambda parameter.", new DoubleValue(0.015)));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PotvinCustomerRelocationMoveEvaluator(this, cloner);
+    }
+
+    private PotvinCustomerRelocationMoveEvaluator(PotvinCustomerRelocationMoveEvaluator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    protected override void EvaluateMove() {
+      PotvinCustomerRelocationMove move = CustomerRelocationMoveParameter.ActualValue;
+
+      PotvinEncoding newSolution = CustomerRelocationMoveParameter.ActualValue.Individual.Clone() as PotvinEncoding;
+      PotvinCustomerRelocationMoveMaker.Apply(newSolution, move);
+
+      UpdateEvaluation(newSolution);
+
+      //Apply memory, only if move is worse
+      if (MoveQualityParameter.ActualValue.Value >= QualityParameter.ActualValue.Value) {
+        IMemory memory = MemoryParameter.ActualValue;
+        string key = AdditionFrequencyParameter.Value.Value;
+        ItemDictionary<PotvinCustomerRelocationMoveAttribute, IntValue> additionFrequency =
+          memory.Get(key) as ItemDictionary<PotvinCustomerRelocationMoveAttribute, IntValue>;
+        if (additionFrequency != null) {
+          PotvinCustomerRelocationMoveAttribute attr = new PotvinCustomerRelocationMoveAttribute(0, move.Tour, move.City);
+          if (additionFrequency.ContainsKey(attr)) {
+            int frequency = additionFrequency[attr].Value;
+            double quality = MoveQualityParameter.ActualValue.Value - MovePenaltyParameter.ActualValue.Value;
+
+            MoveQualityParameter.ActualValue.Value +=
+              LambdaParameter.Value.Value * quality * frequency * System.Math.Sqrt(ProblemInstance.Cities.Value * ProblemInstance.Vehicles.Value);
+          }
+        }
+      }
+
+      //Apply constraint relaxation
+      MoveQualityParameter.ActualValue.Value += MovePenaltyParameter.ActualValue.Value * (newSolution.PenaltyFactor - 1.0); 
+    } 
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveGenerator.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveGenerator.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveGenerator.cs	(revision 5127)
@@ -0,0 +1,77 @@
+﻿#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.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Parameters;
+using System.Collections.Generic;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinCustomerRelocationMoveGenerator", "Generates customer relocation moves from a given VRP encoding.")]
+  [StorableClass]
+  public abstract class PotvinCustomerRelocationMoveGenerator : PotvinMoveGenerator, IPotvinCustomerRelocationMoveOperator {
+    public ILookupParameter<PotvinCustomerRelocationMove> CustomerRelocationMoveParameter {
+      get { return (ILookupParameter<PotvinCustomerRelocationMove>)Parameters["PotvinCustomerRelocationMove"]; }
+    }
+
+    public override ILookupParameter VRPMoveParameter {
+      get { return CustomerRelocationMoveParameter; }
+    }
+
+    protected ScopeParameter CurrentScopeParameter {
+      get { return (ScopeParameter)Parameters["CurrentScope"]; }
+    }
+
+    [StorableConstructor]
+    protected PotvinCustomerRelocationMoveGenerator(bool deserializing) : base(deserializing) { }
+
+    public PotvinCustomerRelocationMoveGenerator()
+      : base() {
+        Parameters.Add(new LookupParameter<PotvinCustomerRelocationMove>("PotvinCustomerRelocationMove", "The moves that should be generated in subscopes."));
+        Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
+    }
+
+    protected PotvinCustomerRelocationMoveGenerator(PotvinCustomerRelocationMoveGenerator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    protected abstract PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance);
+
+    public override IOperation Apply() {
+      IOperation next = base.Apply();
+
+      PotvinEncoding individual = VRPToursParameter.ActualValue as PotvinEncoding;
+      PotvinCustomerRelocationMove[] moves = GenerateMoves(individual, ProblemInstance);
+      Scope[] moveScopes = new Scope[moves.Length];
+      for (int i = 0; i < moveScopes.Length; i++) {
+        moveScopes[i] = new Scope(i.ToString());
+        moveScopes[i].Variables.Add(new Variable(CustomerRelocationMoveParameter.ActualName, moves[i]));
+      }
+      CurrentScopeParameter.ActualValue.SubScopes.AddRange(moveScopes);
+
+      return next;
+    }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveMaker.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveMaker.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveMaker.cs	(revision 5127)
@@ -0,0 +1,139 @@
+﻿#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;
+using HeuristicLab.Common;
+using HeuristicLab.Problems.VehicleRouting.ProblemInstances;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinCustomerRelocationMoveMaker", "Peforms the customer relocation move on a given VRP encoding and updates the quality.")]
+  [StorableClass]
+  public class PotvinCustomerRelocationMoveMaker : PotvinMoveMaker, IPotvinCustomerRelocationMoveOperator, IMoveMaker {
+    public ILookupParameter<PotvinCustomerRelocationMove> CustomerRelocationMoveParameter {
+      get { return (ILookupParameter<PotvinCustomerRelocationMove>)Parameters["PotvinCustomerRelocationMove"]; }
+    }
+
+    public override ILookupParameter VRPMoveParameter {
+         get { return CustomerRelocationMoveParameter; }
+    }
+
+    public IValueParameter<DoubleValue> SigmaParameter {
+      get { return (IValueParameter<DoubleValue>)Parameters["Sigma"]; }
+    }
+
+    public IValueParameter<DoubleValue> MinPenaltyFactorParameter {
+      get { return (IValueParameter<DoubleValue>)Parameters["MinPenaltyFactor"]; }
+    }
+
+    public IValueParameter<DoubleValue> MaxPenaltyFactorParameter {
+      get { return (IValueParameter<DoubleValue>)Parameters["MaxPenaltyFactor"]; }
+    }
+
+    public ILookupParameter<IMemory> MemoryParameter {
+      get { return (ILookupParameter<IMemory>)Parameters["Memory"]; } 
+    }
+
+    public IValueParameter<StringValue> AdditionFrequencyParameter {
+      get { return (IValueParameter<StringValue>)Parameters["AdditionFrequency"]; }
+    }
+
+    [StorableConstructor]
+    private PotvinCustomerRelocationMoveMaker(bool deserializing) : base(deserializing) { }
+
+    public PotvinCustomerRelocationMoveMaker()
+      : base() {
+      Parameters.Add(new LookupParameter<PotvinCustomerRelocationMove>("PotvinCustomerRelocationMove", "The moves that should be made."));
+      Parameters.Add(new ValueParameter<DoubleValue>("Sigma", "The sigma applied to the penalty factor.", new DoubleValue(0.5)));
+      Parameters.Add(new ValueParameter<DoubleValue>("MinPenaltyFactor", "The minimum penalty factor.", new DoubleValue(-1000.0)));
+      Parameters.Add(new ValueParameter<DoubleValue>("MaxPenaltyFactor", "The maximum penalty factor.", new DoubleValue(1000.0)));
+
+      Parameters.Add(new LookupParameter<IMemory>("Memory", "The TS memory."));
+      Parameters.Add(new ValueParameter<StringValue>("AdditionFrequency", "The key that is used for the addition frequency in the TS memory.", new StringValue("AdditionFrequency")));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PotvinCustomerRelocationMoveMaker(this, cloner);
+    }
+
+    protected PotvinCustomerRelocationMoveMaker(PotvinCustomerRelocationMoveMaker original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public static void Apply(PotvinEncoding solution, PotvinCustomerRelocationMove move) {
+      if (move.Tour >= solution.Tours.Count)
+        solution.Tours.Add(new Tour());
+      Tour tour = solution.Tours[move.Tour];
+
+      Tour oldTour = solution.Tours.Find(t => t.Stops.Contains(move.City));
+      oldTour.Stops.Remove(move.City);
+      /*if (oldTour.Stops.Count == 0)
+        solution.Tours.Remove(oldTour);*/
+
+      int place = solution.FindBestInsertionPlace(tour, move.City);
+
+      tour.Stops.Insert(place, move.City);
+    }
+
+    protected override void PerformMove() {
+      PotvinCustomerRelocationMove move = CustomerRelocationMoveParameter.ActualValue;
+
+      PotvinEncoding newSolution = move.Individual as PotvinEncoding;
+      Apply(newSolution, move);
+      VRPToursParameter.ActualValue = newSolution;
+
+      //reset move quality
+      VRPEvaluation eval = ProblemInstance.EvaluatorParameter.Value.Evaluate(ProblemInstance, newSolution);
+      MoveQualityParameter.ActualValue.Value = eval.Quality;
+
+      //update penalty factor
+      double sigma = SigmaParameter.Value.Value;
+      if (ProblemInstance.EvaluatorParameter.Value.Feasible(eval)) {
+        newSolution.PenaltyFactor /= (1 + sigma);
+        if (newSolution.PenaltyFactor < MinPenaltyFactorParameter.Value.Value)
+          newSolution.PenaltyFactor = MinPenaltyFactorParameter.Value.Value;
+      } else {
+        newSolution.PenaltyFactor *= (1 + sigma);
+        if (newSolution.PenaltyFactor > MaxPenaltyFactorParameter.Value.Value)
+          newSolution.PenaltyFactor = MaxPenaltyFactorParameter.Value.Value;
+      }
+
+      //update memory
+      IMemory memory = MemoryParameter.ActualValue;
+      string key = AdditionFrequencyParameter.Value.Value;
+      ItemDictionary<PotvinCustomerRelocationMoveAttribute, IntValue> additionFrequency =
+        memory.Get(key) as ItemDictionary<PotvinCustomerRelocationMoveAttribute, IntValue>;
+      if (additionFrequency == null) {
+        additionFrequency = new ItemDictionary<PotvinCustomerRelocationMoveAttribute, IntValue>();
+        memory.Put(key, additionFrequency);
+      }
+      PotvinCustomerRelocationMoveAttribute attr = new PotvinCustomerRelocationMoveAttribute(0, move.Tour, move.City);
+      if (!additionFrequency.ContainsKey(attr))
+        additionFrequency[attr] = new IntValue(0);
+
+      additionFrequency[attr].Value++;
+    }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveTabuCriterion.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveTabuCriterion.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveTabuCriterion.cs	(revision 5127)
@@ -0,0 +1,115 @@
+﻿#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.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinCustomerRelocationTabuCriterion", @"Checks if a certain customer relocation move is tabu.")]
+  [StorableClass]
+  public class PotvinCustomerRelocationMoveTabuCriterion : SingleSuccessorOperator, IPotvinCustomerRelocationMoveOperator, ITabuChecker, IPotvinOperator {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+
+    public ILookupParameter<PotvinCustomerRelocationMove> CustomerRelocationMoveParameter {
+      get { return (ILookupParameter<PotvinCustomerRelocationMove>)Parameters["PotvinCustomerRelocationMove"]; }
+    }
+    public ILookupParameter VRPMoveParameter {
+      get { return CustomerRelocationMoveParameter; }
+    }
+    public ILookupParameter<IVRPEncoding> VRPToursParameter {
+      get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
+    }
+    public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter {
+      get { return (LookupParameter<IVRPProblemInstance>)Parameters["ProblemInstance"]; }
+    }  
+
+    public ILookupParameter<ItemList<IItem>> TabuListParameter {
+      get { return (ILookupParameter<ItemList<IItem>>)Parameters["TabuList"]; }
+    }
+    public ILookupParameter<BoolValue> MoveTabuParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters["MoveTabu"]; }
+    }
+    public IValueLookupParameter<BoolValue> MaximizationParameter {
+      get { return (IValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
+    }
+    public ValueParameter<BoolValue> UseAspirationCriterionParameter {
+      get { return (ValueParameter<BoolValue>)Parameters["UseAspirationCriterion"]; }
+    }
+
+    public BoolValue UseAspirationCriterion {
+      get { return UseAspirationCriterionParameter.Value; }
+      set { UseAspirationCriterionParameter.Value = value; }
+    }
+
+    [StorableConstructor]
+    protected PotvinCustomerRelocationMoveTabuCriterion(bool deserializing) : base(deserializing) { }
+    protected PotvinCustomerRelocationMoveTabuCriterion(PotvinCustomerRelocationMoveTabuCriterion original, Cloner cloner) : base(original, cloner) { }
+    public PotvinCustomerRelocationMoveTabuCriterion()
+      : base() {
+      Parameters.Add(new LookupParameter<PotvinCustomerRelocationMove>("PotvinCustomerRelocationMove", "The moves that should be made."));
+      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours considered in the move."));
+      Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance"));
+
+      Parameters.Add(new LookupParameter<BoolValue>("MoveTabu", "The variable to store if a move was tabu."));
+      Parameters.Add(new LookupParameter<ItemList<IItem>>("TabuList", "The tabu list."));
+      Parameters.Add(new ValueParameter<BoolValue>("UseAspirationCriterion", "Whether to use the aspiration criterion or not.", new BoolValue(true)));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, else if it is a minimization problem."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The quality of the current move."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PotvinCustomerRelocationMoveTabuCriterion(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      ItemList<IItem> tabuList = TabuListParameter.ActualValue;
+      double moveQuality = MoveQualityParameter.ActualValue.Value;
+      bool useAspiration = UseAspirationCriterion.Value;
+      bool isTabu = false;
+      PotvinCustomerRelocationMove move = CustomerRelocationMoveParameter.ActualValue;
+
+      foreach (IItem tabuMove in tabuList) {
+        PotvinCustomerRelocationMoveAttribute attribute = tabuMove as PotvinCustomerRelocationMoveAttribute;
+
+        if (!useAspiration || moveQuality >= attribute.MoveQuality) {
+          if (attribute.City == move.City && attribute.Tour == move.Tour) {
+            isTabu = true;
+            break;
+          }
+        }
+      }
+      
+      MoveTabuParameter.ActualValue = new BoolValue(isTabu);
+      return base.Apply();
+    }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveTabuMaker.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveTabuMaker.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveTabuMaker.cs	(revision 5127)
@@ -0,0 +1,67 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinCustomerRelocationMoveTabuMaker", "Declares a given customer relocation move as tabu.")]
+  [StorableClass]
+  public class PotvinCustomerRelocationMoveTabuMaker : TabuMaker, IPotvinCustomerRelocationMoveOperator, IPotvinOperator {
+    public ILookupParameter<PotvinCustomerRelocationMove> CustomerRelocationMoveParameter {
+      get { return (ILookupParameter<PotvinCustomerRelocationMove>)Parameters["PotvinCustomerRelocationMove"]; }
+    }
+    public ILookupParameter VRPMoveParameter {
+      get { return CustomerRelocationMoveParameter; }
+    }
+    public ILookupParameter<IVRPEncoding> VRPToursParameter {
+      get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
+    }
+    public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter {
+      get { return (LookupParameter<IVRPProblemInstance>)Parameters["ProblemInstance"]; }
+    }
+
+    [StorableConstructor]
+    protected PotvinCustomerRelocationMoveTabuMaker(bool deserializing) : base(deserializing) { }
+    protected PotvinCustomerRelocationMoveTabuMaker(PotvinCustomerRelocationMoveTabuMaker original, Cloner cloner) : base(original, cloner) { }
+    public PotvinCustomerRelocationMoveTabuMaker()
+      : base() {
+        Parameters.Add(new LookupParameter<PotvinCustomerRelocationMove>("PotvinCustomerRelocationMove", "The moves that should be made."));
+        Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours considered in the move."));
+        Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance"));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PotvinCustomerRelocationMoveTabuMaker(this, cloner);
+    }
+
+    protected override IItem GetTabuAttribute(bool maximization, double quality, double moveQuality) {
+      PotvinCustomerRelocationMove move = CustomerRelocationMoveParameter.ActualValue;
+      double baseQuality = moveQuality;
+      //if (quality < moveQuality) baseQuality = quality; // we make an uphill move, the lower bound is the solution quality
+      return new PotvinCustomerRelocationMoveAttribute(baseQuality, move.OldTour, move.City);
+    }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMultiMoveGenerator.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMultiMoveGenerator.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMultiMoveGenerator.cs	(revision 5127)
@@ -0,0 +1,71 @@
+﻿#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.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Parameters;
+using System.Collections.Generic;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+using HeuristicLab.Common;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinCustomerRelocationMultiMoveGenerator", "Generates customer relocation moves from a given VRP encoding.")]
+  [StorableClass]
+  public sealed class PotvinCustomerRelocationMultiMoveGenerator : PotvinCustomerRelocationMoveGenerator, IMultiMoveGenerator {
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+
+    public IValueLookupParameter<IntValue> SampleSizeParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["SampleSize"]; }
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PotvinCustomerRelocationMultiMoveGenerator(this, cloner);
+    }
+
+    [StorableConstructor]
+    private PotvinCustomerRelocationMultiMoveGenerator(bool deserializing) : base(deserializing) { }
+
+    public PotvinCustomerRelocationMultiMoveGenerator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
+    }
+
+    private PotvinCustomerRelocationMultiMoveGenerator(PotvinCustomerRelocationMoveGenerator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    protected override PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {
+      List<PotvinCustomerRelocationMove> result = new List<PotvinCustomerRelocationMove>();
+
+      for (int i = 0; i < SampleSizeParameter.ActualValue.Value; i++) {
+        result.Add(PotvinCustomerRelocationSingleMoveGenerator.Apply(individual, ProblemInstance, RandomParameter.ActualValue));
+      }
+
+      return result.ToArray();
+    }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationSingleMoveGenerator.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationSingleMoveGenerator.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationSingleMoveGenerator.cs	(revision 5127)
@@ -0,0 +1,92 @@
+﻿#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.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Parameters;
+using System.Collections.Generic;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+using HeuristicLab.Common;
+using HeuristicLab.Data;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinCustomerRelocationSingleMoveGenerator", "Generates a single customer relocation move from a given VRP encoding.")]
+  [StorableClass]
+  public sealed class PotvinCustomerRelocationSingleMoveGenerator : PotvinCustomerRelocationMoveGenerator,
+    ISingleMoveGenerator, IMultiVRPMoveGenerator {
+    #region IMultiVRPMoveOperator Members
+
+    public override ILookupParameter VRPMoveParameter {
+      get { return (ILookupParameter)Parameters["PotvinCustomerRelocationMove"]; }
+    }
+
+    #endregion
+    
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PotvinCustomerRelocationSingleMoveGenerator(this, cloner);
+    }
+
+    [StorableConstructor]
+    private PotvinCustomerRelocationSingleMoveGenerator(bool deserializing) : base(deserializing) { }
+
+    public PotvinCustomerRelocationSingleMoveGenerator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
+    }
+
+    private PotvinCustomerRelocationSingleMoveGenerator(PotvinCustomerRelocationMoveGenerator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public static PotvinCustomerRelocationMove Apply(PotvinEncoding individual, IVRPProblemInstance problemInstance, IRandom rand) {
+      int city = 1 + rand.Next(individual.Cities);
+      Tour oldTour = individual.Tours.Find(t => t.Stops.Contains(city));
+      int oldTourIndex = individual.Tours.IndexOf(oldTour);
+
+      int max = individual.Tours.Count;
+      if (individual.Tours.Count < problemInstance.Vehicles.Value)
+        max = max - 1;
+
+      int newTourIndex = rand.Next(max);
+      if (newTourIndex >= oldTourIndex)
+        newTourIndex++;
+
+      return new PotvinCustomerRelocationMove(city, oldTourIndex, newTourIndex, individual);
+    }
+
+    protected override PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {
+      List<PotvinCustomerRelocationMove> result = new List<PotvinCustomerRelocationMove>();
+
+      PotvinCustomerRelocationMove move = Apply(individual, ProblemInstance, RandomParameter.ActualValue);
+      if (move != null)
+        result.Add(move);
+
+      return result.ToArray();
+    }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PotvinMoveEvaluator.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PotvinMoveEvaluator.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PotvinMoveEvaluator.cs	(revision 5127)
@@ -0,0 +1,46 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinMoveEvaluator", "Evaluates a Potvin VRP move.")]
+  [StorableClass]
+  public abstract class PotvinMoveEvaluator: VRPMoveEvaluator, IPotvinOperator {
+       [StorableConstructor]
+    protected PotvinMoveEvaluator(bool deserializing) : base(deserializing) { }
+
+       public PotvinMoveEvaluator()
+      : base() {
+    }
+
+       protected PotvinMoveEvaluator(PotvinMoveEvaluator original, Cloner cloner)
+         : base(original, cloner) {
+       }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PotvinMoveGenerator.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PotvinMoveGenerator.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PotvinMoveGenerator.cs	(revision 5127)
@@ -0,0 +1,56 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinMoveGenerator", "Generates Potvin VRP moves.")]
+  [StorableClass]
+  public abstract class PotvinMoveGenerator : VRPMoveGenerator, IPotvinOperator {    
+    [StorableConstructor]
+    protected PotvinMoveGenerator(bool deserializing) : base(deserializing) { }
+
+    public PotvinMoveGenerator()
+      : base() {
+    }
+
+    protected PotvinMoveGenerator(PotvinMoveGenerator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public override IOperation Apply() {
+      IVRPEncoding solution = VRPToursParameter.ActualValue;
+      if (!(solution is PotvinEncoding)) {
+        VRPToursParameter.ActualValue = PotvinEncoding.ConvertFrom(solution, ProblemInstance);
+      }
+      
+      return base.Apply();
+    }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PotvinMoveMaker.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PotvinMoveMaker.cs	(revision 5127)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PotvinMoveMaker.cs	(revision 5127)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinMoveMaker", "Makes a Potvin VRP move.")]
+  [StorableClass]
+  public abstract class PotvinMoveMaker : VRPMoveMaker, IPotvinOperator {    
+    [StorableConstructor]
+    protected PotvinMoveMaker(bool deserializing) : base(deserializing) { }
+
+    public PotvinMoveMaker()
+      : base() {
+    }
+
+    protected PotvinMoveMaker(PotvinMoveMaker original, Cloner cloner)
+      : base(original, cloner) {
+    }
+  }
+}
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/PotvinEncoding.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/PotvinEncoding.cs	(revision 5126)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/PotvinEncoding.cs	(revision 5127)
@@ -39,7 +39,11 @@
     public List<int> Unrouted { get; set; }
 
+    [Storable]
+    public double PenaltyFactor { get; set; }
+
     public PotvinEncoding(IVRPProblemInstance instance)
       : base(instance) {
       Unrouted = new List<int>();
+      PenaltyFactor = 1;
     }
 
@@ -56,4 +60,5 @@
       : base(original, cloner) {
         this.Unrouted = new List<int>(original.Unrouted);
+        this.PenaltyFactor = original.PenaltyFactor;
     }
 
@@ -72,4 +77,8 @@
 
       return solution;
+    }
+
+    public double EvaluateTour(Tour tour) {
+      return ProblemInstance.Evaluate(tour);
     }
 
@@ -91,4 +100,27 @@
 
       return length;
+    }
+
+    public int FindBestInsertionPlace(Tour tour, int city) {
+      int place = -1;
+      double minQuality = -1;
+
+      for (int i = 0; i <= tour.Stops.Count; i++) {
+        tour.Stops.Insert(i, city);
+
+        double quality = EvaluateTour(tour);
+
+        if (place < 0 || quality < minQuality) {
+          place = i;
+          minQuality = quality;
+        }
+
+        tour.Stops.RemoveAt(i);
+      }
+
+      if (place == -1)
+        place = 0;
+
+      return place;
     }
 
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/HeuristicLab.Problems.VehicleRouting-3.4.csproj
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/HeuristicLab.Problems.VehicleRouting-3.4.csproj	(revision 5126)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/HeuristicLab.Problems.VehicleRouting-3.4.csproj	(revision 5127)
@@ -189,4 +189,6 @@
     <Compile Include="Encodings\GVR\Manipulators\GVRManipulator.cs" />
     <Compile Include="Encodings\GVR\Manipulators\GVRSwapManipulator.cs" />
+    <Compile Include="Encodings\Potvin\Creators\PotvinCreator.cs" />
+    <Compile Include="Encodings\Potvin\Creators\IterativeInsertionCreator.cs" />
     <Compile Include="Encodings\Potvin\Crossovers\PotvinCrossover.cs" />
     <Compile Include="Encodings\Potvin\Crossovers\PotvinRouteBasedCrossover.cs" />
@@ -197,4 +199,19 @@
     <Compile Include="Encodings\Potvin\Manipulators\PotvinOneLevelExchangeManipulator.cs" />
     <Compile Include="Encodings\Potvin\Manipulators\PotvinTwoLevelExchangeManipulator.cs" />
+    <Compile Include="Encodings\General\Moves\VRPMoveAttribute.cs" />
+    <Compile Include="Encodings\Potvin\Moves\CustomerRelocation\PotvinCustomerRelocationMoveTabuMaker.cs" />
+    <Compile Include="Encodings\Potvin\Moves\CustomerRelocation\PotvinCustomerRelocationSingleMoveGenerator.cs" />
+    <Compile Include="Encodings\Potvin\Moves\CustomerRelocation\PotvinCustomerRelocationMultiMoveGenerator.cs" />
+    <Compile Include="Encodings\Potvin\Moves\CustomerRelocation\PotvinCustomerRelocationExhaustiveMoveGenerator.cs" />
+    <Compile Include="Encodings\Potvin\Moves\CustomerRelocation\PotvinCustomerRelocationMoveEvaluator.cs" />
+    <Compile Include="Encodings\Potvin\Moves\CustomerRelocation\PotvinCustomerRelocationMoveMaker.cs" />
+    <Compile Include="Encodings\Potvin\Moves\CustomerRelocation\IPotvinCustomerRelocationMoveOperator.cs" />
+    <Compile Include="Encodings\Potvin\Moves\CustomerRelocation\PotvinCustomerRelocationMoveAttribute.cs" />
+    <Compile Include="Encodings\Potvin\Moves\CustomerRelocation\PotvinCustomerRelocationMoveTabuCriterion.cs" />
+    <Compile Include="Encodings\Potvin\Moves\PotvinMoveEvaluator.cs" />
+    <Compile Include="Encodings\Potvin\Moves\PotvinMoveGenerator.cs" />
+    <Compile Include="Encodings\Potvin\Moves\PotvinMoveMaker.cs" />
+    <Compile Include="Encodings\Potvin\Moves\CustomerRelocation\PotvinCustomerRelocationMoveGenerator.cs" />
+    <Compile Include="Encodings\Potvin\Moves\CustomerRelocation\PotvinCustomerRelocationMove.cs" />
     <Compile Include="Encodings\Potvin\PotvinEncoding.cs" />
     <Compile Include="Encodings\Prins\Crossovers\PrinsCrossover.cs" />
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPProblemInstance.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPProblemInstance.cs	(revision 5126)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPProblemInstance.cs	(revision 5127)
@@ -76,5 +76,5 @@
     public CVRPProblemInstance() {
       Parameters.Add(new ValueParameter<DoubleValue>("Capacity", "The capacity of each vehicle.", new DoubleValue(0)));
-      Parameters.Add(new ValueParameter<DoubleValue>("EvalOverloadPenalty", "The overload penalty considered in the evaluation.", new DoubleValue(100)));
+      Parameters.Add(new ValueParameter<DoubleValue>("EvalOverloadPenalty", "The overload penalty considered in the evaluation.", new DoubleValue(1)));
 
       AttachEventHandlers();
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWProblemInstance.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWProblemInstance.cs	(revision 5126)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWProblemInstance.cs	(revision 5127)
@@ -102,5 +102,5 @@
 
       Parameters.Add(new ValueParameter<DoubleValue>("EvalTimeFactor", "The time factor considered in the evaluation.", new DoubleValue(0)));
-      Parameters.Add(new ValueParameter<DoubleValue>("EvalTardinessPenalty", "The tardiness penalty considered in the evaluation.", new DoubleValue(100)));
+      Parameters.Add(new ValueParameter<DoubleValue>("EvalTardinessPenalty", "The tardiness penalty considered in the evaluation.", new DoubleValue(1)));
 
       AttachEventHandlers();
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPEvaluator.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPEvaluator.cs	(revision 5126)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPEvaluator.cs	(revision 5127)
@@ -55,4 +55,8 @@
       get { return (ILookupParameter<DoubleValue>)Parameters["VehiclesUtilized"]; }
     }
+
+    public ILookupParameter<DoubleValue> PenaltyParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Penalty"]; }
+    }
     
     [StorableConstructor]
@@ -65,4 +69,6 @@
       Parameters.Add(new LookupParameter<DoubleValue>("Distance", "The distance."));
       Parameters.Add(new LookupParameter<DoubleValue>("VehiclesUtilized", "The number of vehicles utilized."));
+
+      Parameters.Add(new LookupParameter<DoubleValue>("Penalty", "The applied penalty."));
     }
 
@@ -81,4 +87,5 @@
       VehcilesUtilizedParameter.ActualValue = new DoubleValue(0);
       DistanceParameter.ActualValue = new DoubleValue(0);
+      PenaltyParameter.ActualValue = new DoubleValue(0);
     }
 
@@ -87,4 +94,5 @@
       VehcilesUtilizedParameter.ActualValue.Value = tourEvaluation.VehicleUtilization;
       DistanceParameter.ActualValue.Value = tourEvaluation.Distance;
+      PenaltyParameter.ActualValue.Value = tourEvaluation.Penalty;
     }
 
Index: /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPProblemInstance.cs
===================================================================
--- /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPProblemInstance.cs	(revision 5126)
+++ /branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPProblemInstance.cs	(revision 5127)
@@ -221,5 +221,5 @@
       Parameters.Add(new ValueParameter<DoubleArray>("Demand", "The demand of each customer.", new DoubleArray()));
 
-      Parameters.Add(new ValueParameter<DoubleValue>("EvalFleetUsageFactor", "The fleet usage factor considered in the evaluation.", new DoubleValue(100)));
+      Parameters.Add(new ValueParameter<DoubleValue>("EvalFleetUsageFactor", "The fleet usage factor considered in the evaluation.", new DoubleValue(0)));
       Parameters.Add(new ValueParameter<DoubleValue>("EvalDistanceFactor", "The distance factor considered in the evaluation.", new DoubleValue(1)));
 
