Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveTabuCriterion.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveTabuCriterion.cs	(revision 7790)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveTabuCriterion.cs	(revision 7791)
@@ -140,4 +140,8 @@
             quality += attribute.Tardiness * vrptw.TardinessPenalty.Value;
 
+          IPickupAndDeliveryProblemInstance pdp = instance as IPickupAndDeliveryProblemInstance;
+          if (pdp != null)
+            quality += attribute.PickupViolations * pdp.PickupViolationPenalty.Value;
+
           if (!useAspiration || moveQuality >= quality) {
             if ((attribute.City == move.City && attribute.Tour == move.Tour) ||
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveTabuMaker.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveTabuMaker.cs	(revision 7790)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveTabuMaker.cs	(revision 7791)
@@ -73,4 +73,7 @@
       get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; }
     }
+    public ILookupParameter<IntValue> PickupViolationsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["PickupViolations"]; }
+    }
 
     [StorableConstructor]
@@ -92,4 +95,5 @@
         Parameters.Add(new LookupParameter<DoubleValue>("Overload", "The overload of the individual"));
         Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness of the individual"));
+        Parameters.Add(new LookupParameter<IntValue>("PickupViolations", "The number of pickup violations."));
     }
 
@@ -128,6 +132,10 @@
         tardiness = TardinessParameter.ActualValue.Value;
 
-      tabuList.Add(new PotvinPDRelocateMoveAttribute(baseQuality, move.OldTour, move.City, distance, overload, tardiness));
-      tabuList.Add(new PotvinPDRelocateMoveAttribute(baseQuality, move.Tour, move.Replaced, distance, overload, tardiness));
+      int pickupViolations = 0;
+      if (PickupViolationsParameter.ActualValue != null)
+        pickupViolations = PickupViolationsParameter.ActualValue.Value;
+
+      tabuList.Add(new PotvinPDRelocateMoveAttribute(baseQuality, move.OldTour, move.City, distance, overload, tardiness, pickupViolations));
+      tabuList.Add(new PotvinPDRelocateMoveAttribute(baseQuality, move.Tour, move.Replaced, distance, overload, tardiness, pickupViolations));
       return base.Apply();
     }
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveTabuCriterion.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveTabuCriterion.cs	(revision 7790)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveTabuCriterion.cs	(revision 7791)
@@ -140,4 +140,8 @@
             quality += attribute.Tardiness * vrptw.TardinessPenalty.Value;
 
+          IPickupAndDeliveryProblemInstance pdp = instance as IPickupAndDeliveryProblemInstance;
+          if (pdp != null)
+            quality += attribute.PickupViolations * pdp.PickupViolationPenalty.Value;
+
           if (!useAspiration || moveQuality >= quality) {
             if (attribute.City == move.City && attribute.Tour == move.Tour) {
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveTabuMaker.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveTabuMaker.cs	(revision 7790)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveTabuMaker.cs	(revision 7791)
@@ -55,4 +55,7 @@
       get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; }
     }
+    public ILookupParameter<IntValue> PickupViolationsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["PickupViolations"]; }
+    }
 
     [StorableConstructor]
@@ -68,4 +71,5 @@
         Parameters.Add(new LookupParameter<DoubleValue>("Overload", "The overload of the individual"));
         Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness of the individual"));
+        Parameters.Add(new LookupParameter<IntValue>("PickupViolations", "The number of pickup violations."));
     }
 
@@ -91,5 +95,9 @@
         tardiness = TardinessParameter.ActualValue.Value;
 
-      return new PotvinPDRelocateMoveAttribute(baseQuality, move.Tour, move.City, distance, overload, tardiness);
+      int pickupViolations = 0;
+      if (PickupViolationsParameter.ActualValue != null)
+        pickupViolations = PickupViolationsParameter.ActualValue.Value;
+
+      return new PotvinPDRelocateMoveAttribute(baseQuality, move.Tour, move.City, distance, overload, tardiness, pickupViolations);
     }
   }
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftExhaustiveMoveGenerator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftExhaustiveMoveGenerator.cs	(revision 7790)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftExhaustiveMoveGenerator.cs	(revision 7791)
@@ -54,5 +54,5 @@
 
       int max = individual.Tours.Count;
-      if (individual.Tours.Count < problemInstance.Vehicles.Value)
+      if (individual.Tours.Count >= problemInstance.Vehicles.Value)
         max = max - 1;
 
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveMaker.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveMaker.cs	(revision 7790)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveMaker.cs	(revision 7791)
@@ -30,4 +30,5 @@
 using HeuristicLab.Problems.VehicleRouting.Interfaces;
 using HeuristicLab.Problems.VehicleRouting.Variants;
+using System.Collections.Generic;
 
 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
@@ -60,6 +61,10 @@
 
     public static void Apply(PotvinEncoding solution, PotvinPDShiftMove move, IVRPProblemInstance problemInstance) {
-      if (move.Tour >= solution.Tours.Count)
+      bool newTour = false;
+
+      if (move.Tour >= solution.Tours.Count) {
         solution.Tours.Add(new Tour());
+        newTour = true;
+      }
       Tour tour = solution.Tours[move.Tour];
 
@@ -80,4 +85,37 @@
       }
 
+      if (newTour) {
+        List<int> vehicles = new List<int>();
+        for (int i = move.Tour; i < problemInstance.Vehicles.Value; i++) {
+          vehicles.Add(solution.GetVehicleAssignment(i));
+        }
+
+        double bestQuality = double.MaxValue;
+        int bestVehicle = -1;
+
+        int originalVehicle = solution.GetVehicleAssignment(move.Tour);
+        foreach (int vehicle in vehicles) {
+          solution.VehicleAssignment[move.Tour] = vehicle;
+
+          double quality = problemInstance.EvaluateTour(tour, solution).Quality;
+          if (quality < bestQuality) {
+            bestQuality = quality;
+            bestVehicle = vehicle;
+          }
+        }
+
+        solution.VehicleAssignment[move.Tour] = originalVehicle;
+
+        int index = -1;
+        for (int i = move.Tour; i < solution.VehicleAssignment.Length; i++) {
+          if (solution.VehicleAssignment[i] == bestVehicle) {
+            index = i;
+            break;
+          }
+        }
+        solution.VehicleAssignment[index] = originalVehicle;
+        solution.VehicleAssignment[move.Tour] = bestVehicle;
+      }
+
       solution.Repair();
     }
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveTabuCriterion.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveTabuCriterion.cs	(revision 7790)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveTabuCriterion.cs	(revision 7791)
@@ -140,4 +140,8 @@
             quality += attribute.Tardiness * vrptw.TardinessPenalty.Value;
 
+          IPickupAndDeliveryProblemInstance pdp = instance as IPickupAndDeliveryProblemInstance;
+          if (pdp != null)
+            quality += attribute.PickupViolations * pdp.PickupViolationPenalty.Value;
+
           if (!useAspiration || moveQuality >= quality) {
             if (attribute.City == move.City && attribute.Tour == move.Tour) {
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveTabuMaker.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveTabuMaker.cs	(revision 7790)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveTabuMaker.cs	(revision 7791)
@@ -54,4 +54,7 @@
       get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; }
     }
+    public ILookupParameter<IntValue> PickupViolationsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["PickupViolations"]; }
+    }
 
     [StorableConstructor]
@@ -67,4 +70,5 @@
         Parameters.Add(new LookupParameter<DoubleValue>("Overload", "The overload of the individual"));
         Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness of the individual"));
+        Parameters.Add(new LookupParameter<IntValue>("PickupViolations", "The number of pickup violations."));
     }
 
@@ -89,6 +93,10 @@
       if (TardinessParameter.ActualValue != null)
         tardiness = TardinessParameter.ActualValue.Value;
+
+      int pickupViolations = 0;
+      if (PickupViolationsParameter.ActualValue != null)
+        pickupViolations = PickupViolationsParameter.ActualValue.Value;
       
-      return new PotvinPDRelocateMoveAttribute(baseQuality, move.OldTour, move.City, distance, overload, tardiness);
+      return new PotvinPDRelocateMoveAttribute(baseQuality, move.OldTour, move.City, distance, overload, tardiness, pickupViolations);
     }
   }
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftSingleMoveGenerator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftSingleMoveGenerator.cs	(revision 7790)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftSingleMoveGenerator.cs	(revision 7791)
@@ -66,5 +66,5 @@
       }
 
-      if (cities.Count > 1 && individual.Tours.Count > 1) {
+      if (cities.Count >= 1) {
         int city = cities[rand.Next(cities.Count)];
         Tour oldTour = individual.Tours.Find(t => t.Stops.Contains(city));
@@ -72,5 +72,5 @@
 
         int max = individual.Tours.Count;
-        if (individual.Tours.Count < problemInstance.Vehicles.Value)
+        if (individual.Tours.Count >= problemInstance.Vehicles.Value)
           max = max - 1;
 
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PotvinPDRelocateMoveAttribute.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PotvinPDRelocateMoveAttribute.cs	(revision 7790)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PotvinPDRelocateMoveAttribute.cs	(revision 7791)
@@ -40,4 +40,6 @@
     [Storable]
     public double Tardiness { get; private set; }
+    [Storable]
+    public int PickupViolations { get; private set; }
 
     [StorableConstructor]
@@ -50,7 +52,8 @@
         this.Overload = original.Overload;
         this.Tardiness = original.Tardiness;
+        this.PickupViolations = original.PickupViolations;
     }
-    public PotvinPDRelocateMoveAttribute(double moveQuality, int tour, int city, 
-      double distance, double overload, double tardiness)
+    public PotvinPDRelocateMoveAttribute(double moveQuality, int tour, int city,
+      double distance, double overload, double tardiness, int pickupViolations)
       : base(moveQuality) {
       Tour = tour;
@@ -59,4 +62,5 @@
       Overload = overload;
       Tardiness = tardiness;
+      PickupViolations = pickupViolations;
     }
 
