Index: /branches/ScatterSearch (trunk integration)/HeuristicLab.Optimization.Operators/3.3/SimilarityCalculator.cs
===================================================================
--- /branches/ScatterSearch (trunk integration)/HeuristicLab.Optimization.Operators/3.3/SimilarityCalculator.cs	(revision 7792)
+++ /branches/ScatterSearch (trunk integration)/HeuristicLab.Optimization.Operators/3.3/SimilarityCalculator.cs	(revision 7793)
@@ -65,8 +65,8 @@
 
       if (left == right) return 0;
-      else return CalculateDiversity(left, right);
+      else return CalculateSimilarity(left, right);
     }
 
-    protected abstract double CalculateDiversity(IScope left, IScope right);
+    protected abstract double CalculateSimilarity(IScope left, IScope right);
   }
 }
Index: /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.Knapsack/3.3/SimilarityCalculators/KnapsackSimilarityCalculator.cs
===================================================================
--- /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.Knapsack/3.3/SimilarityCalculators/KnapsackSimilarityCalculator.cs	(revision 7792)
+++ /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.Knapsack/3.3/SimilarityCalculators/KnapsackSimilarityCalculator.cs	(revision 7793)
@@ -42,5 +42,5 @@
     }
 
-    protected override double CalculateDiversity(IScope left, IScope right) {
+    protected override double CalculateSimilarity(IScope left, IScope right) {
       BinaryVector sol1 = left.Variables[TargetParameter.ActualName].Value as BinaryVector;
       BinaryVector sol2 = right.Variables[TargetParameter.ActualName].Value as BinaryVector;
Index: /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.TestFunctions/3.3/SimilarityCalculators/SingleObjectiveTestFunctionSimilarityCalculator.cs
===================================================================
--- /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.TestFunctions/3.3/SimilarityCalculators/SingleObjectiveTestFunctionSimilarityCalculator.cs	(revision 7792)
+++ /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.TestFunctions/3.3/SimilarityCalculators/SingleObjectiveTestFunctionSimilarityCalculator.cs	(revision 7793)
@@ -63,5 +63,5 @@
     }
 
-    protected override double CalculateDiversity(IScope left, IScope right) {
+    protected override double CalculateSimilarity(IScope left, IScope right) {
       RealVector sol1 = left.Variables["Point"].Value as RealVector;
       RealVector sol2 = right.Variables["Point"].Value as RealVector;
Index: /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.TravelingSalesman/3.3/SimilarityCalculators/TSPSimilarityCalculator.cs
===================================================================
--- /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.TravelingSalesman/3.3/SimilarityCalculators/TSPSimilarityCalculator.cs	(revision 7792)
+++ /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.TravelingSalesman/3.3/SimilarityCalculators/TSPSimilarityCalculator.cs	(revision 7793)
@@ -42,5 +42,5 @@
     }
 
-    protected override double CalculateDiversity(IScope left, IScope right) {
+    protected override double CalculateSimilarity(IScope left, IScope right) {
       Permutation v1 = left.Variables[TargetParameter.ActualName].Value as Permutation;
       Permutation v2 = right.Variables[TargetParameter.ActualName].Value as Permutation;
Index: /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/HeuristicLab.Problems.VehicleRouting-3.3.csproj
===================================================================
--- /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/HeuristicLab.Problems.VehicleRouting-3.3.csproj	(revision 7792)
+++ /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/HeuristicLab.Problems.VehicleRouting-3.3.csproj	(revision 7793)
@@ -119,7 +119,10 @@
     <Compile Include="Encodings\Potvin\Crossovers\PotvinInsertionBasedCrossover.cs" />
     <Compile Include="Encodings\Potvin\Manipulators\PotvinLocalSearchManipulator.cs" />
+    <Compile Include="Improvers\VRPImprovementOperator.cs" />
     <Compile Include="Interfaces\IVRPMultiNeighborhoodShakingOperator.cs" />
+    <Compile Include="PathRelinkers\VRPPathRelinker.cs" />
     <Compile Include="Plugin.cs" />
     <Compile Include="ShakingOperators\VehicleRoutingShakingOperator.cs" />
+    <Compile Include="SimilarityCalculators\VRPSimilarityCalculator.cs" />
     <Compile Include="SolutionParser.cs" />
     <Compile Include="Encodings\Alba\Crossovers\AlbaPermutationCrossover.cs" />
Index: /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/Improvers/VRPImprovementOperator.cs
===================================================================
--- /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/Improvers/VRPImprovementOperator.cs	(revision 7793)
+++ /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/Improvers/VRPImprovementOperator.cs	(revision 7793)
@@ -0,0 +1,160 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Optimization.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Potvin;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  /// <summary>
+  /// An operator that improves vehicle routing solutions.
+  /// </summary>
+  [Item("VRPImprovementOperator", "An operator that improves vehicle routing solutions.")]
+  [StorableClass]
+  public sealed class VRPImprovementOperator : SingleSuccessorOperator, IImprovementOperator {
+    #region Parameter properties
+    public ILookupParameter<DoubleValue> CapacityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Capacity"]; }
+    }
+    public ILookupParameter<DoubleMatrix> CoordinatesParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
+    }
+    public ScopeParameter CurrentScopeParameter {
+      get { return (ScopeParameter)Parameters["CurrentScope"]; }
+    }
+    public ILookupParameter<DoubleArray> DemandParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["Demand"]; }
+    }
+    public ILookupParameter<DoubleValue> EvalDistanceFactorParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalDistanceFactor"]; }
+    }
+    public ILookupParameter<DoubleMatrix> DistanceMatrixParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
+    }
+    public ILookupParameter<DoubleArray> DueTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["DueTime"]; }
+    }
+    public ILookupParameter<IEvaluator> EvaluatorParameter {
+      get { return (ILookupParameter<IEvaluator>)Parameters["Evaluator"]; }
+    }
+    public ILookupParameter<DoubleValue> EvalFleetUsageFactorParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalFleetUsageFactor"]; }
+    }
+    public IValueParameter<IntValue> ImprovementAttemptsParameter {
+      get { return (IValueParameter<IntValue>)Parameters["ImprovementAttempts"]; }
+    }
+    public IValueParameter<IntValue> LambdaParameter {
+      get { return (IValueParameter<IntValue>)Parameters["Lambda"]; }
+    }
+    public ILookupParameter<DoubleValue> EvalOverloadPenaltyParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalOverloadPenalty"]; }
+    }
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public ILookupParameter<DoubleArray> ReadyTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["ReadyTime"]; }
+    }
+    public IValueParameter<IntValue> SampleSizeParameter {
+      get { return (IValueParameter<IntValue>)Parameters["SampleSize"]; }
+    }
+    public ILookupParameter<DoubleArray> ServiceTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["ServiceTime"]; }
+    }
+    public ILookupParameter<DoubleValue> EvalTardinessPenaltyParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalTardinessPenalty"]; }
+    }
+    public IValueLookupParameter<IItem> TargetParameter {
+      get { return (IValueLookupParameter<IItem>)Parameters["Target"]; }
+    }
+    public ILookupParameter<DoubleValue> EvalTimeFactorParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalTimeFactor"]; }
+    }
+    public ILookupParameter<BoolValue> UseDistanceMatrixParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters["UseDistanceMatrix"]; }
+    }
+    public ILookupParameter<IntValue> VehiclesParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["Vehicles"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private VRPImprovementOperator(bool deserializing) : base(deserializing) { }
+    private VRPImprovementOperator(VRPImprovementOperator original, Cloner cloner) : base(original, cloner) { }
+    public VRPImprovementOperator()
+      : base() {
+      #region Create parameters
+      Parameters.Add(new LookupParameter<DoubleValue>("Capacity"));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates"));
+      Parameters.Add(new ScopeParameter("CurrentScope"));
+      Parameters.Add(new LookupParameter<DoubleArray>("Demand"));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalDistanceFactor"));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix"));
+      Parameters.Add(new LookupParameter<DoubleArray>("DueTime"));
+      Parameters.Add(new LookupParameter<IEvaluator>("Evaluator"));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalFleetUsageFactor"));
+      Parameters.Add(new ValueParameter<IntValue>("ImprovementAttempts", new IntValue(100)));
+      Parameters.Add(new ValueParameter<IntValue>("Lambda", new IntValue(1)));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalOverloadPenalty"));
+      Parameters.Add(new LookupParameter<IRandom>("Random"));
+      Parameters.Add(new LookupParameter<DoubleArray>("ReadyTime"));
+      Parameters.Add(new ValueParameter<IntValue>("SampleSize", new IntValue(100)));
+      Parameters.Add(new LookupParameter<DoubleArray>("ServiceTime"));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalTardinessPenalty"));
+      Parameters.Add(new ValueLookupParameter<IItem>("Target"));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalTimeFactor"));
+      Parameters.Add(new LookupParameter<BoolValue>("UseDistanceMatrix"));
+      Parameters.Add(new LookupParameter<IntValue>("Vehicles"));
+      #endregion
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new VRPImprovementOperator(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      AlbaEncoding solution = TargetParameter.ActualValue is AlbaEncoding ?
+        TargetParameter.ActualValue as AlbaEncoding :
+        AlbaEncoding.ConvertFrom(TargetParameter.ActualValue as IVRPEncoding, VehiclesParameter.ActualValue.Value, DistanceMatrixParameter);
+
+      double quality = -1;
+      int evaluatedSolutions;
+
+      AlbaLambdaInterchangeLocalImprovementOperator.Apply(solution, ImprovementAttemptsParameter.Value.Value, LambdaParameter.Value.Value,
+        SampleSizeParameter.Value.Value, RandomParameter.ActualValue, ref quality, out evaluatedSolutions, DistanceMatrixParameter.ActualValue,
+        VehiclesParameter.ActualValue, DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,
+        DemandParameter.ActualValue, CapacityParameter.ActualValue, CoordinatesParameter.ActualValue, EvalFleetUsageFactorParameter.ActualValue,
+        EvalTimeFactorParameter.ActualValue, EvalDistanceFactorParameter.ActualValue, EvalOverloadPenaltyParameter.ActualValue,
+        EvalTardinessPenaltyParameter.ActualValue, UseDistanceMatrixParameter.ActualValue);
+
+      TargetParameter.ActualValue = PotvinEncoding.ConvertFrom(solution, DistanceMatrixParameter);
+
+      return base.Apply();
+    }
+  }
+}
Index: /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/PathRelinkers/VRPPathRelinker.cs
===================================================================
--- /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/PathRelinkers/VRPPathRelinker.cs	(revision 7793)
+++ /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/PathRelinkers/VRPPathRelinker.cs	(revision 7793)
@@ -0,0 +1,56 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  /// <summary>
+  /// An operator that relinks paths between vehicle routing solutions.
+  /// </summary>
+  [Item("VRPPathRelinker", "An operator that relinks paths between vehicle routing solutions.")]
+  [StorableClass]
+  public sealed class VRPPathRelinker : PathRelinker {
+    [StorableConstructor]
+    private VRPPathRelinker(bool deserializing) : base(deserializing) { }
+    private VRPPathRelinker(VRPPathRelinker original, Cloner cloner) : base(original, cloner) { }
+    public VRPPathRelinker() : base() { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new VRPPathRelinker(this, cloner);
+    }
+
+    public static ItemArray<IItem> Apply(IItem initiator, IItem guide, PercentValue n) {
+      // TODO: path relinking
+      return new ItemArray<IItem>();
+    }
+
+    protected override ItemArray<IItem> Relink(ItemArray<IItem> parents, PercentValue n) {
+      if (parents.Length != 2)
+        throw new ArgumentException("The number of parents is not equal to 2.");
+      return Apply(parents[0], parents[1], n);
+    }
+  }
+}
Index: /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/SimilarityCalculators/VRPSimilarityCalculator.cs
===================================================================
--- /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/SimilarityCalculators/VRPSimilarityCalculator.cs	(revision 7793)
+++ /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/SimilarityCalculators/VRPSimilarityCalculator.cs	(revision 7793)
@@ -0,0 +1,82 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Potvin;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  /// <summary>
+  /// An operator that performs similarity calculation between two vehicle routing solutions.
+  /// </summary>
+  [Item("VRPSimilarityCalculator", "An operator that performs similarity calculation between two vehicle routing solutions.")]
+  [StorableClass]
+  public sealed class VRPSimilarityCalculator : SimilarityCalculator {
+    [StorableConstructor]
+    private VRPSimilarityCalculator(bool deserializing) : base(deserializing) { }
+    private VRPSimilarityCalculator(VRPSimilarityCalculator original, Cloner cloner) : base(original, cloner) { }
+    public VRPSimilarityCalculator() : base() { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new VRPSimilarityCalculator(this, cloner);
+    }
+
+    protected override double CalculateSimilarity(IScope left, IScope right) {
+      PotvinEncoding e1 = left.Variables[TargetParameter.ActualName].Value as PotvinEncoding;
+      PotvinEncoding e2 = right.Variables[TargetParameter.ActualName].Value as PotvinEncoding;
+
+      // extract edges from first solution
+      var edges1 = new List<Tuple<int, int>>();
+      foreach (Tour tour in e1.Tours) {
+        edges1.Add(new Tuple<int, int>(0, tour.Cities[0]));
+        edges1.Add(new Tuple<int, int>(0, tour.Cities[tour.Cities.Count - 1]));
+        for (int i = 0; i < tour.Cities.Count - 1; i++)
+          edges1.Add(new Tuple<int, int>(tour.Cities[i], tour.Cities[i + 1]));
+      }
+
+      // extract edges from second solution
+      var edges2 = new List<Tuple<int, int>>();
+      foreach (Tour tour in e2.Tours) {
+        edges2.Add(new Tuple<int, int>(0, tour.Cities[0]));
+        edges2.Add(new Tuple<int, int>(0, tour.Cities[tour.Cities.Count - 1]));
+        for (int i = 0; i < tour.Cities.Count - 1; i++)
+          edges2.Add(new Tuple<int, int>(tour.Cities[i], tour.Cities[i + 1]));
+      }
+
+      if (edges1.Count + edges2.Count == 0)
+        throw new ArgumentException("Cannot calculate diversity because no tours exist.");
+
+      int identicalEdges = 0;
+      foreach (var edge in edges1) {
+        if (edges2.Any(x => x.Equals(edge) || x.Item1 == edge.Item2 && x.Item2 == edge.Item1))
+          identicalEdges++;
+      }
+
+      return identicalEdges * 2.0 / edges1.Count + edges2.Count;
+    }
+  }
+}
Index: /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/VehicleRoutingProblem.cs
===================================================================
--- /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/VehicleRoutingProblem.cs	(revision 7792)
+++ /branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.VehicleRouting/3.3/VehicleRoutingProblem.cs	(revision 7793)
@@ -27,4 +27,5 @@
 using HeuristicLab.Data;
 using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Operators;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -411,4 +412,8 @@
 
     private void InitializeOperators() {
+      Operators.Add(new VRPImprovementOperator());
+      Operators.Add(new VRPPathRelinker());
+      Operators.Add(new VRPSimilarityCalculator());
+
       Operators.Add(new BestVRPSolutionAnalyzer());
       Operators.Add(new BestAverageWorstVRPToursAnalyzer());
@@ -518,4 +523,16 @@
         op.VRPToursParameter.ActualName = SolutionCreator.VRPToursParameter.ActualName;
       }
+      foreach (IImprovementOperator op in Operators.OfType<IImprovementOperator>()) {
+        op.TargetParameter.ActualName = SolutionCreator.VRPToursParameter.ActualName;
+        op.TargetParameter.Hidden = true;
+      }
+      foreach (IPathRelinker op in Operators.OfType<IPathRelinker>()) {
+        op.ParentsParameter.ActualName = SolutionCreator.VRPToursParameter.ActualName;
+        op.ParentsParameter.Hidden = true;
+      }
+      foreach (ISimilarityCalculator op in Operators.OfType<ISimilarityCalculator>()) {
+        op.TargetParameter.ActualName = SolutionCreator.VRPToursParameter.ActualName;
+        op.TargetParameter.Hidden = true;
+      }
     }
     private void ClearDistanceMatrix() {
