Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Analyzers/BestVRPSolutionAnalyzer.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Analyzers/BestVRPSolutionAnalyzer.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Analyzers/BestVRPSolutionAnalyzer.cs	(revision 4218)
@@ -0,0 +1,156 @@
+#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.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  /// <summary>
+  /// An operator for analyzing the best solution of Vehicle Routing Problems.
+  /// </summary>
+  [Item("BestVRPSolutionAnalyzer", "An operator for analyzing the best solution of Vehicle Routing Problems.")]
+  [StorableClass]
+  public sealed class BestVRPSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer {
+    public ScopeTreeLookupParameter<IVRPEncoding> VRPToursParameter {
+      get { return (ScopeTreeLookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
+    }
+    public ILookupParameter<DoubleMatrix> DistanceMatrixParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
+    }
+    public ILookupParameter<BoolValue> UseDistanceMatrixParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters["UseDistanceMatrix"]; }
+    }
+    public LookupParameter<DoubleMatrix> CoordinatesParameter {
+      get { return (LookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
+    }
+    public ILookupParameter<DoubleArray> ReadyTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["ReadyTime"]; }
+    }
+    public ILookupParameter<DoubleArray> DueTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["DueTime"]; }
+    }
+    public ILookupParameter<DoubleArray> ServiceTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["ServiceTime"]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> OverloadParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Overload"]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> TardinessParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Tardiness"]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> DistanceParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Distance"]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> TravelTimeParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["TravelTime"]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> VehiclesUtilizedParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["VehiclesUtilized"]; }
+    }
+    public LookupParameter<VRPSolution> BestSolutionParameter {
+      get { return (LookupParameter<VRPSolution>)Parameters["BestSolution"]; }
+    }
+    public ValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
+    }
+
+    [StorableConstructor]
+    private BestVRPSolutionAnalyzer(bool deserializing) : base(deserializing) { }
+
+    public BestVRPSolutionAnalyzer()
+      : base() {
+        Parameters.Add(new ScopeTreeLookupParameter<IVRPEncoding>("VRPTours", "The VRP tours which should be evaluated."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the cities."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
+      Parameters.Add(new LookupParameter<BoolValue>("UseDistanceMatrix", "True if a distance matrix should be calculated and used for evaluation, otherwise false."));
+      Parameters.Add(new LookupParameter<DoubleArray>("ReadyTime", "The ready time of each customer."));
+      Parameters.Add(new LookupParameter<DoubleArray>("DueTime", "The due time of each customer."));
+      Parameters.Add(new LookupParameter<DoubleArray>("ServiceTime", "The service time of each customer."));
+
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the VRP solutions which should be analyzed."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Distance", "The distances of the VRP solutions which should be analyzed."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Overload", "The overloads of the VRP solutions which should be analyzed."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Tardiness", "The tardiness of the VRP solutions which should be analyzed."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("TravelTime", "The travel times of the VRP solutions which should be analyzed."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("VehiclesUtilized", "The utilized vehicles of the VRP solutions which should be analyzed."));
+      Parameters.Add(new LookupParameter<VRPSolution>("BestSolution", "The best TSP solution."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best VRP solution should be stored."));
+    }
+
+    public override IOperation Apply() {
+      DoubleMatrix coordinates = CoordinatesParameter.ActualValue;
+      ItemArray<IVRPEncoding> solutions = VRPToursParameter.ActualValue;
+      ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
+      ItemArray<DoubleValue> overloads = OverloadParameter.ActualValue;
+      ItemArray<DoubleValue> tardinesses = TardinessParameter.ActualValue;
+      ResultCollection results = ResultsParameter.ActualValue;
+      ItemArray<DoubleValue> distances = DistanceParameter.ActualValue;
+      ItemArray<DoubleValue> travelTimes = TravelTimeParameter.ActualValue;
+      ItemArray<DoubleValue> vehiclesUtilizations = VehiclesUtilizedParameter.ActualValue;
+
+      int i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
+
+      IVRPEncoding best = solutions[i].Clone() as IVRPEncoding;
+      VRPSolution solution = BestSolutionParameter.ActualValue;
+      if (solution == null) {
+        solution = new VRPSolution(coordinates, best.Clone() as IVRPEncoding, new DoubleValue(qualities[i].Value),
+          new DoubleValue(distances[i].Value), new DoubleValue(overloads[i].Value), new DoubleValue(tardinesses[i].Value),
+          new DoubleValue(travelTimes[i].Value), new DoubleValue(vehiclesUtilizations[i].Value),
+          DistanceMatrixParameter.ActualValue, UseDistanceMatrixParameter.ActualValue,
+          ReadyTimeParameter.ActualValue, DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue);
+        BestSolutionParameter.ActualValue = solution;
+        results.Add(new Result("Best VRP Solution", solution));
+
+        results.Add(new Result("Best TravelTime", new DoubleValue(travelTimes[i].Value)));
+        results.Add(new Result("Best Distance",  new DoubleValue(distances[i].Value)));
+        results.Add(new Result("Best VehicleUtilization", new DoubleValue(vehiclesUtilizations[i].Value)));
+        results.Add(new Result("Best Overload",  new DoubleValue(overloads[i].Value)));
+        results.Add(new Result("Best Tardiness",  new DoubleValue(tardinesses[i].Value)));
+      } else {
+        if (solution.Quality.Value > qualities[i].Value) {
+          solution.Coordinates = coordinates;
+          solution.Solution = best.Clone() as IVRPEncoding;
+          solution.Quality.Value = qualities[i].Value;
+          solution.Distance.Value = (results["Best Distance"].Value as DoubleValue).Value = distances[i].Value;
+          solution.Overload.Value = (results["Best Overload"].Value as DoubleValue).Value = overloads[i].Value;
+          solution.Tardiness.Value = (results["Best Tardiness"].Value as DoubleValue).Value = tardinesses[i].Value;
+          solution.TravelTime.Value = (results["Best TravelTime"].Value as DoubleValue).Value = travelTimes[i].Value;
+          solution.VehicleUtilization.Value = (results["Best VehicleUtilization"].Value as DoubleValue).Value = vehiclesUtilizations[i].Value;
+          solution.DistanceMatrix = DistanceMatrixParameter.ActualValue;
+          solution.UseDistanceMatrix = UseDistanceMatrixParameter.ActualValue;
+          solution.ReadyTime = ReadyTimeParameter.ActualValue;
+          solution.DueTime = DueTimeParameter.ActualValue;
+          solution.ServiceTime = ServiceTimeParameter.ActualValue;
+        }
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/AlbaEncoding.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/AlbaEncoding.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/AlbaEncoding.cs	(revision 4218)
@@ -0,0 +1,167 @@
+﻿#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.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("AlbaEncoding", "Represents an Alba encoding of VRP solutions. 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 AlbaEncoding : Permutation, IVRPEncoding {
+    [Storable]
+    private int cities;
+    
+    #region IVRPEncoding Members
+    public ItemList<Tour> Tours {
+      get {
+        ItemList<Tour> result = new ItemList<Tour>();
+        
+        Tour tour = new Tour();
+        for (int i = 0; i < this.array.Length; i++) {
+          if (this.array[i] >= cities) {
+            if (tour.Cities.Count > 0) {
+              result.Add(tour);
+
+              tour = new Tour();
+            }
+          } else {
+            tour.Cities.Add(this.array[i] + 1);
+          }
+        }
+
+        if (tour.Cities.Count > 0) {
+          result.Add(tour);
+        }
+
+        return result;
+      }
+    }
+
+    public int Cities {
+      get { return cities; }
+    }
+
+    public int MaxVehicles {
+      get { return Length - Cities;  }
+    }
+
+    #endregion
+
+    public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) {
+      AlbaEncoding clone = new AlbaEncoding(
+        new Permutation(this.PermutationType, this.array), cities);
+      cloner.RegisterClonedObject(this, clone);
+      clone.readOnly = readOnly;
+      return clone;
+    }
+
+    public AlbaEncoding(Permutation permutation, int cities)
+      : base(PermutationTypes.RelativeUndirected) {
+      this.array = new int[permutation.Length];
+      for (int i = 0; i < array.Length; i++)
+        this.array[i] = permutation[i];
+
+      this.cities = cities;
+    }
+
+    [StorableConstructor]
+    private AlbaEncoding(bool serializing)
+      : base() {
+    }
+
+    public static AlbaEncoding ConvertFrom(IVRPEncoding encoding, int vehicles) {
+      ItemList<Tour> tours = encoding.Tours;
+
+      int cities = 0;
+      foreach (Tour tour in tours) {
+        cities += tour.Cities.Count;
+      }
+
+      int emptyVehicles = vehicles - tours.Count;
+
+      int[] array = new int[cities + tours.Count + emptyVehicles - 1];
+      int delimiter = cities;
+      int arrayIndex = 0;
+
+      foreach (Tour tour in tours) {
+        foreach (int city in tour.Cities) {
+            array[arrayIndex] = city - 1;
+            arrayIndex++;
+        }
+
+        if (arrayIndex != array.Length) {
+          array[arrayIndex] = delimiter;
+          delimiter++;
+          arrayIndex++;
+        }
+      }
+
+      for (int i = 0; i < emptyVehicles - 1; i++) {
+        array[arrayIndex] = delimiter;
+        delimiter++;
+        arrayIndex++;
+      }
+            
+      AlbaEncoding solution = new AlbaEncoding(new Permutation(PermutationTypes.RelativeUndirected, new IntArray(array)), cities);
+
+      return solution;
+    }
+
+    public static AlbaEncoding ConvertFrom(List<int> routeParam) {
+      List<int> route = new List<int>(routeParam);
+      
+      int cities = 0;
+      for (int i = 0; i < route.Count; i++) {
+        if (route[i] != 0) {
+          cities++;
+        }
+      }
+
+      int vehicle = cities;
+      for (int i = 0; i < route.Count; i++) {
+        if (route[i] == 0) {
+          route[i] = vehicle;
+          vehicle++;
+        } else {
+          route[i] = route[i] - 1;
+        }
+      }
+
+      return new AlbaEncoding(
+        new Permutation(PermutationTypes.RelativeUndirected, route.ToArray()),
+        cities);
+    }
+
+    internal static void RemoveUnusedParameters(ParameterCollection parameters) {
+      parameters.Remove("DistanceMatrix");
+      parameters.Remove("UseDistanceMatrix");
+      parameters.Remove("Capacity");
+      parameters.Remove("Demand");
+      parameters.Remove("ReadyTime");
+      parameters.Remove("DueTime");
+      parameters.Remove("ServiceTime");
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaCrossover.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaCrossover.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaCrossover.cs	(revision 4218)
@@ -0,0 +1,68 @@
+﻿#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.Optimization;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("AlbaCrossover", "An operator which crosses two VRP representations.")]
+  [StorableClass]
+  public abstract class AlbaCrossover : VRPCrossover, IStochasticOperator {
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    
+    [StorableConstructor]
+    protected AlbaCrossover(bool deserializing) : base(deserializing) { }
+
+    public AlbaCrossover()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
+   
+      AlbaEncoding.RemoveUnusedParameters(Parameters);
+    }
+
+    protected abstract AlbaEncoding Crossover(IRandom random, AlbaEncoding parent1, AlbaEncoding parent2);
+
+    public override IOperation Apply() {
+      ItemArray<IVRPEncoding> parents = new ItemArray<IVRPEncoding>(ParentsParameter.ActualValue.Length);
+      for (int i = 0; i < ParentsParameter.ActualValue.Length; i++) {
+        IVRPEncoding solution = ParentsParameter.ActualValue[i];
+
+        if (!(solution is AlbaEncoding)) {
+          parents[i] = AlbaEncoding.ConvertFrom(solution, VehiclesParameter.ActualValue.Value);
+        } else {
+          parents[i] = solution;
+        }
+      }
+      ParentsParameter.ActualValue = parents;
+
+      ChildParameter.ActualValue = 
+        Crossover(RandomParameter.ActualValue, parents[0] as AlbaEncoding, parents[1] as AlbaEncoding);
+
+      return base.Apply();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/PermutationCrossover.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/PermutationCrossover.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/PermutationCrossover.cs	(revision 4218)
@@ -0,0 +1,63 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("PermutationCrossover", "An operator which crosses two VRP representations using a standard permutation operator.")]
+  [StorableClass]
+  public sealed class PermutationCrossover : AlbaCrossover {    
+    public IValueLookupParameter<IPermutationCrossover> InnerCrossoverParameter {
+      get { return (IValueLookupParameter<IPermutationCrossover>)Parameters["InnerCrossover"]; }
+    }
+
+    [StorableConstructor]
+    private PermutationCrossover(bool deserializing) : base(deserializing) { }
+
+    public PermutationCrossover()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IPermutationCrossover>("InnerCrossover", "The permutation crossover.", new EdgeRecombinationCrossover()));
+    }
+
+    protected override AlbaEncoding Crossover(IRandom random, AlbaEncoding parent1, AlbaEncoding parent2) {
+      //note - the inner crossover is called here and the result is converted to an alba representation
+      //some refactoring should be done here in the future - the crossover operation should be called directly
+
+      InnerCrossoverParameter.ActualValue.ParentsParameter.ActualName = ParentsParameter.ActualName;
+      IAtomicOperation op = this.ExecutionContext.CreateOperation(
+        InnerCrossoverParameter.ActualValue, this.ExecutionContext.Scope);
+      op.Operator.Execute((IExecutionContext)op);
+
+      string childName = InnerCrossoverParameter.ActualValue.ChildParameter.ActualName;
+      if (ExecutionContext.Scope.Variables.ContainsKey(childName)) {
+        Permutation permutation = ExecutionContext.Scope.Variables[childName].Value as Permutation;
+        ExecutionContext.Scope.Variables.Remove(childName);
+
+        return new AlbaEncoding(permutation, Cities);
+      } else
+        return null;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaManipulator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaManipulator.cs	(revision 4218)
@@ -0,0 +1,72 @@
+﻿#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.Optimization;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("AlbaManipulator", "An operator which manipulates a VRP representation.")]
+  [StorableClass]
+  public abstract class AlbaManipulator : VRPManipulator, IStochasticOperator {
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+
+    [StorableConstructor]
+    protected AlbaManipulator(bool deserializing) : base(deserializing) { }
+
+    public AlbaManipulator()
+      : base() {
+        Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
+
+        AlbaEncoding.RemoveUnusedParameters(Parameters);
+    }
+
+    protected abstract void Manipulate(IRandom random, AlbaEncoding individual);
+
+    protected int FindCustomerLocation(int customer, AlbaEncoding individual) {
+      int pos = -1;
+      for (int i = 0; i < individual.Length; i++) {
+        if (individual[i] == customer) {
+          pos = i;
+          break;
+        }
+      }
+
+      return pos;
+    }
+
+    public override IOperation Apply() {
+      IVRPEncoding solution = VRPToursParameter.ActualValue;
+      if (!(solution is AlbaEncoding)) {
+        VRPToursParameter.ActualValue = AlbaEncoding.ConvertFrom(solution, VehiclesParameter.ActualValue.Value);
+      }
+
+      Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as AlbaEncoding);
+
+      return base.Apply();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/CustomerInsertionManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/CustomerInsertionManipulator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/CustomerInsertionManipulator.cs	(revision 4218)
@@ -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.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("CustomerInsertionManipulator", "An operator which manipulates a VRP representation by inserting a customer in another place.  It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")]
+  [StorableClass]
+  public sealed class CustomerInsertionManipulator : AlbaManipulator {
+    [StorableConstructor]
+    private CustomerInsertionManipulator(bool deserializing) : base(deserializing) { }
+
+    public CustomerInsertionManipulator()
+      : base() {
+    }
+
+    protected override void Manipulate(IRandom random, AlbaEncoding individual) {
+      AlbaEncoding original = (AlbaEncoding)individual.Clone();
+      int cutIndex, insertIndex, number;
+
+      int customer = random.Next(Cities);
+      cutIndex = FindCustomerLocation(customer, individual);
+
+      insertIndex = random.Next(original.Length);
+      number = original[cutIndex];
+
+      int i = 0;  // index in new permutation
+      int j = 0;  // index in old permutation
+      while (i < original.Length) {
+        if (j == cutIndex) {
+          j++;
+        }
+        if (i == insertIndex) {
+          individual[i] = number;
+          i++;
+        }
+        if ((i < original.Length) && (j < original.Length)) {
+          individual[i] = original[j];
+          i++;
+          j++;
+        }
+      }
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/CustomerInversionManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/CustomerInversionManipulator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/CustomerInversionManipulator.cs	(revision 4218)
@@ -0,0 +1,63 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("CustomerInversionManipulator", "An operator which manipulates a VRP representation by inverting the order the customers are visited.  It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")]
+  [StorableClass]
+  public sealed class CustomerInversionManipulator : AlbaManipulator {
+    [StorableConstructor]
+    private CustomerInversionManipulator(bool deserializing) : base(deserializing) { }
+
+    public CustomerInversionManipulator()
+      : base() {
+    }
+
+    protected override void Manipulate(IRandom random, AlbaEncoding individual) {
+      int breakPoint1, breakPoint2;
+
+      int customer1 = random.Next(Cities);
+      breakPoint1 = FindCustomerLocation(customer1, individual);
+
+      int customer2 = random.Next(Cities);
+      breakPoint2 = FindCustomerLocation(customer1, individual);
+
+      List<int> visitingOrder = new List<int>();
+      for (int i = breakPoint1; i <= breakPoint2; i++) {
+        if (individual[i] != 0)
+          visitingOrder.Add(individual[i]);
+      }
+      visitingOrder.Reverse();
+      for (int i = breakPoint1; i <= breakPoint2; i++) {
+        if (individual[i] != 0) {
+          individual[i] = visitingOrder[0];
+          visitingOrder.RemoveAt(0);
+        }
+      }
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/CustomerSwapManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/CustomerSwapManipulator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/CustomerSwapManipulator.cs	(revision 4218)
@@ -0,0 +1,53 @@
+﻿#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;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("CustomerSwapManipulator", "An operator which manipulates a VRP representation by swapping two customers.  It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")]
+  [StorableClass]
+  public sealed class CustomerSwapManipulator : AlbaManipulator {
+    [StorableConstructor]
+    private CustomerSwapManipulator(bool deserializing) : base(deserializing) { }
+
+    public CustomerSwapManipulator()
+      : base() {
+    }
+
+    protected override void Manipulate(IRandom random, AlbaEncoding individual) {
+      int index1, index2, temp;
+
+      int customer1 = random.Next(Cities);
+      index1 = FindCustomerLocation(customer1, individual);
+
+      int customer2 = random.Next(Cities);
+      index2 = FindCustomerLocation(customer2, individual);
+
+      temp = individual[index1];
+      individual[index1] = individual[index2];
+      individual[index2] = temp;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/IntraRouteInversionManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/IntraRouteInversionManipulator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/IntraRouteInversionManipulator.cs	(revision 4218)
@@ -0,0 +1,88 @@
+﻿#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 System;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("IntraRouteInversionManipulator", "An operator which applies the SLS operation to 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 sealed class IntraRouteInversionManipulator : AlbaManipulator {   
+    [StorableConstructor]
+    private IntraRouteInversionManipulator(bool deserializing) : base(deserializing) { }
+
+    public IntraRouteInversionManipulator()
+      : base() {
+     }
+
+    public static void Apply(AlbaEncoding individual, int index1, int index2) {
+      if (index1 != -1 && index2 != -1) {
+        int breakPoint1 = index1 + 1;
+        int breakPoint2 = index2;
+        for (int i = 0; i <= (breakPoint2 - breakPoint1) / 2; i++) {  // invert permutation between breakpoints
+          int temp = individual[breakPoint1 + i];
+          individual[breakPoint1 + i] = individual[breakPoint2 - i];
+          individual[breakPoint2 - i] = temp;
+        }
+      }
+    }
+
+    protected override void Manipulate(IRandom rand, AlbaEncoding individual) {
+      int index1 = -1;
+      int index2 = -1;
+
+      List<Tour> validTours = new List<Tour>();
+      foreach (Tour tour in individual.Tours) {
+        if (tour.Cities.Count >= 4)
+          validTours.Add(tour);
+      }
+
+      if (validTours.Count > 0) {
+        Tour chosenTour = validTours[rand.Next(validTours.Count)];
+        int currentTourStart = -1;
+        for (int i = 0; i < individual.Length; i++) {
+          if (individual[i] + 1 == chosenTour.Cities[0]) {
+            currentTourStart = i;
+            break;
+          }
+        }
+
+        int currentTourEnd = currentTourStart;
+        while (currentTourEnd < individual.Length && 
+          individual[currentTourEnd] < individual.Cities) {
+          currentTourEnd++;
+        }
+
+        int tourLength = currentTourEnd - currentTourStart;
+        int a = rand.Next(tourLength - 3);
+        index1 = currentTourStart + a;
+        index2 = currentTourStart + rand.Next(a + 2, tourLength - 1);
+      }
+
+      Apply(individual, index1, index2);
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/LambdaInterchangeManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/LambdaInterchangeManipulator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/LambdaInterchangeManipulator.cs	(revision 4218)
@@ -0,0 +1,121 @@
+﻿#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 System;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("LambdaInterchangeManipulator", "An operator which applies the lambda interchange operation to 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 sealed class LambdaInterchangeManipulator : AlbaManipulator {
+    public IValueParameter<IntValue> LambdaParameter {
+      get { return (IValueParameter<IntValue>)Parameters["Lambda"]; }
+    }
+    
+    [StorableConstructor]
+    private LambdaInterchangeManipulator(bool deserializing) : base(deserializing) { }
+
+    public LambdaInterchangeManipulator()
+      : base() {
+        Parameters.Add(new ValueParameter<IntValue>("Lambda", "The lambda value.", new IntValue(1)));
+     }
+
+    public static void Apply(AlbaEncoding individual, int tour1Index, int position1, int length1, 
+      int tour2Index, int position2, int length2) {
+      Tour tour1 = individual.Tours[tour1Index];
+      int tour1Start = -1;
+      for (int i = 0; i < individual.Length; i++) {
+        if (individual[i] == tour1.Cities[0] - 1) {
+          tour1Start = i;
+          break;
+        }
+      }
+
+      Tour tour2 = individual.Tours[tour2Index];
+      int tour2Start = -1;
+      for (int i = 0; i < individual.Length; i++) {
+        if (individual[i] == tour2.Cities[0] - 1) {
+          tour2Start = i;
+          break;
+        }
+      }
+
+      AlbaEncoding original = individual.Clone() as AlbaEncoding;
+      int index = 0;
+
+      int start1 = tour1Start + position1;
+      int end1 = start1 + length1;
+
+      int start2 = tour2Start + position2;
+      int end2 = start2 + length2;
+
+      for (int i = 0; i < original.Length; i++) {
+        if (index == start1) {
+          if (end2 - start2 == 0)
+            index = end1;
+          else
+            index = start2;
+        } else if (index == start2) {
+          if (end1 - start1 == 0)
+            index = end2;
+          else
+            index = start1;
+        } else if (index == end1) {
+          index = end2;
+        } else if (index == end2) {
+          index = end1;
+        }
+
+        individual[i] = original[index];
+
+        index++;
+      }
+    }
+
+    protected override void Manipulate(IRandom rand, AlbaEncoding individual) {
+      int lambda = LambdaParameter.Value.Value;
+      
+      int route1Index = rand.Next(individual.Tours.Count);
+      Tour route1 = individual.Tours[route1Index];
+
+      int route2Index = rand.Next(individual.Tours.Count - 1);
+      if (route2Index >= route1Index)
+        route2Index += 1;
+      Tour route2 = individual.Tours[route2Index];
+
+      int length1 = rand.Next(Math.Min(lambda + 1, route1.Cities.Count + 1));
+      int index1 = rand.Next(route1.Cities.Count - length1 + 1);
+
+      int l2Min = 0;
+      if (length1 == 0)
+        l2Min = 1;
+      int length2 = rand.Next(l2Min, Math.Min(lambda + 1, route2.Cities.Count + 1));
+      int index2 = rand.Next(route2.Cities.Count - length2 + 1);
+
+      Apply(individual, route1Index, index1, length1,
+        route2Index, index2, length2);
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/PermutationManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/PermutationManipulator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/PermutationManipulator.cs	(revision 4218)
@@ -0,0 +1,52 @@
+﻿#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;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("PermutationManipulator", "An operator which manipulates a VRP representation by using a standard permutation manipulator.")]
+  [StorableClass]
+  public sealed class PermutationManipualtor : AlbaManipulator {
+    public IValueLookupParameter<IPermutationManipulator> InnerManipulatorParameter {
+      get { return (IValueLookupParameter<IPermutationManipulator>)Parameters["InnerManipulator"]; }
+    }
+
+    [StorableConstructor]
+    private PermutationManipualtor(bool deserializing) : base(deserializing) { }
+
+    public PermutationManipualtor()
+      : base() {
+        Parameters.Add(new ValueLookupParameter<IPermutationManipulator>("InnerManipulator", "The permutation manipulator.", new TranslocationManipulator()));
+    }
+
+    protected override void Manipulate(IRandom random, AlbaEncoding individual) {
+      InnerManipulatorParameter.ActualValue.PermutationParameter.ActualName = VRPToursParameter.ActualName;
+
+      IAtomicOperation op = this.ExecutionContext.CreateOperation(
+        InnerManipulatorParameter.ActualValue, this.ExecutionContext.Scope);
+      op.Operator.Execute((IExecutionContext)op);
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveMaker.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveMaker.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveMaker.cs	(revision 4218)
@@ -0,0 +1,93 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("PermutationTranslocationMoveMaker", "An operator which makes translocation moves for the Alba representation.")]
+  [StorableClass]
+  public abstract class AlbaMoveMaker : AlbaMoveOperator {
+    public ILookupParameter<DoubleValue> MoveVehcilesUtilizedParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveVehiclesUtilized"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveTravelTimeParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveTravelTime"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveDistanceParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveDistance"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveOverloadParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveOverload"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveTardinessParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveTardiness"]; }
+    }
+
+    public ILookupParameter<DoubleValue> VehcilesUtilizedParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["VehiclesUtilized"]; }
+    }
+    public ILookupParameter<DoubleValue> TravelTimeParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["TravelTime"]; }
+    }
+    public ILookupParameter<DoubleValue> DistanceParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Distance"]; }
+    }
+    public ILookupParameter<DoubleValue> OverloadParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Overload"]; }
+    }
+    public ILookupParameter<DoubleValue> TardinessParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; }
+    }
+    
+    [StorableConstructor]
+    protected AlbaMoveMaker(bool deserializing) : base(deserializing) { }
+
+    public AlbaMoveMaker()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveVehiclesUtilized", "The number of vehicles utilized."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveTravelTime", "The total travel time."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveDistance", "The distance."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveOverload", "The overload."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveTardiness", "The tardiness."));
+
+      Parameters.Add(new LookupParameter<DoubleValue>("VehiclesUtilized", "The number of vehicles utilized."));
+      Parameters.Add(new LookupParameter<DoubleValue>("TravelTime", "The total travel time."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Distance", "The distance."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Overload", "The overload."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness."));
+    }
+
+    public override IOperation Apply() {
+      IOperation successor = base.Apply();
+
+      VehcilesUtilizedParameter.ActualValue = MoveVehcilesUtilizedParameter.ActualValue;
+      TravelTimeParameter.ActualValue = MoveTravelTimeParameter.ActualValue;
+      DistanceParameter.ActualValue = MoveDistanceParameter.ActualValue;
+      OverloadParameter.ActualValue = MoveOverloadParameter.ActualValue;
+      TardinessParameter.ActualValue = MoveTardinessParameter.ActualValue;
+
+      return successor;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveOperator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveOperator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveOperator.cs	(revision 4218)
@@ -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.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("AlbaMoveOperator", "A move operator for an Alba VRP representation.")]
+  [StorableClass]
+  public abstract class AlbaMoveOperator : VRPMoveOperator {    
+    [StorableConstructor]
+    protected AlbaMoveOperator(bool deserializing) : base(deserializing) { }
+
+    public AlbaMoveOperator() : base() 
+    {
+      AlbaEncoding.RemoveUnusedParameters(Parameters);
+    }
+
+    public override IOperation Apply() {
+      IVRPEncoding solution = VRPToursParameter.ActualValue;
+      if (!(solution is AlbaEncoding)) {
+        VRPToursParameter.ActualValue = AlbaEncoding.ConvertFrom(solution, VehiclesParameter.ActualValue.Value);
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/Interfaces/IAlbaIntraRouteInversionMoveOperator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/Interfaces/IAlbaIntraRouteInversionMoveOperator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/Interfaces/IAlbaIntraRouteInversionMoveOperator.cs	(revision 4218)
@@ -0,0 +1,30 @@
+﻿#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;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  public interface IAlbaIntraRouteInversionMoveOperator : IVRPMoveOperator {
+    ILookupParameter<IntraRouteInversionMove> IntraRouteInversionMoveParameter { get; }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/Interfaces/IAlbaLambdaInterchangeMoveOperator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/Interfaces/IAlbaLambdaInterchangeMoveOperator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/Interfaces/IAlbaLambdaInterchangeMoveOperator.cs	(revision 4218)
@@ -0,0 +1,30 @@
+﻿#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;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  public interface IAlbaLambdaInterchangeMoveOperator : IVRPMoveOperator {
+    ILookupParameter<LambdaInterchangeMove> LambdaInterchangeMoveParameter { get; }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/Interfaces/IAlbaTranslocationMoveOperator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/Interfaces/IAlbaTranslocationMoveOperator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/Interfaces/IAlbaTranslocationMoveOperator.cs	(revision 4218)
@@ -0,0 +1,30 @@
+﻿#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;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  public interface IAlbaTranslocationMoveOperator : IVRPMoveOperator {
+    ILookupParameter<TranslocationMove> TranslocationMoveParameter { get; }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/ExhaustiveIntraRouteInversionMoveGenerator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/ExhaustiveIntraRouteInversionMoveGenerator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/ExhaustiveIntraRouteInversionMoveGenerator.cs	(revision 4218)
@@ -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.Problems.VehicleRouting.Encodings.Alba;
+using HeuristicLab.Parameters;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("ExhaustiveIntraRouteInversionGenerator", "Generates all possible intra route inversion moves from a given VRP encoding.")]
+  [StorableClass]
+  public sealed class ExhaustiveIntraRouteInversionGenerator : IntraRouteInversionMoveGenerator, IExhaustiveMoveGenerator, IAlbaIntraRouteInversionMoveOperator {
+    [StorableConstructor]
+    private ExhaustiveIntraRouteInversionGenerator(bool deserializing) : base(deserializing) { }
+
+    public ExhaustiveIntraRouteInversionGenerator()
+      : base() {
+    }
+
+    protected override IntraRouteInversionMove[] GenerateMoves(AlbaEncoding individual) {
+      List<IntraRouteInversionMove> moves = new List<IntraRouteInversionMove>();
+
+      int currentTourStart = 0;
+      int currentTourEnd = 0;
+      while(currentTourEnd != individual.Length) {
+        currentTourEnd = currentTourStart;
+        while (individual[currentTourEnd] < individual.Cities && 
+          currentTourEnd < individual.Length) {
+          currentTourEnd++;
+        }
+
+        int tourLength = currentTourEnd - currentTourStart;
+        if (tourLength >= 4) {
+          for (int i = 0; i <= tourLength - 4; i++ ) {
+            for (int j = i + 2; j <= tourLength - 2; j++) {
+              IntraRouteInversionMove move = new IntraRouteInversionMove(
+                currentTourStart + i, 
+                currentTourStart + j, 
+                individual);
+
+              moves.Add(move);
+            }
+          }
+        }
+
+        currentTourStart = currentTourEnd;
+      }
+
+      return moves.ToArray();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/IntraRouteInversionEvaluator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/IntraRouteInversionEvaluator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/IntraRouteInversionEvaluator.cs	(revision 4218)
@@ -0,0 +1,69 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  [Item("IntraRouteInversionMoveEvaluator", "Evaluates a intra route inversion move for a VRP representation.")]
+  [StorableClass]
+  public sealed class IntraRouteInversionMoveEvaluator : VRPMoveEvaluator, IAlbaIntraRouteInversionMoveOperator {
+    public ILookupParameter<IntraRouteInversionMove> IntraRouteInversionMoveParameter {
+      get { return (ILookupParameter<IntraRouteInversionMove>)Parameters["IntraRouteInversionMove"]; }
+    }
+
+    [StorableConstructor]
+    private IntraRouteInversionMoveEvaluator(bool deserializing) : base(deserializing) { }
+
+    public IntraRouteInversionMoveEvaluator()
+      : base() {
+        Parameters.Add(new LookupParameter<IntraRouteInversionMove>("IntraRouteInversionMove", "The move to evaluate."));
+    }
+
+    public static TourEvaluation GetMoveQuality(AlbaEncoding individual, IntraRouteInversionMove move,
+      DoubleArray dueTimeArray, DoubleArray serviceTimeArray, DoubleArray readyTimeArray,
+      DoubleArray demandArray, DoubleValue capacity, DoubleMatrix coordinates,
+      DoubleValue fleetUsageFactor, DoubleValue timeFactor, DoubleValue distanceFactor,
+      DoubleValue overloadPenalty, DoubleValue tardinessPenalty,
+      ILookupParameter<DoubleMatrix> distanceMatrix, Data.BoolValue useDistanceMatrix) {
+      AlbaEncoding newSolution = individual.Clone() as AlbaEncoding;
+      IntraRouteInversionMoveMaker.Apply(newSolution, move);
+
+      return VRPEvaluator.Evaluate(
+        newSolution, dueTimeArray, serviceTimeArray, readyTimeArray,
+        demandArray, capacity, fleetUsageFactor, timeFactor, distanceFactor,
+        overloadPenalty, tardinessPenalty, coordinates, distanceMatrix, useDistanceMatrix);
+    }
+
+    protected override TourEvaluation GetMoveQuality() {
+      return GetMoveQuality(
+        VRPToursParameter.ActualValue as AlbaEncoding, IntraRouteInversionMoveParameter.ActualValue,
+        DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,
+        DemandParameter.ActualValue, CapacityParameter.ActualValue, CoordinatesParameter.ActualValue,
+        FleetUsageFactor.ActualValue, TimeFactor.ActualValue, DistanceFactor.ActualValue, OverloadPenalty.ActualValue,
+        TardinessPenalty.ActualValue, DistanceMatrixParameter, UseDistanceMatrixParameter.ActualValue);
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/IntraRouteInversionMove.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/IntraRouteInversionMove.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/IntraRouteInversionMove.cs	(revision 4218)
@@ -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 HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Common;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("InversionMove", "Item that describes an intra route inversion move on a VRP representation.")]
+  [StorableClass]
+  public class IntraRouteInversionMove : TwoIndexMove, IVRPMove {
+    public IntraRouteInversionMove()
+      : base() {
+    }
+
+    public IntraRouteInversionMove(int index1, int index2)
+      : base(index1, index2, null) {
+    }
+
+    public IntraRouteInversionMove(int index1, int index2, AlbaEncoding permutation)
+      : base(index1, index2, permutation) {
+    }
+
+    public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) {
+      IntraRouteInversionMove clone = new IntraRouteInversionMove(
+        Index1, Index2);
+
+      if (Permutation != null)
+        clone.Permutation = (AlbaEncoding)cloner.Clone(Permutation);
+
+      cloner.RegisterClonedObject(this, clone);
+      return clone;
+    }
+
+    #region IVRPMove Members
+
+    public TourEvaluation GetMoveQuality(
+      IVRPEncoding individual, 
+      DoubleArray dueTimeArray, DoubleArray serviceTimeArray, DoubleArray readyTimeArray, 
+      DoubleArray demandArray, DoubleValue capacity, DoubleMatrix coordinates,
+      DoubleValue fleetUsageFactor, DoubleValue timeFactor, DoubleValue distanceFactor,
+      DoubleValue overloadPenalty, DoubleValue tardinessPenalty,
+      ILookupParameter<DoubleMatrix> distanceMatrix, Data.BoolValue useDistanceMatrix) {
+        return IntraRouteInversionMoveEvaluator.GetMoveQuality(individual as AlbaEncoding, this,
+          dueTimeArray, serviceTimeArray, readyTimeArray, demandArray, capacity,
+          coordinates, fleetUsageFactor, timeFactor, distanceFactor,
+          overloadPenalty, tardinessPenalty, distanceMatrix, useDistanceMatrix);
+    }
+
+    public void MakeMove(IRandom random, IVRPEncoding individual) {
+      IntraRouteInversionMoveMaker.Apply(individual as AlbaEncoding, this);
+    }
+
+    #endregion
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/IntraRouteInversionMoveGenerator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/IntraRouteInversionMoveGenerator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/IntraRouteInversionMoveGenerator.cs	(revision 4218)
@@ -0,0 +1,68 @@
+﻿#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.Problems.VehicleRouting.Encodings.Alba;
+using HeuristicLab.Parameters;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("IntraRouteInversionMoveGenerator", "Generates intra route inversion moves from a given VRP encoding.")]
+  [StorableClass]
+  public abstract class IntraRouteInversionMoveGenerator : AlbaMoveOperator, IExhaustiveMoveGenerator, IAlbaIntraRouteInversionMoveOperator {
+    public ILookupParameter<IntraRouteInversionMove> IntraRouteInversionMoveParameter {
+      get { return (ILookupParameter<IntraRouteInversionMove>)Parameters["IntraRouteInversionMove"]; }
+    }
+
+    protected ScopeParameter CurrentScopeParameter {
+      get { return (ScopeParameter)Parameters["CurrentScope"]; }
+    }
+
+    [StorableConstructor]
+    protected IntraRouteInversionMoveGenerator(bool deserializing) : base(deserializing) { }
+
+    public IntraRouteInversionMoveGenerator()
+      : base() {
+        Parameters.Add(new LookupParameter<IntraRouteInversionMove>("IntraRouteInversionMove", "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 abstract IntraRouteInversionMove[] GenerateMoves(AlbaEncoding individual);
+
+    public override IOperation Apply() {
+      IOperation next = base.Apply();
+
+      AlbaEncoding individual = VRPToursParameter.ActualValue as AlbaEncoding;
+      IntraRouteInversionMove[] moves = GenerateMoves(individual);
+      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(IntraRouteInversionMoveParameter.ActualName, moves[i]));
+      }
+      CurrentScopeParameter.ActualValue.SubScopes.AddRange(moveScopes);
+
+      return next;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/IntraRouteInversionMoveMaker.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/IntraRouteInversionMoveMaker.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/IntraRouteInversionMoveMaker.cs	(revision 4218)
@@ -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 HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("IntraRouteInversionMoveMaker", "Peforms the SLS move on a given VRP encoding and updates the quality.  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 IntraRouteInversionMoveMaker : AlbaMoveMaker, IAlbaIntraRouteInversionMoveOperator, IMoveMaker {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
+    }
+    public ILookupParameter<IntraRouteInversionMove> IntraRouteInversionMoveParameter {
+      get { return (ILookupParameter<IntraRouteInversionMove>)Parameters["IntraRouteInversionMove"]; }
+    }
+
+    [StorableConstructor]
+    private IntraRouteInversionMoveMaker(bool deserializing) : base(deserializing) { }
+
+    public IntraRouteInversionMoveMaker()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution."));
+      Parameters.Add(new LookupParameter<IntraRouteInversionMove>("IntraRouteInversionMove", "The move to make."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move."));
+    }
+
+    public static void Apply(AlbaEncoding solution, IntraRouteInversionMove move) {
+      IntraRouteInversionManipulator.Apply(solution, move.Index1, move.Index2);
+    }
+
+    public override IOperation Apply() {
+      IOperation next = base.Apply();
+      
+      AlbaEncoding solution = VRPToursParameter.ActualValue as AlbaEncoding;
+
+      IntraRouteInversionMove move = IntraRouteInversionMoveParameter.ActualValue;
+      DoubleValue moveQuality = MoveQualityParameter.ActualValue;
+      DoubleValue quality = QualityParameter.ActualValue;
+     
+      //perform move
+      Apply(solution, move);
+
+      quality.Value = moveQuality.Value;
+
+      return next;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/StochasticIntraRouteInversionMutliMoveGenerator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/StochasticIntraRouteInversionMutliMoveGenerator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/StochasticIntraRouteInversionMutliMoveGenerator.cs	(revision 4218)
@@ -0,0 +1,64 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
+using HeuristicLab.Parameters;
+using System.Collections.Generic;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("StochasticIntraRouteInversionMultiMoveGenerator", "Generates multiple random intra route inversion moves from a given VRP encoding.")]
+  [StorableClass]
+  public sealed class StochasticIntraRouteInversionMultiMoveGenerator : IntraRouteInversionMoveGenerator, IStochasticOperator, IMultiMoveGenerator, IAlbaIntraRouteInversionMoveOperator {
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+
+    public IValueLookupParameter<IntValue> SampleSizeParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["SampleSize"]; }
+    }
+    
+    [StorableConstructor]
+    private StochasticIntraRouteInversionMultiMoveGenerator(bool deserializing) : base(deserializing) { }
+
+    public StochasticIntraRouteInversionMultiMoveGenerator()
+      : base() {
+        Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
+        Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
+    }
+
+    protected override IntraRouteInversionMove[] GenerateMoves(AlbaEncoding individual) {
+      int sampleSize = SampleSizeParameter.ActualValue.Value;
+
+      IntraRouteInversionMove[] moves = new IntraRouteInversionMove[sampleSize];
+      for (int i = 0; i < sampleSize; i++) {
+        moves[i] = StochasticIntraRouteInversionSingleMoveGenerator.Apply(
+          individual, Cities, RandomParameter.ActualValue);
+      }
+
+      return moves;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/StochasticIntraRouteInversionSingleMoveGenerator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/StochasticIntraRouteInversionSingleMoveGenerator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/StochasticIntraRouteInversionSingleMoveGenerator.cs	(revision 4218)
@@ -0,0 +1,101 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
+using HeuristicLab.Parameters;
+using System.Collections.Generic;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("StochasticIntraRouteInversionSingleMoveGenerator", "Generates one random intra route inversion move from a given VRP encoding.")]
+  [StorableClass]
+  public sealed class StochasticIntraRouteInversionSingleMoveGenerator : IntraRouteInversionMoveGenerator,
+    IStochasticOperator, ISingleMoveGenerator, IAlbaIntraRouteInversionMoveOperator, IMultiVRPMoveGenerator {
+    #region IMultiVRPMoveOperator Members
+
+    public ILookupParameter VRPMoveParameter {
+      get { return (ILookupParameter)Parameters["IntraRouteInversionMove"]; }
+    }
+
+    #endregion
+    
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    
+    [StorableConstructor]
+    private StochasticIntraRouteInversionSingleMoveGenerator(bool deserializing) : base(deserializing) { }
+
+    public StochasticIntraRouteInversionSingleMoveGenerator()
+      : base() {
+        Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
+    }
+
+    public static IntraRouteInversionMove Apply(AlbaEncoding individual, int cities, IRandom rand) {
+      int index1 = -1;
+      int index2 = -1;
+
+      List<Tour> validTours = new List<Tour>();
+      foreach (Tour tour in individual.Tours) {
+        if (tour.Cities.Count >= 4)
+          validTours.Add(tour);
+      }
+
+      if (validTours.Count > 0) {
+        Tour chosenTour = validTours[rand.Next(validTours.Count)];
+        int currentTourStart = -1;
+        for (int i = 0; i < individual.Length; i++) {
+          if (individual[i] + 1 == chosenTour.Cities[0]) {
+            currentTourStart = i;
+            break;
+          }
+        }
+
+        int currentTourEnd = currentTourStart;
+        while (individual[currentTourEnd] < individual.Cities &&
+            currentTourEnd < individual.Length) {
+          currentTourEnd++;
+        }
+
+        int tourLength = currentTourEnd - currentTourStart;
+        int a = rand.Next(tourLength - 3);
+        index1 = currentTourStart + a;
+        index2 = currentTourStart + rand.Next(a + 2, tourLength - 1);
+      }
+
+      return new IntraRouteInversionMove(index1, index2, individual);
+    }
+
+    protected override IntraRouteInversionMove[] GenerateMoves(AlbaEncoding individual) {
+      List<IntraRouteInversionMove> moves = new List<IntraRouteInversionMove>();
+
+      IntraRouteInversionMove move = Apply(individual, Cities, RandomParameter.ActualValue);
+      if(move != null)
+        moves.Add(move);
+
+      return moves.ToArray();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/ExhaustiveLambdaInterchangeMoveGenerator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/ExhaustiveLambdaInterchangeMoveGenerator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/ExhaustiveLambdaInterchangeMoveGenerator.cs	(revision 4218)
@@ -0,0 +1,67 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
+using HeuristicLab.Parameters;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("ExhaustiveLambdaInterchangeMoveGenerator", "Generates all possible lambda interchange moves from a given VRP encoding.")]
+  [StorableClass]
+  public sealed class ExhaustiveLambdaInterchangeMoveGenerator : LambdaInterchangeMoveGenerator, IExhaustiveMoveGenerator, IAlbaLambdaInterchangeMoveOperator {
+    [StorableConstructor]
+    private ExhaustiveLambdaInterchangeMoveGenerator(bool deserializing) : base(deserializing) { }
+
+    public ExhaustiveLambdaInterchangeMoveGenerator()
+      : base() {
+    }
+
+    protected override LambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda) {
+      List<LambdaInterchangeMove> moves = new List<LambdaInterchangeMove>();
+
+      for (int tour1Index = 0; tour1Index < individual.Tours.Count; tour1Index++) {
+        Tour tour1 = individual.Tours[tour1Index];
+        for (int tour2Index = tour1Index + 1; tour2Index < individual.Tours.Count; tour2Index++) {
+          Tour tour2 = individual.Tours[tour2Index];
+
+          for (int length1 = 0; length1 <= Math.Min(lambda, tour1.Cities.Count); length1++) {
+            for(int length2 = 0; length2 <= Math.Min(lambda, tour2.Cities.Count); length2++) {
+              if(length1 != 0 || length2 != 0) {
+                for(int index1 = 0; index1 < tour1.Cities.Count - length1 + 1; index1++) {
+                  for(int index2 = 0; index2 < tour2.Cities.Count - length2 + 1; index2++) {
+                    moves.Add(new LambdaInterchangeMove(tour1Index, index1, length1, 
+                      tour2Index, index2, length2));
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+
+      return moves.ToArray();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/LambdaInterchangeMove.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/LambdaInterchangeMove.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/LambdaInterchangeMove.cs	(revision 4218)
@@ -0,0 +1,109 @@
+﻿#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;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("InversionMove", "Item that describes a lambda move on a VRP representation.")]
+  [StorableClass]
+  public class LambdaInterchangeMove: Item, IVRPMove {
+    [Storable]
+    public int Tour1 { get; protected set; }
+
+    [Storable]
+    public int Position1 { get; protected set; }
+
+    [Storable]
+    public int Length1 { get; protected set; }
+
+    [Storable]
+    public int Tour2 { get; protected set; }
+
+    [Storable]
+    public int Position2 { get; protected set; }
+
+    [Storable]
+    public int Length2 { get; protected set; }
+    
+    public LambdaInterchangeMove(): base() {
+      Tour1 = -1;
+      Position1 = -1;
+      Length1 = -1;
+
+      Tour2 = -1;
+      Position2 = -1;
+      Length2 = -1;
+    }
+
+    public LambdaInterchangeMove(int tour1, int position1, int length1, 
+      int tour2, int position2, int length2) {
+        Tour1 = tour1;
+        Position1 = position1;
+        Length1 = length1;
+
+        Tour2 = tour2;
+        Position2 = position2;
+        Length2 = length2;
+    }
+
+    public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) {
+      LambdaInterchangeMove clone = new LambdaInterchangeMove();
+
+      clone.Tour1 = Tour1;
+      clone.Position1 = Position1;
+      clone.Length1 = Length1;
+
+      clone.Tour2 = Tour2;
+      clone.Position2 = Position2;
+      clone.Length2 = Length2;
+
+      cloner.RegisterClonedObject(this, clone);
+      return clone;
+    }
+
+    #region IVRPMove Members
+
+    public TourEvaluation GetMoveQuality(
+      IVRPEncoding individual, 
+      DoubleArray dueTimeArray, DoubleArray serviceTimeArray, DoubleArray readyTimeArray, 
+      DoubleArray demandArray, DoubleValue capacity, DoubleMatrix coordinates,
+      DoubleValue fleetUsageFactor, DoubleValue timeFactor, DoubleValue distanceFactor,
+      DoubleValue overloadPenalty, DoubleValue tardinessPenalty,
+      ILookupParameter<DoubleMatrix> distanceMatrix, Data.BoolValue useDistanceMatrix) {
+        return LambdaInterchangeMoveEvaluator.GetMoveQuality(individual as AlbaEncoding, this,
+          dueTimeArray, serviceTimeArray, readyTimeArray, demandArray, capacity,
+          coordinates, fleetUsageFactor, timeFactor, distanceFactor,
+          overloadPenalty, tardinessPenalty, distanceMatrix, useDistanceMatrix);
+    }
+
+    public void MakeMove(IRandom random, IVRPEncoding individual) {
+      LambdaInterchangeMoveMaker.Apply(individual as AlbaEncoding, this);
+    }
+
+    #endregion
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/LambdaInterchangeMoveEvaluator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/LambdaInterchangeMoveEvaluator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/LambdaInterchangeMoveEvaluator.cs	(revision 4218)
@@ -0,0 +1,69 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  [Item("LambdaInterchangeMoveEvaluator", "Evaluates a lamnbda interchange move for a VRP representation.")]
+  [StorableClass]
+  public sealed class LambdaInterchangeMoveEvaluator : VRPMoveEvaluator, IAlbaLambdaInterchangeMoveOperator {
+    public ILookupParameter<LambdaInterchangeMove> LambdaInterchangeMoveParameter {
+      get { return (ILookupParameter<LambdaInterchangeMove>)Parameters["LambdaInterchangeMove"]; }
+    }
+
+    [StorableConstructor]
+    private LambdaInterchangeMoveEvaluator(bool deserializing) : base(deserializing) { }
+
+    public LambdaInterchangeMoveEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<LambdaInterchangeMove>("LambdaInterchangeMove", "The move to evaluate."));
+    }
+
+    public static TourEvaluation GetMoveQuality(AlbaEncoding individual, LambdaInterchangeMove move, 
+      DoubleArray dueTimeArray, DoubleArray serviceTimeArray, DoubleArray readyTimeArray, 
+      DoubleArray demandArray, DoubleValue capacity, DoubleMatrix coordinates, 
+      DoubleValue fleetUsageFactor, DoubleValue timeFactor, DoubleValue distanceFactor, 
+      DoubleValue overloadPenalty, DoubleValue tardinessPenalty,
+      ILookupParameter<DoubleMatrix> distanceMatrix, Data.BoolValue useDistanceMatrix) {
+      AlbaEncoding newSolution = individual.Clone() as AlbaEncoding;
+      LambdaInterchangeMoveMaker.Apply(newSolution, move);
+
+      return VRPEvaluator.Evaluate(
+        newSolution, dueTimeArray, serviceTimeArray, readyTimeArray, 
+        demandArray, capacity, fleetUsageFactor, timeFactor, distanceFactor, 
+        overloadPenalty, tardinessPenalty, coordinates, distanceMatrix, useDistanceMatrix);
+    }
+
+    protected override TourEvaluation GetMoveQuality() {
+      return GetMoveQuality(
+        VRPToursParameter.ActualValue as AlbaEncoding, LambdaInterchangeMoveParameter.ActualValue, 
+        DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,
+        DemandParameter.ActualValue, CapacityParameter.ActualValue, CoordinatesParameter.ActualValue, 
+        FleetUsageFactor.ActualValue, TimeFactor.ActualValue, DistanceFactor.ActualValue, OverloadPenalty.ActualValue, 
+        TardinessPenalty.ActualValue, DistanceMatrixParameter, UseDistanceMatrixParameter.ActualValue);
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/LambdaInterchangeMoveGenerator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/LambdaInterchangeMoveGenerator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/LambdaInterchangeMoveGenerator.cs	(revision 4218)
@@ -0,0 +1,78 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
+using HeuristicLab.Parameters;
+using System.Collections.Generic;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("LambdaInterchangeMoveGenerator", "Generates lambda interchange moves from a given VRP encoding.")]
+  [StorableClass]
+  public abstract class LambdaInterchangeMoveGenerator : AlbaMoveOperator, IExhaustiveMoveGenerator, IAlbaLambdaInterchangeMoveOperator {
+    #region IAlbaLambdaInterchangeMoveOperator Members
+
+    public ILookupParameter<LambdaInterchangeMove> LambdaInterchangeMoveParameter {
+      get { return (ILookupParameter<LambdaInterchangeMove>)Parameters["LambdaInterchangeMove"]; }
+    }
+
+    protected ScopeParameter CurrentScopeParameter {
+      get { return (ScopeParameter)Parameters["CurrentScope"]; }
+    }
+
+    public IValueParameter<IntValue> LambdaParameter {
+      get { return (IValueParameter<IntValue>)Parameters["Lambda"]; }
+    }
+
+    #endregion
+
+    [StorableConstructor]
+    protected LambdaInterchangeMoveGenerator(bool deserializing) : base(deserializing) { }
+
+    public LambdaInterchangeMoveGenerator()
+      : base() {
+        Parameters.Add(new LookupParameter<LambdaInterchangeMove>("LambdaInterchangeMove", "The moves that should be generated in subscopes."));
+        Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
+        Parameters.Add(new ValueParameter<IntValue>("Lambda", "The lambda value.", new IntValue(1)));
+    }
+
+    protected abstract LambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda);
+
+    public override IOperation Apply() {
+      IOperation next = base.Apply();
+
+      AlbaEncoding individual = VRPToursParameter.ActualValue as AlbaEncoding;
+      LambdaInterchangeMove[] moves = GenerateMoves(individual, LambdaParameter.Value.Value);
+      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(LambdaInterchangeMoveParameter.ActualName, moves[i]));
+      }
+      CurrentScopeParameter.ActualValue.SubScopes.AddRange(moveScopes);
+
+      return next;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/LambdaInterchangeMoveMaker.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/LambdaInterchangeMoveMaker.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/LambdaInterchangeMoveMaker.cs	(revision 4218)
@@ -0,0 +1,81 @@
+﻿#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 System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("LambdaInterchangeMoveMaker", "Peforms a lambda interchange moves on a given VRP encoding and updates the quality. 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 LambdaInterchangeMoveMaker : AlbaMoveMaker, IAlbaLambdaInterchangeMoveOperator, IMoveMaker {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
+    }
+    public ILookupParameter<LambdaInterchangeMove> LambdaInterchangeMoveParameter {
+      get { return (ILookupParameter<LambdaInterchangeMove>)Parameters["LambdaInterchangeMove"]; }
+    }
+
+    [StorableConstructor]
+    private LambdaInterchangeMoveMaker(bool deserializing) : base(deserializing) { }
+
+    public LambdaInterchangeMoveMaker()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution."));
+      Parameters.Add(new LookupParameter<LambdaInterchangeMove>("LambdaInterchangeMove", "The move to make."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move."));
+    }
+
+    public static void Apply(AlbaEncoding solution, LambdaInterchangeMove move) {
+      LambdaInterchangeManipulator.Apply(
+        solution,
+        move.Tour1, move.Position1, move.Length1,
+        move.Tour2, move.Position2, move.Length2);
+    }
+
+    public override IOperation Apply() {
+      IOperation next = base.Apply();
+      
+      AlbaEncoding solution = VRPToursParameter.ActualValue as AlbaEncoding;
+
+      LambdaInterchangeMove move = LambdaInterchangeMoveParameter.ActualValue;
+      DoubleValue moveQuality = MoveQualityParameter.ActualValue;
+      DoubleValue quality = QualityParameter.ActualValue;
+     
+      //perform move
+      Apply(solution, move);
+
+      quality.Value = moveQuality.Value;
+
+      return next;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/StochasticLambdaInterchangeMutliMoveGenerator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/StochasticLambdaInterchangeMutliMoveGenerator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/StochasticLambdaInterchangeMutliMoveGenerator.cs	(revision 4218)
@@ -0,0 +1,64 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
+using HeuristicLab.Parameters;
+using System.Collections.Generic;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("StochasticLambdaInterchangeMultiMoveGenerator", "Generates multiple random lambda interchange moves from a given VRP encoding.")]
+  [StorableClass]
+  public sealed class StochasticLambdaInterchangeMultiMoveGenerator : LambdaInterchangeMoveGenerator, IStochasticOperator, IMultiMoveGenerator, IAlbaLambdaInterchangeMoveOperator {
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+
+    public IValueLookupParameter<IntValue> SampleSizeParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["SampleSize"]; }
+    }
+    
+    [StorableConstructor]
+    private StochasticLambdaInterchangeMultiMoveGenerator(bool deserializing) : base(deserializing) { }
+
+    public StochasticLambdaInterchangeMultiMoveGenerator()
+      : base() {
+        Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
+        Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
+    }
+
+    protected override LambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda) {
+      int sampleSize = SampleSizeParameter.ActualValue.Value;
+
+      LambdaInterchangeMove[] moves = new LambdaInterchangeMove[sampleSize];
+      for (int i = 0; i < sampleSize; i++) {
+        moves[i] = StochasticLambdaInterchangeSingleMoveGenerator.Apply(
+          individual, Cities, lambda, RandomParameter.ActualValue);
+      }
+
+      return moves;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/StochasticLambdaInterchangeSingleMoveGenerator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/StochasticLambdaInterchangeSingleMoveGenerator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/StochasticLambdaInterchangeSingleMoveGenerator.cs	(revision 4218)
@@ -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 System;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
+using HeuristicLab.Parameters;
+using System.Collections.Generic;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("StochasticLambdaInterchangeSingleMoveGenerator", "Generates one random lambda interchange move from a given VRP encoding.")]
+  [StorableClass]
+  public sealed class StochasticLambdaInterchangeSingleMoveGenerator : LambdaInterchangeMoveGenerator,
+    IStochasticOperator, ISingleMoveGenerator, IAlbaLambdaInterchangeMoveOperator, IMultiVRPMoveGenerator {
+    #region IMultiVRPMoveOperator Members
+
+    public ILookupParameter VRPMoveParameter {
+      get { return (ILookupParameter)Parameters["LambdaInterchangeMove"]; }
+    }
+
+    #endregion
+    
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    
+    [StorableConstructor]
+    private StochasticLambdaInterchangeSingleMoveGenerator(bool deserializing) : base(deserializing) { }
+
+    public StochasticLambdaInterchangeSingleMoveGenerator()
+      : base() {
+        Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
+    }
+
+    public static LambdaInterchangeMove Apply(AlbaEncoding individual, int cities, int lambda, IRandom rand) {
+      int route1Index = rand.Next(individual.Tours.Count);
+      Tour route1 = individual.Tours[route1Index];
+
+      int route2Index = rand.Next(individual.Tours.Count - 1);
+      if (route2Index >= route1Index)
+        route2Index += 1;
+      Tour route2 = individual.Tours[route2Index];
+
+      int length1 = rand.Next(Math.Min(lambda + 1, route1.Cities.Count + 1));
+      int index1 = rand.Next(route1.Cities.Count - length1 + 1);
+
+      int l2Min = 0;
+      if (length1 == 0)
+        l2Min = 1;
+      int length2 = rand.Next(l2Min, Math.Min(lambda + 1, route2.Cities.Count + 1));
+      int index2 = rand.Next(route2.Cities.Count - length2 + 1);
+
+      return new LambdaInterchangeMove(route1Index, index1, length1, route2Index, index2, length2);
+    }
+
+    protected override LambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda) {
+      List<LambdaInterchangeMove> moves = new List<LambdaInterchangeMove>();
+
+      LambdaInterchangeMove move = Apply(individual, Cities, lambda, RandomParameter.ActualValue);
+      if(move != null)
+        moves.Add(move);
+
+      return moves.ToArray();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/PermutationMoveOperator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/PermutationMoveOperator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/PermutationMoveOperator.cs	(revision 4218)
@@ -0,0 +1,55 @@
+﻿#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.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("PermutationMoveOperator", "A move operator for an Alba VRP representation using an inner permutation move operator.")]
+  [StorableClass]
+  public abstract class PermutationMoveOperator : AlbaMoveOperator {    
+    [Storable]
+    protected abstract IPermutationMoveOperator PermutationMoveOperatorParameter { get; set; }
+
+    [StorableConstructor]
+    protected PermutationMoveOperator(bool deserializing) : base(deserializing) { }
+
+    public PermutationMoveOperator()
+      : base() 
+    {
+    }
+
+    public override IOperation Apply() {
+      IOperation next = base.Apply();
+      
+      IVRPEncoding solution = VRPToursParameter.ActualValue;
+
+      PermutationMoveOperatorParameter.PermutationParameter.ActualName = VRPToursParameter.ActualName;
+      IAtomicOperation op = this.ExecutionContext.CreateChildOperation(PermutationMoveOperatorParameter);
+      op.Operator.Execute((IExecutionContext)op);
+
+      return next;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveEvaluator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveEvaluator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveEvaluator.cs	(revision 4218)
@@ -0,0 +1,59 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  [Item("PermutationTranslocationMoveEvaluator", "Evaluates a translocation or insertion move (3-opt) for a VRP representation.")]
+  [StorableClass]
+  public sealed class PermutationTranslocationMoveEvaluator : VRPMoveEvaluator, IAlbaTranslocationMoveOperator {
+    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
+      get { return (ILookupParameter<TranslocationMove>)Parameters["TranslocationMove"]; }
+      set { Parameters["TranslocationMove"].ActualValue = value.ActualValue; }
+    }
+
+    [StorableConstructor]
+    private PermutationTranslocationMoveEvaluator(bool deserializing) : base(deserializing) { }
+
+    public PermutationTranslocationMoveEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<TranslocationMove>("TranslocationMove", "The move to evaluate."));
+    }
+
+    protected override TourEvaluation GetMoveQuality() {
+      TranslocationMove move = TranslocationMoveParameter.ActualValue;
+      //perform move
+      AlbaEncoding newSolution = VRPToursParameter.ActualValue.Clone() as AlbaEncoding;
+      TranslocationManipulator.Apply(newSolution, move.Index1, move.Index2, move.Index3);
+
+      return VRPEvaluator.Evaluate(
+        newSolution,
+        DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,
+        DemandParameter.ActualValue, CapacityParameter.ActualValue,
+        FleetUsageFactor.ActualValue, TimeFactor.ActualValue, DistanceFactor.ActualValue, OverloadPenalty.ActualValue, TardinessPenalty.ActualValue,
+        CoordinatesParameter.ActualValue, DistanceMatrixParameter, UseDistanceMatrixParameter.ActualValue);
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveGenerator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveGenerator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveGenerator.cs	(revision 4218)
@@ -0,0 +1,91 @@
+﻿#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.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("PermutationTranslocationMoveGenerator", "An operator which generates translocation moves for a VRP representation.")]
+  [StorableClass]
+  public sealed class PermutationTranslocationMoveGenerator : PermutationMoveOperator, IAlbaTranslocationMoveOperator, IMultiMoveGenerator {
+    public IValueLookupParameter<TranslocationMoveGenerator> TranslocationMoveGeneratorParameter {
+      get { return (IValueLookupParameter<TranslocationMoveGenerator>)Parameters["TranslocationMoveGenerator"]; }
+    }
+
+    protected override IPermutationMoveOperator PermutationMoveOperatorParameter {
+      get { return TranslocationMoveGeneratorParameter.Value; }
+      set {
+        TranslocationMoveGeneratorParameter.Value = value as TranslocationMoveGenerator;
+        if (TranslocationMoveGeneratorParameter.Value is IMultiMoveGenerator) {
+          ((IMultiMoveGenerator)TranslocationMoveGeneratorParameter.Value).SampleSizeParameter.ActualName = SampleSizeParameter.Name;
+        }
+      }
+    }
+
+    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
+      get {
+        if (TranslocationMoveGeneratorParameter.Value != null)
+          return TranslocationMoveGeneratorParameter.Value.TranslocationMoveParameter;
+        else
+          return null;
+      }
+    }
+
+    public ILookupParameter<Permutation> PermutationParameter {
+      get {
+        if (TranslocationMoveGeneratorParameter.Value != null)
+          return TranslocationMoveGeneratorParameter.Value.PermutationParameter;
+        else
+          return null;
+      }
+    }
+
+    public IValueLookupParameter<IntValue> SampleSizeParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["SampleSize"]; }
+    }
+
+    [StorableConstructor]
+    private PermutationTranslocationMoveGenerator(bool deserializing) : base(deserializing) { }
+
+    public PermutationTranslocationMoveGenerator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<TranslocationMoveGenerator>("TranslocationMoveGenerator", "The move generator.",
+        new StochasticTranslocationMultiMoveGenerator()));
+      Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
+
+      ((IMultiMoveGenerator)TranslocationMoveGeneratorParameter.Value).SampleSizeParameter.ActualName = SampleSizeParameter.Name;
+    }
+
+    public override IOperation Apply() {
+      IOperation successor = base.Apply();
+
+      Permutation permutation = VRPToursParameter.ActualValue as Permutation;
+      string moveName = TranslocationMoveGeneratorParameter.ActualValue.TranslocationMoveParameter.Name;
+
+      return successor;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveHardTabuCriterion.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveHardTabuCriterion.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveHardTabuCriterion.cs	(revision 4218)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("PermutationTranslocationMoveHardTabuCriterion", "An operator which checks if translocation moves are tabu using a hard criterion for a VRP representation.")]
+  [StorableClass]
+  public sealed class PermutationTranslocationMoveHardTabuCriterion : PermutationMoveOperator, IAlbaTranslocationMoveOperator, ITabuChecker {
+    private TranslocationMoveHardTabuCriterion tabuChecker;
+    protected override IPermutationMoveOperator PermutationMoveOperatorParameter {
+      get { return tabuChecker; }
+      set { tabuChecker = value as TranslocationMoveHardTabuCriterion; }
+    }
+
+    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
+      get { return tabuChecker.TranslocationMoveParameter; }
+    }
+
+    public ILookupParameter<Permutation> PermutationParameter {
+      get { return tabuChecker.PermutationParameter; }
+    }
+
+    public ILookupParameter<BoolValue> MoveTabuParameter {
+      get { return tabuChecker.MoveTabuParameter; }
+    }
+
+    public ILookupParameter<DoubleValue> MoveQualityParameter {
+      get { return tabuChecker.MoveQualityParameter; }
+    }
+
+    public IValueLookupParameter<BoolValue> MaximizationParameter {
+      get { return tabuChecker.MaximizationParameter; }
+    }
+
+    [StorableConstructor]
+    private PermutationTranslocationMoveHardTabuCriterion(bool deserializing) : base(deserializing) { }
+
+    public PermutationTranslocationMoveHardTabuCriterion()
+      : base() {
+      tabuChecker = new TranslocationMoveHardTabuCriterion();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveMaker.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveMaker.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveMaker.cs	(revision 4218)
@@ -0,0 +1,70 @@
+﻿#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.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("PermutationTranslocationMoveMaker", "An operator which makes translocation moves for a VRP representation.")]
+  [StorableClass]
+  public sealed class PermutationTranslocationMoveMaker : AlbaMoveMaker, IAlbaTranslocationMoveOperator, IVRPMoveMaker {
+    private TranslocationMoveMaker moveMaker;
+
+    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
+      get { return moveMaker.TranslocationMoveParameter; }
+    }
+
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return moveMaker.QualityParameter; }
+    }
+
+    public ILookupParameter<DoubleValue> MoveQualityParameter {
+      get { return moveMaker.MoveQualityParameter; }
+    }
+
+    public ILookupParameter<Permutation> PermutationParameter {
+      get { return moveMaker.PermutationParameter; }
+    }
+
+    [StorableConstructor]
+    private PermutationTranslocationMoveMaker(bool deserializing) : base(deserializing) { }
+
+    public PermutationTranslocationMoveMaker()
+      : base() {
+      moveMaker = new TranslocationMoveMaker();
+    }
+
+    public override IOperation Apply() {
+      IOperation next = base.Apply();
+
+      IVRPEncoding solution = VRPToursParameter.ActualValue;
+
+      moveMaker.PermutationParameter.ActualName = VRPToursParameter.ActualName;
+      IAtomicOperation op = this.ExecutionContext.CreateChildOperation(moveMaker);
+      op.Operator.Execute((IExecutionContext)op);
+
+      return next;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveSoftTabuCriterion.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveSoftTabuCriterion.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveSoftTabuCriterion.cs	(revision 4218)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("PermutationTranslocationMoveSoftTabuCriterion", "An operator which checks if translocation moves are tabu using a soft criterion for a VRP representation.")]
+  [StorableClass]
+  public sealed class PermutationTranslocationMoveSoftTabuCriterion : PermutationMoveOperator, IAlbaTranslocationMoveOperator, ITabuChecker {
+    private TranslocationMoveSoftTabuCriterion tabuChecker;
+    protected override IPermutationMoveOperator PermutationMoveOperatorParameter {
+      get { return tabuChecker; }
+      set { tabuChecker = value as TranslocationMoveSoftTabuCriterion; }
+    }
+
+    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
+      get { return tabuChecker.TranslocationMoveParameter; }
+    }
+
+    public ILookupParameter<Permutation> PermutationParameter {
+      get { return tabuChecker.PermutationParameter; }
+    }
+
+    public ILookupParameter<BoolValue> MoveTabuParameter {
+      get { return tabuChecker.MoveTabuParameter; }
+    }
+
+    public ILookupParameter<DoubleValue> MoveQualityParameter {
+      get { return tabuChecker.MoveQualityParameter; }
+    }
+
+    public IValueLookupParameter<BoolValue> MaximizationParameter {
+      get { return tabuChecker.MaximizationParameter; }
+    }
+
+    [StorableConstructor]
+    private PermutationTranslocationMoveSoftTabuCriterion(bool deserializing) : base(deserializing) { }
+
+    public PermutationTranslocationMoveSoftTabuCriterion()
+      : base() {
+      tabuChecker = new TranslocationMoveSoftTabuCriterion();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveTabuMaker.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveTabuMaker.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/PermutationTranslocationMoveTabuMaker.cs	(revision 4218)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("PermutationTranslocationMoveTabuMaker", "An operator which makes translocation moves tabu for a VRP representation.")]
+  [StorableClass]
+  public sealed class PermutationTranslocationMoveTabuMaker : PermutationMoveOperator, IAlbaTranslocationMoveOperator, ITabuMaker {
+    private TranslocationMoveTabuMaker moveTabuMaker;
+    protected override IPermutationMoveOperator PermutationMoveOperatorParameter {
+      get { return moveTabuMaker; }
+      set { moveTabuMaker = value as TranslocationMoveTabuMaker; }
+    }
+
+    public ILookupParameter<Permutation> PermutationParameter {
+      get { return moveTabuMaker.PermutationParameter; }
+    }
+
+    public ILookupParameter<TranslocationMove> TranslocationMoveParameter {
+      get { return moveTabuMaker.TranslocationMoveParameter; }
+    }
+
+    public ILookupParameter<DoubleValue> MoveQualityParameter {
+      get { return moveTabuMaker.MoveQualityParameter; }
+    }
+
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return moveTabuMaker.QualityParameter; }
+    }
+
+    public IValueLookupParameter<BoolValue> MaximizationParameter {
+      get { return moveTabuMaker.MaximizationParameter; }
+    }
+
+    [StorableConstructor]
+    private PermutationTranslocationMoveTabuMaker(bool deserializing) : base(deserializing) { }
+
+    public PermutationTranslocationMoveTabuMaker()
+      : base() {
+      moveTabuMaker = new TranslocationMoveTabuMaker();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Creators/DefaultRepresentationCreator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Creators/DefaultRepresentationCreator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Creators/DefaultRepresentationCreator.cs	(revision 4218)
@@ -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 System.Collections.Generic;
+using HeuristicLab.Problems.VehicleRouting.Encodings;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Potvin;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
+  [Item("DefaultRepresentationCreator", "An operator which creates a VRP solution in the default representation.")]
+  [StorableClass]
+  public abstract class DefaultRepresentationCreator : VRPCreator {
+    protected abstract List<int> CreateSolution();
+
+    [StorableConstructor]
+    protected DefaultRepresentationCreator(bool deserializing) : base(deserializing) { }
+
+    public DefaultRepresentationCreator() : base() { }
+
+    public override IOperation Apply() {
+      //choose default encoding here
+      VRPToursParameter.ActualValue = PotvinEncoding.ConvertFrom(CreateSolution());
+
+      return base.Apply();
+    }    
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Creators/PushForwardInsertionCreator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Creators/PushForwardInsertionCreator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Creators/PushForwardInsertionCreator.cs	(revision 4218)
@@ -0,0 +1,279 @@
+﻿#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;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
+  [Item("PushForwardCreator", "The push forward insertion heuristic.  It is implemented as described in Sam, and Thangiah, R. (1999). A Hybrid Genetic Algorithms, Simulated Annealing and Tabu Search Heuristic for Vehicle Routing Problems with Time Windows. Practical Handbook of Genetic Algorithms, Volume III, pp 347–381.")]
+  [StorableClass]
+  public sealed class PushForwardCreator : DefaultRepresentationCreator, IStochasticOperator {
+    #region IStochasticOperator Members
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    #endregion
+
+    public IValueParameter<DoubleValue> Alpha {
+      get { return (IValueParameter<DoubleValue>)Parameters["Alpha"]; }
+    }
+    public IValueParameter<DoubleValue> AlphaVariance {
+      get { return (IValueParameter<DoubleValue>)Parameters["AlphaVariance"]; }
+    }
+    public IValueParameter<DoubleValue> Beta {
+      get { return (IValueParameter<DoubleValue>)Parameters["Beta"]; }
+    }
+    public IValueParameter<DoubleValue> BetaVariance {
+      get { return (IValueParameter<DoubleValue>)Parameters["BetaVariance"]; }
+    }
+    public IValueParameter<DoubleValue> Gamma {
+      get { return (IValueParameter<DoubleValue>)Parameters["Gamma"]; }
+    }
+    public IValueParameter<DoubleValue> GammaVariance {
+      get { return (IValueParameter<DoubleValue>)Parameters["GammaVariance"]; }
+    }
+
+    [StorableConstructor]
+    private PushForwardCreator(bool deserializing) : base(deserializing) { }
+
+    public PushForwardCreator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator."));
+      Parameters.Add(new ValueParameter<DoubleValue>("Alpha", "The alpha value.", new DoubleValue(0.7)));
+      Parameters.Add(new ValueParameter<DoubleValue>("AlphaVariance", "The alpha variance.", new DoubleValue(0.5)));
+      Parameters.Add(new ValueParameter<DoubleValue>("Beta", "The beta value.", new DoubleValue(0.1)));
+      Parameters.Add(new ValueParameter<DoubleValue>("BetaVariance", "The beta variance.", new DoubleValue(0.07)));
+      Parameters.Add(new ValueParameter<DoubleValue>("Gamma", "The gamma value.", new DoubleValue(0.2)));
+      Parameters.Add(new ValueParameter<DoubleValue>("GammaVariance", "The gamma variance.", new DoubleValue(0.14)));
+    }
+
+    // use the Box-Mueller transform in the polar form to generate a N(0,1) random variable out of two uniformly distributed random variables
+    private double Gauss(IRandom random) {
+      double u = 0.0, v = 0.0, s = 0.0;
+      do {
+        u = (random.NextDouble() * 2) - 1;
+        v = (random.NextDouble() * 2) - 1;
+        s = Math.Sqrt(u * u + v * v);
+      } while (s < Double.Epsilon || s > 1);
+      return u * Math.Sqrt((-2.0 * Math.Log(s)) / s);
+    }
+
+    private double N(double mu, double sigma, IRandom random) {
+      return mu + (sigma * Gauss(random)); // transform the random variable sampled from N(0,1) to N(mu,sigma)
+    }
+
+    private double CalculateDistance(int start, int end) {
+      double distance = 0.0;
+      DoubleMatrix coordinates = CoordinatesParameter.ActualValue;
+
+      distance =
+          Math.Sqrt(
+            Math.Pow(coordinates[start, 0] - coordinates[end, 0], 2) +
+            Math.Pow(coordinates[start, 1] - coordinates[end, 1], 2));
+
+      return distance;
+    }
+
+    private DoubleMatrix CreateDistanceMatrix() {
+      DoubleMatrix coordinates = CoordinatesParameter.ActualValue;
+      DoubleMatrix distanceMatrix = new DoubleMatrix(coordinates.Rows, coordinates.Rows);
+
+      for (int i = 0; i < distanceMatrix.Rows; i++) {
+        for (int j = i; j < distanceMatrix.Columns; j++) {
+          double distance = CalculateDistance(i, j);
+
+          distanceMatrix[i, j] = distance;
+          distanceMatrix[j, i] = distance;
+        }
+      }
+
+      return distanceMatrix;
+    }
+
+    private double Distance(int start, int end) {
+      double distance = 0.0;
+
+      if (UseDistanceMatrixParameter.ActualValue.Value) {
+        if (DistanceMatrixParameter.ActualValue == null) {
+          DistanceMatrixParameter.ActualValue = CreateDistanceMatrix();
+        }
+
+        distance = DistanceMatrixParameter.ActualValue[start, end];
+      } else {
+        distance = CalculateDistance(start, end);
+      }
+
+      return distance;
+    }
+
+    private double TravelDistance(List<int> route, int begin) {
+      double distance = 0;
+      for (int i = begin; i < route.Count - 1 && (i == begin || route[i] != 0); i++) {
+        distance += Distance(route[i], route[i + 1]);
+      }
+      return distance;
+    }
+
+    private bool SubrouteConstraintsOK(List<int> route, int begin) {
+      double t = 0.0, o = 0.0;
+      for (int i = begin + 1; i < route.Count; i++) {
+        t += Distance(route[i - 1], route[i]);
+        if (route[i] == 0) return (t < DueTimeParameter.ActualValue[0]); // violation on capacity constraint is handled below
+        else {
+          if (t > DueTimeParameter.ActualValue[route[i]]) return false;
+          t = Math.Max(ReadyTimeParameter.ActualValue[route[i]], t);
+          t += ServiceTimeParameter.ActualValue[route[i]];
+          o += DemandParameter.ActualValue[route[i]];
+          if (o > CapacityParameter.ActualValue.Value) return false; // premature exit on capacity constraint violation
+        }
+      }
+      return true;
+    }
+
+    private bool SubrouteTardinessOK(List<int> route, int begin) {
+      double t = 0.0;
+      for (int i = begin + 1; i < route.Count; i++) {
+        t += Distance(route[i - 1], route[i]);
+        if (route[i] == 0) {
+          if (t < DueTimeParameter.ActualValue[0]) return true;
+          else return false;
+        } else {
+          if (t > DueTimeParameter.ActualValue[route[i]]) return false;
+          t = Math.Max(ReadyTimeParameter.ActualValue[route[i]], t);
+          t += ServiceTimeParameter.ActualValue[route[i]];
+        }
+      }
+      return true;
+    }
+
+    private bool SubrouteLoadOK(List<int> route, int begin) {
+      double o = 0.0;
+      for (int i = begin + 1; i < route.Count; i++) {
+        if (route[i] == 0) return (o < CapacityParameter.ActualValue.Value);
+        else {
+          o += DemandParameter.ActualValue[route[i]];
+        }
+      }
+      return (o < CapacityParameter.ActualValue.Value);
+    }
+
+    protected override List<int> CreateSolution() {
+      double alpha, beta, gamma;
+      alpha = N(Alpha.Value.Value, Math.Sqrt(AlphaVariance.Value.Value), RandomParameter.ActualValue);
+      beta = N(Beta.Value.Value, Math.Sqrt(BetaVariance.Value.Value), RandomParameter.ActualValue);
+      gamma = N(Gamma.Value.Value, Math.Sqrt(GammaVariance.Value.Value), RandomParameter.ActualValue);
+
+      double x0 = CoordinatesParameter.ActualValue[0, 0];
+      double y0 = CoordinatesParameter.ActualValue[0, 1];
+      double distance = 0;
+      double cost = 0;
+      double minimumCost = double.MaxValue;
+      List<int> unroutedList = new List<int>();
+      List<double> costList = new List<double>();
+      int index;
+      int indexOfMinimumCost = -1;
+      int indexOfCustomer = -1;
+
+      /*-----------------------------------------------------------------------------
+       * generate cost list
+       *-----------------------------------------------------------------------------
+       */
+      for (int i = 1; i <= Cities; i++) {
+        distance = Distance(i, 0);
+        if (CoordinatesParameter.ActualValue[i, 0] < x0) distance = -distance;
+        cost = -alpha * distance + // distance 0 <-> City[i]
+                 beta * (DueTimeParameter.ActualValue[i]) + // latest arrival time
+                 gamma * (Math.Asin((CoordinatesParameter.ActualValue[i, 1] - y0) / distance) / 360 * distance); // polar angle
+
+        index = 0;
+        while (index < costList.Count && costList[index] < cost) index++;
+        costList.Insert(index, cost);
+        unroutedList.Insert(index, i);
+      }
+
+      /*------------------------------------------------------------------------------
+       * route customers according to cost list
+       *------------------------------------------------------------------------------
+       */
+      int routeIndex = 0;
+      int currentRoute = 0;
+      int c;
+      int customer = -1;
+      int subTourCount = 1;
+      List<int> route = new List<int>(CitiesParameter.ActualValue.Value + VehiclesParameter.ActualValue.Value - 1);
+      minimumCost = double.MaxValue;
+      indexOfMinimumCost = -1;
+      route.Add(0);
+      route.Add(0);
+      route.Insert(1, unroutedList[0]);
+      unroutedList.RemoveAt(0);
+      currentRoute = routeIndex;
+      routeIndex++;
+
+      do {
+        for (c = 0; c < unroutedList.Count; c++) {
+          for (int i = currentRoute + 1; i < route.Count; i++) {
+            route.Insert(i, (int)unroutedList[c]);
+            if (route[currentRoute] != 0) { throw new Exception("currentRoute not depot"); }
+            cost = TravelDistance(route, currentRoute);
+            if (cost < minimumCost && SubrouteConstraintsOK(route, currentRoute)) {
+              minimumCost = cost;
+              indexOfMinimumCost = i;
+              customer = (int)unroutedList[c];
+              indexOfCustomer = c;
+            }
+            route.RemoveAt(i);
+          }
+        }
+        // insert customer if found
+        if (indexOfMinimumCost != -1) {
+          route.Insert(indexOfMinimumCost, customer);
+          routeIndex++;
+          unroutedList.RemoveAt(indexOfCustomer);
+          costList.RemoveAt(indexOfCustomer);
+        } else { // no feasible customer found
+          routeIndex++;
+          route.Insert(routeIndex, 0);
+          currentRoute = routeIndex;
+          route.Insert(route.Count - 1, (int)unroutedList[0]);
+          unroutedList.RemoveAt(0);
+          routeIndex++;
+          subTourCount++;
+        }
+        // reset minimum		
+        minimumCost = double.MaxValue;
+        indexOfMinimumCost = -1;
+        indexOfCustomer = -1;
+        customer = -1;
+      } while (unroutedList.Count > 0);
+      while (route.Count < CitiesParameter.ActualValue.Value + VehiclesParameter.ActualValue.Value - 1)
+        route.Add(0);
+
+      return route;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Creators/RandomCreator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Creators/RandomCreator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Creators/RandomCreator.cs	(revision 4218)
@@ -0,0 +1,82 @@
+﻿#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;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
+  [Item("RandomCreator", "Creates a randomly initialized VRP solution.")]
+  [StorableClass]
+  public sealed class RandomCreator : DefaultRepresentationCreator, IStochasticOperator {
+    #region IStochasticOperator Members
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private RandomCreator(bool deserializing) : base(deserializing) { }
+
+    public RandomCreator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator."));
+    }
+
+    protected override List<int> CreateSolution() {
+      int cities = Cities;
+      int vehicles = VehiclesParameter.ActualValue.Value;
+
+      int[] perm = new int[cities + vehicles];
+      int[] sortingArray = new int[perm.Length - 2];
+      for (int i = 0; i < cities; i++)
+        perm[i] = i + 1;
+      for (int i = cities; i < cities + vehicles; i++)
+        perm[i] = 0;
+      for (int i = 0; i < perm.Length - 2; i++) {
+        sortingArray[i] = RandomParameter.ActualValue.Next(perm.Length * 2);
+      }
+      // shuffle perm from 1...n-1 by sorting sortingArray (perm[0] and perm[n] must stay 0)
+      bool done;
+      do {
+        done = true;
+        for (int i = 0; i < perm.Length - 3; i++) {
+          if (sortingArray[i] > sortingArray[i + 1]) {
+            int h = sortingArray[i];
+            sortingArray[i] = sortingArray[i + 1];
+            sortingArray[i + 1] = h;
+            h = perm[i + 1];
+            perm[i + 1] = perm[i + 2];
+            perm[i + 2] = h;
+            done = false;
+          }
+        }
+      } while (!done);
+
+      return new List<int>(perm);
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers/MultiVRPCrossover.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers/MultiVRPCrossover.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers/MultiVRPCrossover.cs	(revision 4218)
@@ -0,0 +1,144 @@
+﻿#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.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
+  [Item("MultiVRPCrossover", "Randomly selects and applies one of its crossovers every time it is called.")]
+  [StorableClass]
+  public class MultiVRPCrossover : StochasticMultiBranch<IVRPCrossover>, IVRPCrossover, IStochasticOperator {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    protected override bool CreateChildOperation {
+      get { return true; }
+    }
+
+    public ILookupParameter<ItemArray<IVRPEncoding>> ParentsParameter {
+      get { return (ScopeTreeLookupParameter<IVRPEncoding>)Parameters["Parents"]; }
+    }
+
+    public ILookupParameter<IVRPEncoding> ChildParameter {
+      get { return (ILookupParameter<IVRPEncoding>)Parameters["Child"]; }
+    }
+
+    public int Cities {
+      get { return CoordinatesParameter.ActualValue.Rows - 1; }
+    }
+    public ILookupParameter<DoubleMatrix> CoordinatesParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
+    }
+    public ILookupParameter<DoubleMatrix> DistanceMatrixParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
+    }
+    public ILookupParameter<BoolValue> UseDistanceMatrixParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters["UseDistanceMatrix"]; }
+    }
+    public ILookupParameter<IntValue> VehiclesParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["Vehicles"]; }
+    }
+    public ILookupParameter<DoubleValue> CapacityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Capacity"]; }
+    }
+    public ILookupParameter<DoubleArray> DemandParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["Demand"]; }
+    }
+    public ILookupParameter<DoubleArray> ReadyTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["ReadyTime"]; }
+    }
+    public ILookupParameter<DoubleArray> DueTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["DueTime"]; }
+    }
+    public ILookupParameter<DoubleArray> ServiceTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["ServiceTime"]; }
+    }
+
+    [StorableConstructor]
+    private MultiVRPCrossover(bool deserializing) : base(deserializing) { }
+    public MultiVRPCrossover()
+      : base() {
+       Parameters.Add(new ScopeTreeLookupParameter<IVRPEncoding>("Parents", "The parent permutations which should be crossed."));
+      ParentsParameter.ActualName = "VRPTours";
+      Parameters.Add(new LookupParameter<IVRPEncoding>("Child", "The child permutation resulting from the crossover."));
+      ChildParameter.ActualName = "VRPTours";
+
+      Parameters.Add(new ValueLookupParameter<IntValue>("Cities", "The city count."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The coordinates of the cities."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
+      Parameters.Add(new LookupParameter<BoolValue>("UseDistanceMatrix", "True if a distance matrix should be calculated and used for evaluation, otherwise false."));
+      Parameters.Add(new LookupParameter<IntValue>("Vehicles", "The number of vehicles."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Capacity", "The capacity of each vehicle."));
+      Parameters.Add(new LookupParameter<DoubleArray>("Demand", "The demand of each customer."));
+      Parameters.Add(new LookupParameter<DoubleArray>("ReadyTime", "The ready time of each customer."));
+      Parameters.Add(new LookupParameter<DoubleArray>("DueTime", "The due time of each customer."));
+      Parameters.Add(new LookupParameter<DoubleArray>("ServiceTime", "The service time of each customer."));
+
+      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(IVRPCrossover))) {
+        if (!typeof(MultiOperator<IVRPCrossover>).IsAssignableFrom(type))
+          Operators.Add((IVRPCrossover)Activator.CreateInstance(type), true);
+      }
+    }
+
+    protected override void Operators_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<IVRPCrossover>> e) {
+      base.Operators_ItemsReplaced(sender, e);
+      ParameterizeCrossovers();
+    }
+
+    protected override void Operators_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<IVRPCrossover>> e) {
+      base.Operators_ItemsAdded(sender, e);
+      ParameterizeCrossovers();
+    }
+
+    private void ParameterizeCrossovers() {
+      foreach (IVRPCrossover crossover in Operators.OfType<IVRPCrossover>()) {
+        crossover.ChildParameter.ActualName = ChildParameter.Name;
+        crossover.ParentsParameter.ActualName = ParentsParameter.Name;
+
+        if (crossover.CoordinatesParameter != null) crossover.CoordinatesParameter.ActualName = CoordinatesParameter.Name;
+        if (crossover.DistanceMatrixParameter != null) crossover.DistanceMatrixParameter.ActualName = DistanceMatrixParameter.Name;
+        if (crossover.UseDistanceMatrixParameter != null) crossover.UseDistanceMatrixParameter.ActualName = UseDistanceMatrixParameter.Name;
+        if (crossover.VehiclesParameter != null) crossover.VehiclesParameter.ActualName = VehiclesParameter.Name;
+        if (crossover.CapacityParameter != null) crossover.CapacityParameter.ActualName = CapacityParameter.Name;
+        if (crossover.DemandParameter != null) crossover.DemandParameter.ActualName = DemandParameter.Name;
+        if (crossover.ReadyTimeParameter != null) crossover.ReadyTimeParameter.ActualName = ReadyTimeParameter.Name;
+        if (crossover.DueTimeParameter != null) crossover.DueTimeParameter.ActualName = DueTimeParameter.Name;
+        if (crossover.ServiceTimeParameter != null) crossover.ServiceTimeParameter.ActualName = ServiceTimeParameter.Name;
+      }
+      foreach (IStochasticOperator crossover in Operators.OfType<IStochasticOperator>()) {
+        crossover.RandomParameter.ActualName = RandomParameter.Name;
+      }
+    }
+
+    public override IOperation Apply() {
+      if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one permutation crossover to choose from.");
+      return base.Apply();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers/MultiVRPManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers/MultiVRPManipulator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers/MultiVRPManipulator.cs	(revision 4218)
@@ -0,0 +1,136 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
+  [Item("MultiVRPManipulator", "Randomly selects and applies one of its manipulators every time it is called.")]
+  [StorableClass]
+  public class MultiVRPManipulator : StochasticMultiBranch<IVRPManipulator>, IVRPManipulator, IStochasticOperator {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    protected override bool CreateChildOperation {
+      get { return true; }
+    }
+
+    public ILookupParameter<IVRPEncoding> VRPToursParameter {
+      get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
+    }
+
+    public int Cities {
+      get { return CoordinatesParameter.ActualValue.Rows - 1; }
+    }
+    public ILookupParameter<DoubleMatrix> CoordinatesParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
+    }
+    public ILookupParameter<DoubleMatrix> DistanceMatrixParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
+    }
+    public ILookupParameter<BoolValue> UseDistanceMatrixParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters["UseDistanceMatrix"]; }
+    }
+    public ILookupParameter<IntValue> VehiclesParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["Vehicles"]; }
+    }
+    public ILookupParameter<DoubleValue> CapacityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Capacity"]; }
+    }
+    public ILookupParameter<DoubleArray> DemandParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["Demand"]; }
+    }
+    public ILookupParameter<DoubleArray> ReadyTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["ReadyTime"]; }
+    }
+    public ILookupParameter<DoubleArray> DueTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["DueTime"]; }
+    }
+    public ILookupParameter<DoubleArray> ServiceTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["ServiceTime"]; }
+    }
+
+    [StorableConstructor]
+    private MultiVRPManipulator(bool deserializing) : base(deserializing) { }
+    public MultiVRPManipulator()
+      : base() {
+      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours to be manipulated."));
+
+      Parameters.Add(new ValueLookupParameter<IntValue>("Cities", "The city count."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The coordinates of the cities."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
+      Parameters.Add(new LookupParameter<BoolValue>("UseDistanceMatrix", "True if a distance matrix should be calculated and used for evaluation, otherwise false."));
+      Parameters.Add(new LookupParameter<IntValue>("Vehicles", "The number of vehicles."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Capacity", "The capacity of each vehicle."));
+      Parameters.Add(new LookupParameter<DoubleArray>("Demand", "The demand of each customer."));
+      Parameters.Add(new LookupParameter<DoubleArray>("ReadyTime", "The ready time of each customer."));
+      Parameters.Add(new LookupParameter<DoubleArray>("DueTime", "The due time of each customer."));
+      Parameters.Add(new LookupParameter<DoubleArray>("ServiceTime", "The service time of each customer."));
+
+      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(IVRPManipulator))) {
+        if (!typeof(MultiOperator<IVRPManipulator>).IsAssignableFrom(type))
+          Operators.Add((IVRPManipulator)Activator.CreateInstance(type), true);
+      }
+    }
+
+    protected override void Operators_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<IVRPManipulator>> e) {
+      base.Operators_ItemsReplaced(sender, e);
+      ParameterizeManipulators();
+    }
+
+    protected override void Operators_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<IVRPManipulator>> e) {
+      base.Operators_ItemsAdded(sender, e);
+      ParameterizeManipulators();
+    }
+
+    private void ParameterizeManipulators() {
+      foreach (IVRPManipulator manipulator in Operators.OfType<IVRPManipulator>()) {
+        manipulator.VRPToursParameter.ActualName = VRPToursParameter.Name;
+
+        if (manipulator.CoordinatesParameter != null) manipulator.CoordinatesParameter.ActualName = CoordinatesParameter.Name;
+        if (manipulator.DistanceMatrixParameter != null) manipulator.DistanceMatrixParameter.ActualName = DistanceMatrixParameter.Name;
+        if (manipulator.UseDistanceMatrixParameter != null) manipulator.UseDistanceMatrixParameter.ActualName = UseDistanceMatrixParameter.Name;
+        if (manipulator.VehiclesParameter != null) manipulator.VehiclesParameter.ActualName = VehiclesParameter.Name;
+        if (manipulator.CapacityParameter != null) manipulator.CapacityParameter.ActualName = CapacityParameter.Name;
+        if (manipulator.DemandParameter != null) manipulator.DemandParameter.ActualName = DemandParameter.Name;
+        if (manipulator.ReadyTimeParameter != null) manipulator.ReadyTimeParameter.ActualName = ReadyTimeParameter.Name;
+        if (manipulator.DueTimeParameter != null) manipulator.DueTimeParameter.ActualName = DueTimeParameter.Name;
+        if (manipulator.ServiceTimeParameter != null) manipulator.ServiceTimeParameter.ActualName = ServiceTimeParameter.Name;
+      }
+      foreach (IStochasticOperator manipulator in Operators.OfType<IStochasticOperator>()) {
+        manipulator.RandomParameter.ActualName = RandomParameter.Name;
+      }
+    }
+
+    public override IOperation Apply() {
+      if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one permutation manipulator to choose from.");
+      return base.Apply();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/Interfaces/IMultiVRPMoveGenerator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/Interfaces/IMultiVRPMoveGenerator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/Interfaces/IMultiVRPMoveGenerator.cs	(revision 4218)
@@ -0,0 +1,29 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
+  public interface IMultiVRPMoveGenerator : IMultiVRPMoveOperator, ISingleMoveGenerator {
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/Interfaces/IMultiVRPMoveOperator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/Interfaces/IMultiVRPMoveOperator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/Interfaces/IMultiVRPMoveOperator.cs	(revision 4218)
@@ -0,0 +1,30 @@
+﻿#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;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
+  public interface IMultiVRPMoveOperator : IVRPMoveOperator {
+    ILookupParameter VRPMoveParameter { get; }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/Interfaces/IVRPMove.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/Interfaces/IVRPMove.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/Interfaces/IVRPMove.cs	(revision 4218)
@@ -0,0 +1,38 @@
+﻿#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.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
+  public interface IVRPMove : IItem {
+    TourEvaluation GetMoveQuality(IVRPEncoding individual, 
+        DoubleArray dueTimeArray, DoubleArray serviceTimeArray, DoubleArray readyTimeArray, DoubleArray demandArray, 
+        DoubleValue capacity,DoubleMatrix coordinates,
+      DoubleValue fleetUsageFactor, DoubleValue timeFactor, DoubleValue distanceFactor,
+      DoubleValue overloadPenalty, DoubleValue tardinessPenalty,
+      ILookupParameter<DoubleMatrix> distanceMatrix, BoolValue useDistanceMatrix);
+
+    void MakeMove(IRandom random, IVRPEncoding individual);
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveEvaluator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveEvaluator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveEvaluator.cs	(revision 4218)
@@ -0,0 +1,64 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  [Item("MultiVRPMoveEvaluator", "Evaluates a move for the VRP representation.")]
+  [StorableClass]
+  public sealed class MultiVRPMoveEvaluator : VRPMoveEvaluator, IMultiVRPMoveOperator {
+    public ILookupParameter VRPMoveParameter {
+      get { return (ILookupParameter)Parameters["VRPMove"]; }
+    }
+
+    [StorableConstructor]
+    private MultiVRPMoveEvaluator(bool deserializing) : base(deserializing) { }
+
+    public MultiVRPMoveEvaluator()
+      : base() {
+        Parameters.Add(new LookupParameter<IVRPMove>("VRPMove", "The generated moves."));
+    }
+
+    protected override TourEvaluation GetMoveQuality() {
+      IVRPMove move = VRPMoveParameter.ActualValue as IVRPMove;
+
+      return move.GetMoveQuality(
+        VRPToursParameter.ActualValue,
+        DueTimeParameter.ActualValue,
+        ServiceTimeParameter.ActualValue,
+        ReadyTimeParameter.ActualValue,
+        DemandParameter.ActualValue,
+        CapacityParameter.ActualValue,
+        CoordinatesParameter.ActualValue,
+        FleetUsageFactor.ActualValue, 
+        TimeFactor.ActualValue, 
+        DistanceFactor.ActualValue, 
+        OverloadPenalty.ActualValue, 
+        TardinessPenalty.ActualValue,
+        DistanceMatrixParameter,
+        UseDistanceMatrixParameter.ActualValue);
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveGenerator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveGenerator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveGenerator.cs	(revision 4218)
@@ -0,0 +1,219 @@
+﻿#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.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Data;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
+  [Item("MultiVRPMoveGenerator", "Randomly selects and applies its move generators.")]
+  [StorableClass]
+  public class MultiVRPMoveGenerator : CheckedMultiOperator<IMultiVRPMoveGenerator>, IMultiVRPMoveOperator, 
+    IStochasticOperator, IMultiMoveGenerator {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+
+    public IValueLookupParameter<IntValue> SampleSizeParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["SampleSize"]; }
+    }
+
+    public ILookupParameter<IVRPEncoding> VRPToursParameter {
+      get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
+    }
+
+    public ILookupParameter VRPMoveParameter {
+      get { return (ILookupParameter)Parameters["VRPMove"]; }
+    }
+
+    public int Cities {
+      get { return CoordinatesParameter.ActualValue.Rows - 1; }
+    }
+    public ILookupParameter<DoubleMatrix> CoordinatesParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
+    }
+    public ILookupParameter<DoubleMatrix> DistanceMatrixParameter {
+      get { return (ILookupParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
+    }
+    public ILookupParameter<BoolValue> UseDistanceMatrixParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters["UseDistanceMatrix"]; }
+    }
+    public ILookupParameter<IntValue> VehiclesParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["Vehicles"]; }
+    }
+    public ILookupParameter<DoubleValue> CapacityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Capacity"]; }
+    }
+    public ILookupParameter<DoubleArray> DemandParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["Demand"]; }
+    }
+    public ILookupParameter<DoubleArray> ReadyTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["ReadyTime"]; }
+    }
+    public ILookupParameter<DoubleArray> DueTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["DueTime"]; }
+    }
+    public ILookupParameter<DoubleArray> ServiceTimeParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters["ServiceTime"]; }
+    }
+
+    public ValueLookupParameter<DoubleArray> ProbabilitiesParameter {
+      get { return (ValueLookupParameter<DoubleArray>)Parameters["Probabilities"]; }
+    }
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+
+    public DoubleArray Probabilities {
+      get { return ProbabilitiesParameter.Value; }
+      set { ProbabilitiesParameter.Value = value; }
+    }
+
+    [StorableConstructor]
+    private MultiVRPMoveGenerator(bool deserializing) : base(deserializing) { }
+    public MultiVRPMoveGenerator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
+      Parameters.Add(new ValueLookupParameter<DoubleArray>("Probabilities", "The array of relative probabilities for each operator.", new DoubleArray()));
+
+      Parameters.Add(new ValueLookupParameter<IntValue>("Cities", "The city count."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The coordinates of the cities."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
+      Parameters.Add(new LookupParameter<BoolValue>("UseDistanceMatrix", "True if a distance matrix should be calculated and used for evaluation, otherwise false."));
+      Parameters.Add(new LookupParameter<IntValue>("Vehicles", "The number of vehicles."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Capacity", "The capacity of each vehicle."));
+      Parameters.Add(new LookupParameter<DoubleArray>("Demand", "The demand of each customer."));
+      Parameters.Add(new LookupParameter<DoubleArray>("ReadyTime", "The ready time of each customer."));
+      Parameters.Add(new LookupParameter<DoubleArray>("DueTime", "The due time of each customer."));
+      Parameters.Add(new LookupParameter<DoubleArray>("ServiceTime", "The service time of each customer."));
+
+      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours."));
+      Parameters.Add(new LookupParameter<IVRPMove>("VRPMove", "The generated moves."));
+
+      foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(IMultiVRPMoveGenerator))) {
+        if (!typeof(MultiOperator<IMultiVRPMoveGenerator>).IsAssignableFrom(type))
+          Operators.Add((IMultiVRPMoveGenerator)Activator.CreateInstance(type), true);
+      }
+    }
+
+    protected override void Operators_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<IMultiVRPMoveGenerator>> e) {
+      base.Operators_ItemsRemoved(sender, e);
+      if (Probabilities != null && Probabilities.Length > Operators.Count) {
+        List<double> probs = new List<double>(Probabilities.Cast<double>());
+        var sorted = e.Items.OrderByDescending(x => x.Index);
+        foreach (IndexedItem<IMultiVRPMoveGenerator> item in sorted)
+          if (probs.Count > item.Index) probs.RemoveAt(item.Index);
+        Probabilities = new DoubleArray(probs.ToArray());
+      }
+    }
+
+    protected override void Operators_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<IMultiVRPMoveGenerator>> e) {
+      base.Operators_ItemsReplaced(sender, e);
+      ParameterizeMoveGenerators();
+    }
+
+    protected override void Operators_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<IMultiVRPMoveGenerator>> e) {
+      base.Operators_ItemsAdded(sender, e);
+      ParameterizeMoveGenerators();
+
+      if (Probabilities != null && Probabilities.Length < Operators.Count) {
+        double avg = (Probabilities.Where(x => x > 0).Count() > 0) ? (Probabilities.Where(x => x > 0).Average()) : (1);
+        // add the average of all probabilities in the respective places (the new operators)
+        var added = e.Items.OrderBy(x => x.Index).ToList();
+        int insertCount = 0;
+        DoubleArray probs = new DoubleArray(Operators.Count);
+        for (int i = 0; i < Operators.Count; i++) {
+          if (insertCount < added.Count && i == added[insertCount].Index) {
+            probs[i] = avg;
+            insertCount++;
+          } else if (i - insertCount < Probabilities.Length) {
+            probs[i] = Probabilities[i - insertCount];
+          } else probs[i] = avg;
+        }
+        Probabilities = probs;
+      }
+    }
+
+    private void ParameterizeMoveGenerators() {
+      foreach (IMultiVRPMoveOperator moveGenerator in Operators.OfType<IMultiVRPMoveOperator>()) {
+        if (moveGenerator.CoordinatesParameter != null) moveGenerator.CoordinatesParameter.ActualName = CoordinatesParameter.Name;
+        if (moveGenerator.DistanceMatrixParameter != null) moveGenerator.DistanceMatrixParameter.ActualName = DistanceMatrixParameter.Name;
+        if (moveGenerator.UseDistanceMatrixParameter != null) moveGenerator.UseDistanceMatrixParameter.ActualName = UseDistanceMatrixParameter.Name;
+        if (moveGenerator.VehiclesParameter != null) moveGenerator.VehiclesParameter.ActualName = VehiclesParameter.Name;
+        if (moveGenerator.CapacityParameter != null) moveGenerator.CapacityParameter.ActualName = CapacityParameter.Name;
+        if (moveGenerator.DemandParameter != null) moveGenerator.DemandParameter.ActualName = DemandParameter.Name;
+        if (moveGenerator.ReadyTimeParameter != null) moveGenerator.ReadyTimeParameter.ActualName = ReadyTimeParameter.Name;
+        if (moveGenerator.DueTimeParameter != null) moveGenerator.DueTimeParameter.ActualName = DueTimeParameter.Name;
+        if (moveGenerator.ServiceTimeParameter != null) moveGenerator.ServiceTimeParameter.ActualName = ServiceTimeParameter.Name;
+
+        moveGenerator.VRPToursParameter.ActualName = VRPToursParameter.Name;
+        moveGenerator.VRPMoveParameter.ActualName = VRPMoveParameter.Name;
+      }
+      foreach (IStochasticOperator moveGenerator in Operators.OfType<IStochasticOperator>()) {
+        moveGenerator.RandomParameter.ActualName = RandomParameter.Name;
+      }
+    }
+
+    public override IOperation Apply() {
+      if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one VRP move generator choose from.");
+      OperationCollection next = new OperationCollection(base.Apply());
+
+      for (int i = 0; i < SampleSizeParameter.ActualValue.Value; i++) {
+        IRandom random = RandomParameter.ActualValue;
+        DoubleArray probabilities = ProbabilitiesParameter.ActualValue;
+        if (probabilities.Length != Operators.Count) {
+          throw new InvalidOperationException(Name + ": The list of probabilities has to match the number of operators");
+        }
+        IOperator successor = null;
+        var checkedOperators = Operators.CheckedItems;
+        if (checkedOperators.Count() > 0) {
+          // select a random operator from the checked operators
+          double sum = (from indexedItem in checkedOperators select probabilities[indexedItem.Index]).Sum();
+          if (sum == 0) throw new InvalidOperationException(Name + ": All selected operators have zero probability.");
+          double r = random.NextDouble() * sum;
+          sum = 0;
+          foreach (var indexedItem in checkedOperators) {
+            sum += probabilities[indexedItem.Index];
+            if (sum > r) {
+              successor = indexedItem.Value;
+              break;
+            }
+          }
+        }
+
+        if (successor != null) {
+          next.Insert(0, ExecutionContext.CreateChildOperation(successor));
+        }
+      }
+
+      return next;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveMaker.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveMaker.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveMaker.cs	(revision 4218)
@@ -0,0 +1,128 @@
+﻿#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 System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.General{
+  [Item("MultiVRPMoveMaker", "Peforms a lambda interchange moves on a given VRP encoding and updates the quality.")]
+  [StorableClass]
+  public class LambdaInterchangeMoveMaker : VRPMoveOperator, IMoveMaker, IMultiVRPMoveOperator {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
+    }
+    public ILookupParameter VRPMoveParameter {
+      get { return (ILookupParameter)Parameters["VRPMove"]; }
+    }
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
+    }
+
+    public ILookupParameter<DoubleValue> MoveVehcilesUtilizedParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveVehiclesUtilized"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveTravelTimeParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveTravelTime"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveDistanceParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveDistance"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveOverloadParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveOverload"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveTardinessParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveTardiness"]; }
+    }
+
+    public ILookupParameter<DoubleValue> VehcilesUtilizedParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["VehiclesUtilized"]; }
+    }
+    public ILookupParameter<DoubleValue> TravelTimeParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["TravelTime"]; }
+    }
+    public ILookupParameter<DoubleValue> DistanceParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Distance"]; }
+    }
+    public ILookupParameter<DoubleValue> OverloadParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Overload"]; }
+    }
+    public ILookupParameter<DoubleValue> TardinessParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; }
+    }
+
+    [StorableConstructor]
+    private LambdaInterchangeMoveMaker(bool deserializing) : base(deserializing) { }
+
+    public LambdaInterchangeMoveMaker()
+      : base() {
+      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<IVRPMove>("VRPMove", "The generated moves."));
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
+
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveVehiclesUtilized", "The number of vehicles utilized."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveTravelTime", "The total travel time."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveDistance", "The distance."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveOverload", "The overload."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveTardiness", "The tardiness."));
+
+      Parameters.Add(new LookupParameter<DoubleValue>("VehiclesUtilized", "The number of vehicles utilized."));
+      Parameters.Add(new LookupParameter<DoubleValue>("TravelTime", "The total travel time."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Distance", "The distance."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Overload", "The overload."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness."));
+
+    }
+
+    public override IOperation Apply() {
+      IOperation next = base.Apply();
+
+      IVRPEncoding solution = VRPToursParameter.ActualValue as IVRPEncoding;
+
+      IVRPMove move = VRPMoveParameter.ActualValue as IVRPMove;
+      DoubleValue moveQuality = MoveQualityParameter.ActualValue;
+      DoubleValue quality = QualityParameter.ActualValue;
+     
+      //perform move
+      move.MakeMove(RandomParameter.ActualValue, VRPToursParameter.ActualValue);
+
+      quality.Value = moveQuality.Value;
+      VehcilesUtilizedParameter.ActualValue = MoveVehcilesUtilizedParameter.ActualValue;
+      TravelTimeParameter.ActualValue = MoveTravelTimeParameter.ActualValue;
+      DistanceParameter.ActualValue = MoveDistanceParameter.ActualValue;
+      OverloadParameter.ActualValue = MoveOverloadParameter.ActualValue;
+      TardinessParameter.ActualValue = MoveTardinessParameter.ActualValue;
+
+      return next;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/PotvinCrossover.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/PotvinCrossover.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/PotvinCrossover.cs	(revision 4218)
@@ -0,0 +1,143 @@
+﻿#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.Optimization;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinCrossover", "A VRP crossover operation.")]
+  [StorableClass]
+  public abstract class PotvinCrossover : VRPCrossover, IStochasticOperator {
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+
+    [StorableConstructor]
+    protected PotvinCrossover(bool deserializing) : base(deserializing) { }
+
+    public PotvinCrossover() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
+    }
+
+    protected abstract PotvinEncoding Crossover(IRandom random, PotvinEncoding parent1, PotvinEncoding parent2);
+
+    protected bool FindInsertionPlace(PotvinEncoding individual, int city, out int route, out int place) {
+      return individual.FindInsertionPlace(
+        DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,
+        DemandParameter.ActualValue, CapacityParameter.ActualValue, CoordinatesParameter.ActualValue,
+        DistanceMatrixParameter, UseDistanceMatrixParameter.ActualValue,
+        city, -1, out route, out place);
+    }
+
+    protected Tour FindRoute(PotvinEncoding solution, int city) {
+      Tour found = null;
+
+      foreach (Tour tour in solution.Tours) {
+        if (tour.Cities.Contains(city)) {
+          found = tour;
+          break;
+        }
+      }
+
+      return found;
+    }
+
+    protected bool Repair(IRandom random, PotvinEncoding solution, Tour newTour) {
+      bool success = true;
+      
+      //remove duplicates from new tour      
+      for (int i = 0; i < newTour.Cities.Count; i++) {
+        for (int j = 0; j < newTour.Cities.Count; j++) {
+          if (newTour.Cities[i] == newTour.Cities[j] && i != j) {
+            if (random.NextDouble() < 0.5)
+              newTour.Cities[i] = 0;
+            else
+              newTour.Cities[j] = 0;
+          }
+        }
+      }
+      while(newTour.Cities.Contains(0))
+        newTour.Cities.Remove(0);
+
+      //remove duplicates from old tours
+      for (int i = 0; i < newTour.Cities.Count; i++) {
+        foreach (Tour tour in solution.Tours) {
+          if (tour != newTour && tour.Cities.Contains(newTour.Cities[i])) {
+            tour.Cities.Remove(newTour.Cities[i]);
+          }
+        }
+      }
+
+      //remove empty tours
+      List<Tour> toBeDeleted = new List<Tour>();
+      foreach (Tour tour in solution.Tours) {
+        if (tour.Cities.Count == 0)
+          toBeDeleted.Add(tour);
+      }
+      foreach (Tour tour in toBeDeleted) {
+        solution.Tours.Remove(tour);
+      }
+
+      //route unrouted vehicles
+      int index = 0;
+      while (index < solution.Unrouted.Count && success) {
+        int unrouted = solution.Unrouted[index];
+
+        int route, place;
+        if(FindInsertionPlace(solution, unrouted, out route, out place)) {
+          solution.Tours[route].Cities.Insert(place, unrouted);
+        } else {
+          success = false;
+        }
+
+        index++;
+      }
+
+      for (int i = 0; i < index; i++)
+        solution.Unrouted.RemoveAt(0);
+
+      return success;
+    }
+
+    public override IOperation Apply() {
+      ItemArray<IVRPEncoding> parents = new ItemArray<IVRPEncoding>(ParentsParameter.ActualValue.Length);
+      for (int i = 0; i < ParentsParameter.ActualValue.Length; i++) {
+        IVRPEncoding solution = ParentsParameter.ActualValue[i];
+
+        if (!(solution is PotvinEncoding)) {
+          parents[i] = PotvinEncoding.ConvertFrom(solution);
+        } else {
+          parents[i] = solution;
+        }
+      }
+      ParentsParameter.ActualValue = parents;
+
+      ChildParameter.ActualValue = Crossover(RandomParameter.ActualValue, parents[0] as PotvinEncoding, parents[1] as PotvinEncoding);
+
+      return base.Apply();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/RouteBasedCrossover.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/RouteBasedCrossover.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/RouteBasedCrossover.cs	(revision 4218)
@@ -0,0 +1,64 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("RouteBasedCrossover", "The RBX crossover for a VRP representations.  It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")]
+  [StorableClass]
+  public sealed class RouteBasedCrossover : PotvinCrossover {
+    [StorableConstructor]
+    private RouteBasedCrossover(bool deserializing) : base(deserializing) { }
+
+    public RouteBasedCrossover()
+      : base() { }
+     
+    protected override PotvinEncoding Crossover(IRandom random, PotvinEncoding parent1, PotvinEncoding parent2) {
+      PotvinEncoding child = parent2.Clone() as PotvinEncoding;
+
+      int tourParent1 = random.Next(parent1.Tours.Count);
+      Tour replacing = parent1.Tours[tourParent1].Clone() as Tour;
+
+      int tourParent2 = random.Next(child.Tours.Count);
+      Tour replaced = child.Tours[tourParent2];
+
+      child.Tours.Remove(replaced);
+      child.Tours.Add(replacing);
+
+      foreach (int city in replaced.Cities)
+        if (FindRoute(child, city) == null && !child.Unrouted.Contains(city))
+          child.Unrouted.Add(city);
+
+      if (Repair(random, child, replacing))
+        return child;
+      else {
+        if(random.NextDouble() < 0.5)
+          return parent1.Clone() as PotvinEncoding;
+        else
+          return parent2.Clone() as PotvinEncoding;
+      }
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/SequenceBasedCrossover.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/SequenceBasedCrossover.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/SequenceBasedCrossover.cs	(revision 4218)
@@ -0,0 +1,78 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("SequenceBasedCrossover", "The SBX crossover for a VRP representations.  It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")]
+  [StorableClass]
+  public sealed class SequenceBasedCrossover : PotvinCrossover {
+    [StorableConstructor]
+    private SequenceBasedCrossover(bool deserializing) : base(deserializing) { }
+
+    public SequenceBasedCrossover()
+      : base() { }
+        
+    protected override PotvinEncoding Crossover(IRandom random, PotvinEncoding parent1, PotvinEncoding parent2) {
+      PotvinEncoding child = parent1.Clone() as PotvinEncoding;
+      Tour newTour = new Tour();
+
+      int breakPoint1 = random.Next(1, Cities + 1);
+      Tour tour1 = FindRoute(child, breakPoint1);
+      breakPoint1 = tour1.Cities.IndexOf(breakPoint1);
+
+      for (int i = 0; i < breakPoint1; i++)
+        newTour.Cities.Add(tour1.Cities[i]);
+
+      int breakPoint2 = random.Next(1, Cities + 1);
+      Tour tour2 = FindRoute(parent2, breakPoint2);
+      breakPoint2 = tour2.Cities.IndexOf(breakPoint2);
+
+      for (int i = breakPoint2; i < tour2.Cities.Count; i++)
+        newTour.Cities.Add(tour2.Cities[i]);
+
+      child.Tours.Remove(tour1);
+      child.Tours.Add(newTour);
+
+      foreach (int city in tour1.Cities)
+        if (FindRoute(child, city) == null && !child.Unrouted.Contains(city))
+          child.Unrouted.Add(city);
+
+      foreach (int city in tour2.Cities)
+        if (FindRoute(child, city) == null && !child.Unrouted.Contains(city))
+          child.Unrouted.Add(city);
+
+      if (Feasible(newTour) &&
+          Repair(random, child, newTour)) {
+        return child;
+      } else {
+        if (random.NextDouble() < 0.5)
+          return parent1.Clone() as PotvinEncoding;
+        else
+          return parent2.Clone() as PotvinEncoding;
+      }
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/LocalSearchManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/LocalSearchManipulator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/LocalSearchManipulator.cs	(revision 4218)
@@ -0,0 +1,113 @@
+﻿#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 System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("LocalSearchManipulator", "The LSM operator which manipulates a VRP representation.  It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")]
+  [StorableClass]
+  public sealed class LocalSearchManipulator : PotvinManipulator {
+    [StorableConstructor]
+    private LocalSearchManipulator(bool deserializing) : base(deserializing) { }
+
+    public LocalSearchManipulator() : base() { }
+
+    private bool FindBetterInsertionPlace(
+      PotvinEncoding individual, int tour, int city, int length,
+      out int insertionTour, out int insertionPlace) {
+      bool insertionFound = false;
+      insertionTour = -1;
+      insertionPlace = 1;
+
+      List<int> toBeDeleted = individual.Tours[tour].Cities.GetRange(city, length);
+      double distance = GetLength(individual.Tours[tour]);
+      individual.Tours[tour].Cities.RemoveRange(city, length);
+      double removalBenefit = distance - GetLength(individual.Tours[tour]);
+
+      int currentTour = 0;
+      while (currentTour < individual.Tours.Count && !insertionFound) {
+        int currentCity = 0;
+        while (currentCity <= individual.Tours[currentTour].Cities.Count && !insertionFound) {
+          distance = GetLength(individual.Tours[currentTour]);
+          individual.Tours[currentTour].Cities.InsertRange(currentCity, toBeDeleted);
+          if (Feasible(individual.Tours[currentTour])) {
+            double lengthIncrease =
+              GetLength(individual.Tours[currentTour]) - distance;
+            if (removalBenefit > lengthIncrease) {
+              insertionTour = currentTour;
+              insertionPlace = currentCity;
+
+              insertionFound = true;
+            }
+          }
+          individual.Tours[currentTour].Cities.RemoveRange(currentCity, length);
+          
+          currentCity++;
+        }
+        currentTour++;
+      }
+
+      individual.Tours[tour].Cities.InsertRange(city, toBeDeleted);
+
+      return insertionFound;
+    }
+
+    protected override void Manipulate(IRandom random, PotvinEncoding individual) {
+      //only apply to feasible individuals
+      if (Feasible(individual)) {
+        bool insertionFound;
+
+        do {
+          insertionFound = false;
+          int length = 3;
+          while (length > 0 && !insertionFound) {
+            int tour = 0;
+            while (tour < individual.Tours.Count && !insertionFound) {
+              int city = 0;
+              while (city <= individual.Tours[tour].Cities.Count - length && !insertionFound) {
+                int insertionTour, insertionPlace;
+                if (FindBetterInsertionPlace(individual, tour, city, length,
+                 out insertionTour, out insertionPlace)) {
+                  insertionFound = true;
+
+                  List<int> toBeInserted = individual.Tours[tour].Cities.GetRange(city, length);
+
+                  individual.Tours[tour].Cities.RemoveRange(city, length);
+                  individual.Tours[insertionTour].Cities.InsertRange(
+                    insertionPlace,
+                    toBeInserted);
+                }
+                city++;
+              }
+              tour++;
+            }
+            length--;
+          }
+        } while (insertionFound);
+      }
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/OneLevelExchangeManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/OneLevelExchangeManipulator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/OneLevelExchangeManipulator.cs	(revision 4218)
@@ -0,0 +1,65 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("OneLevelExchangeMainpulator", "The 1M operator which manipulates a VRP representation.  It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")]
+  [StorableClass]
+  public sealed class OneLevelExchangeMainpulator : PotvinManipulator {
+    [StorableConstructor]
+    private OneLevelExchangeMainpulator(bool deserializing) : base(deserializing) { }
+
+    public OneLevelExchangeMainpulator() : base() { }
+    
+    protected override void Manipulate(IRandom random, PotvinEncoding individual) {
+      int selectedIndex = SelectRandomTourBiasedByLength(random, individual);
+      Tour route1 =
+        individual.Tours[selectedIndex];
+
+      List<int> replaced = new List<int>();
+      for (int i = 0; i < route1.Cities.Count; i++) {
+        int insertedRoute, insertedPlace;
+
+        if (FindInsertionPlace(individual, route1.Cities[i], selectedIndex, out insertedRoute, out insertedPlace)) {
+          individual.Tours[insertedRoute].Cities.Insert(insertedPlace, route1.Cities[i]);
+          replaced.Add(route1.Cities[i]);
+        }
+      }
+
+      route1.Cities.RemoveAll(
+        new System.Predicate<int>( 
+          delegate(int val) {
+            return (replaced.Contains(val)); 
+          }
+        )
+      );
+
+      if (route1.Cities.Count == 0)
+        individual.Tours.Remove(route1);
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinManipulator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinManipulator.cs	(revision 4218)
@@ -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 HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinManipulator", "A VRP manipulation operation.")]
+  [StorableClass]
+  public abstract class PotvinManipulator : VRPManipulator, IStochasticOperator {
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+
+    [StorableConstructor]
+    protected PotvinManipulator(bool deserializing) : base(deserializing) { }
+
+    public PotvinManipulator() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
+    }
+
+    protected abstract void Manipulate(IRandom random, PotvinEncoding individual);
+
+    protected int SelectRandomTourBiasedByLength(IRandom random, PotvinEncoding individual) {
+      int tourIndex = -1;
+
+      double sum = 0.0;
+      double[] probabilities = new double[individual.Tours.Count];
+      for (int i = 0; i < individual.Tours.Count; i++) {
+        probabilities[i] = 1.0 / ((double)individual.Tours[i].Cities.Count / (double)Cities);
+        sum += probabilities[i];
+      }
+
+      for (int i = 0; i < probabilities.Length; i++)
+        probabilities[i] = probabilities[i] / sum;
+
+      double rand = random.NextDouble();
+      double cumulatedProbabilities = 0.0;
+      int index = 0;
+      while (tourIndex == -1 && index < probabilities.Length) {
+        if (cumulatedProbabilities <= rand && rand <= cumulatedProbabilities + probabilities[index])
+          tourIndex = index;
+
+        cumulatedProbabilities += probabilities[index];
+        index++;
+      }
+
+      return tourIndex;
+    }
+
+    protected bool FindInsertionPlace(PotvinEncoding individual, int city, int routeToAvoid, out int route, out int place) {
+      return individual.FindInsertionPlace(
+        DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue, 
+        DemandParameter.ActualValue, CapacityParameter.ActualValue, CoordinatesParameter.ActualValue, 
+        DistanceMatrixParameter, UseDistanceMatrixParameter.ActualValue,
+        city, routeToAvoid, out route, out place);
+    }
+    
+    public override IOperation Apply() {
+      IVRPEncoding solution = VRPToursParameter.ActualValue;
+      if (!(solution is PotvinEncoding)) {
+        VRPToursParameter.ActualValue = PotvinEncoding.ConvertFrom(solution);
+      }
+      
+      Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as PotvinEncoding);
+
+      return base.Apply();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/TwoLevelExchangeManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/TwoLevelExchangeManipulator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/TwoLevelExchangeManipulator.cs	(revision 4218)
@@ -0,0 +1,76 @@
+﻿#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 System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("TwoLevelExchangeManipulator", "The 2M operator which manipulates a VRP representation.  It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")]
+  [StorableClass]
+  public sealed class TwoLevelExchangeManipulator : PotvinManipulator {
+    [StorableConstructor]
+    private TwoLevelExchangeManipulator(bool deserializing) : base(deserializing) { }
+
+    public TwoLevelExchangeManipulator() : base() { }
+    
+    protected override void Manipulate(IRandom random, PotvinEncoding individual) {
+      int selectedIndex = SelectRandomTourBiasedByLength(random, individual);
+      Tour route1 =
+        individual.Tours[selectedIndex];
+
+      for (int customer1Position = 0; customer1Position < route1.Cities.Count; customer1Position++) {
+        foreach (Tour tour in individual.Tours) {
+          if (tour != route1) {
+            for (int customer2Position = 0; customer2Position < tour.Cities.Count; customer2Position++) {
+              int customer1 = route1.Cities[customer1Position];
+              int customer2 = tour.Cities[customer2Position];
+
+              //customer1 can be feasibly inserted at the location of customer2
+              tour.Cities[customer2Position] = customer1;
+              if (Feasible(tour)) {
+                int route, place;
+                if (FindInsertionPlace(individual,
+                  customer2, selectedIndex, out route, out place)) {
+                    individual.Tours[route].Cities.Insert(place, customer2);
+                  route1.Cities.RemoveAt(customer1Position);
+
+                  if (route1.Cities.Count == 0)
+                    individual.Tours.Remove(route1);
+
+                  //two-level exchange has been performed
+                  return;
+                } else {
+                  tour.Cities[customer2Position] = customer2;
+                }
+              } else {
+                tour.Cities[customer2Position] = customer2;
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/PotvinEncoding.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/PotvinEncoding.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/PotvinEncoding.cs	(revision 4218)
@@ -0,0 +1,136 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Drawing;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
+  [Item("PotvinEncoding", "Represents a potvin encoding of VRP solutions. It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")]
+  [StorableClass]
+  public class PotvinEncoding : Item, IVRPEncoding {
+    public override Image ItemImage {
+      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Class; }
+    }
+    
+    #region IVRPEncoding Members
+    [Storable]
+    public ItemList<Tour> Tours { get; set; }
+
+    public int Cities {
+      get 
+      {
+        int cities = 0;
+
+        foreach (Tour tour in Tours) {
+          cities += tour.Cities.Count;
+        }
+
+        return cities;
+      }
+    }
+    #endregion
+
+    [Storable]
+    public List<int> Unrouted { get; set; }
+
+    public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) {
+      PotvinEncoding clone = new PotvinEncoding();
+      cloner.RegisterClonedObject(this, clone);
+      clone.Tours = (ItemList<Tour>)cloner.Clone(this.Tours);
+      clone.Unrouted = new List<int>(Unrouted);
+      return clone;
+    }
+
+    public PotvinEncoding() {
+      Tours = new ItemList<Tour>();
+      Unrouted = new List<int>();
+    }
+    
+    public static PotvinEncoding ConvertFrom(IVRPEncoding encoding) {
+      PotvinEncoding solution = new PotvinEncoding();
+
+      solution.Tours.AddRange(
+        encoding.Tours);
+
+      return solution;
+    }
+
+    public static PotvinEncoding ConvertFrom(List<int> route) {
+      PotvinEncoding solution = new PotvinEncoding();
+
+      Tour tour = new Tour();
+      for (int i = 0; i < route.Count; i++) {
+        if (route[i] == 0) {
+          if (tour.Cities.Count > 0) {
+            solution.Tours.Add(tour);
+            tour = new Tour();
+          }
+        } else {
+          tour.Cities.Add(route[i]);
+        }
+      }
+
+      return solution;
+    }
+
+    public bool FindInsertionPlace(
+      DoubleArray dueTimeArray,
+      DoubleArray serviceTimeArray, DoubleArray readyTimeArray, DoubleArray demandArray, DoubleValue capacity,
+      DoubleMatrix coordinates, ILookupParameter<DoubleMatrix> distanceMatrix, BoolValue useDistanceMatrix,
+      int city, int routeToAvoid, out int route, out int place) {
+      route = -1;
+      place = -1;
+      double minDetour = 0;
+
+      for (int tour = 0; tour < Tours.Count; tour++) {
+        if (tour != routeToAvoid) {
+          for (int i = 0; i <= Tours[tour].Cities.Count; i++) {
+            double length = Tours[tour].GetLength(coordinates, distanceMatrix, useDistanceMatrix);
+
+            Tours[tour].Cities.Insert(i, city);
+
+            if (Tours[tour].Feasible(dueTimeArray, serviceTimeArray, readyTimeArray, demandArray, 
+              capacity, coordinates, distanceMatrix, useDistanceMatrix)) {
+              double newLength = Tours[tour].GetLength(coordinates, distanceMatrix, useDistanceMatrix);
+
+              double detour = newLength - length;
+
+              if (route <= 0 || detour < minDetour) {
+                route = tour;
+                place = i;
+                minDetour = detour;
+              }
+            }
+
+            Tours[tour].Cities.RemoveAt(i);
+          }
+        }
+      }
+
+      return route >= 0 && place >= 0;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Tour.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Tour.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Tour.cs	(revision 4218)
@@ -0,0 +1,88 @@
+﻿#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 System.Collections.Generic;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings {
+  [StorableClass]
+  public class Tour : Item {
+    [Storable]
+    public List<int> Cities { get; private set; }
+
+    public Tour() {
+      Cities = new List<int>();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      Tour clone = base.Clone(cloner) as Tour;
+      clone.Cities = new List<int>(Cities);
+
+      return clone;
+    }
+
+    public bool Feasible(DoubleArray dueTimeArray,
+      DoubleArray serviceTimeArray, DoubleArray readyTimeArray, DoubleArray demandArray, DoubleValue capacity,
+      DoubleMatrix coordinates, ILookupParameter<DoubleMatrix> distanceMatrix, BoolValue useDistanceMatrix) {
+      TourEvaluation eval = VRPEvaluator.EvaluateTour(this,
+        dueTimeArray,
+        serviceTimeArray,
+        readyTimeArray,
+        demandArray,
+        capacity,
+        new DoubleValue(0),
+        new DoubleValue(0),
+        new DoubleValue(0),
+        new DoubleValue(1),
+        new DoubleValue(1),
+        coordinates,
+        distanceMatrix,
+        useDistanceMatrix);
+
+      return eval.Overload < double.Epsilon && eval.Tardiness < double.Epsilon;
+    }
+    
+    public double GetLength(DoubleMatrix coordinates, 
+      ILookupParameter<DoubleMatrix> distanceMatrix, 
+      BoolValue useDistanceMatrix) {
+      double length = 0;
+
+      if (Cities.Count > 0) {
+        List<int> cities = new List<int>();
+        cities.Add(0);
+        foreach (int city in Cities) {
+          cities.Add(city);
+        }
+        cities.Add(0);
+
+        for (int i = 1; i < cities.Count; i++) {
+          length += VRPUtilities.GetDistance(
+            cities[i - 1], cities[i], coordinates, distanceMatrix, useDistanceMatrix); 
+        }
+      }
+
+      return length;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCreator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCreator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCreator.cs	(revision 4218)
@@ -0,0 +1,55 @@
+﻿#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;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings {
+  [Item("VRPCreator", "A VRP creator.")]
+  [StorableClass]
+  public abstract class VRPCreator : VRPOperator, IVRPCreator {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+
+    #region IVRPCreator Members
+    public ILookupParameter<IVRPEncoding> VRPToursParameter {
+      get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
+    }
+    
+    public IValueLookupParameter<IntValue> CitiesParameter {
+	    get { return (IValueLookupParameter<IntValue>)Parameters["Cities"]; }
+	  }
+
+    [StorableConstructor]
+    protected VRPCreator(bool deserializing) : base(deserializing) { }
+
+    public VRPCreator()
+      : base() {
+      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The new VRP tours."));
+    }
+
+    #endregion
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCrossover.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCrossover.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCrossover.cs	(revision 4218)
@@ -0,0 +1,55 @@
+﻿#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;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings {
+  [Item("VRPCreator", "A VRP crossover operation.")]
+  [StorableClass]
+  public abstract class VRPCrossover : VRPOperator, IVRPCrossover {
+    #region IVRPCrossover Members
+
+    public ILookupParameter<ItemArray<IVRPEncoding>> ParentsParameter {
+      get { return (ScopeTreeLookupParameter<IVRPEncoding>)Parameters["Parents"]; }
+    }
+
+    public ILookupParameter<IVRPEncoding> ChildParameter {
+      get { return (ILookupParameter<IVRPEncoding>)Parameters["Child"]; }
+    }
+
+    #endregion
+
+    [StorableConstructor]
+    protected VRPCrossover(bool deserializing) : base(deserializing) { }
+
+    public VRPCrossover()
+      : base() {
+      Parameters.Add(new ScopeTreeLookupParameter<IVRPEncoding>("Parents", "The parent permutations which should be crossed."));
+      ParentsParameter.ActualName = "VRPTours";
+      Parameters.Add(new LookupParameter<IVRPEncoding>("Child", "The child permutation resulting from the crossover."));
+      ChildParameter.ActualName = "VRPTours";
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPManipulator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPManipulator.cs	(revision 4218)
@@ -0,0 +1,48 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings {
+  [Item("VRPManipulator", "A VRP manipulation operation.")]
+  [StorableClass]
+  public abstract class VRPManipulator : VRPOperator, IVRPManipulator {
+    #region IVRPManipulator Members
+
+    public ILookupParameter<IVRPEncoding> VRPToursParameter {
+      get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
+    }
+
+    #endregion
+
+    [StorableConstructor]
+    protected VRPManipulator(bool deserializing) : base(deserializing) { }
+
+    public VRPManipulator()
+      : base() {
+      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours to be manipulated."));
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPMoveOperator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPMoveOperator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPMoveOperator.cs	(revision 4218)
@@ -0,0 +1,48 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings {
+  [Item("VRPMoveOperator", "A VRP move operation.")]
+  [StorableClass]
+  public abstract class VRPMoveOperator : VRPOperator, IVRPMoveOperator {
+    #region IVRPManipulator Members
+
+    public ILookupParameter<IVRPEncoding> VRPToursParameter {
+      get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
+    }
+   
+    #endregion
+
+    [StorableConstructor]
+    protected VRPMoveOperator(bool deserializing) : base(deserializing) { }
+
+    public VRPMoveOperator()
+      : base() {
+      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours."));
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Evaluators/VRPEvaluator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Evaluators/VRPEvaluator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Evaluators/VRPEvaluator.cs	(revision 4218)
@@ -0,0 +1,225 @@
+﻿#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.Encodings;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  public struct TourEvaluation {
+    public double Quality { get; set; }
+    public double VehcilesUtilized { get; set; }
+    public double TravelTime { get; set; }
+    public double Distance { get; set; }
+    public double Overload { get; set; }
+    public double Tardiness { get; set; }
+  }
+
+  [Item("VRPEvaluator", "Evaluates solutions for the VRP problem.")]
+  [StorableClass]
+  public sealed class VRPEvaluator : VRPOperator, IVRPEvaluator {
+    #region ISingleObjectiveEvaluator Members
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    #endregion
+
+    public ILookupParameter<DoubleValue> VehcilesUtilizedParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["VehiclesUtilized"]; }
+    }
+    public ILookupParameter<DoubleValue> TravelTimeParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["TravelTime"]; }
+    }
+    public ILookupParameter<DoubleValue> DistanceParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Distance"]; }
+    }
+    public ILookupParameter<DoubleValue> OverloadParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Overload"]; }
+    }
+    public ILookupParameter<DoubleValue> TardinessParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; }
+    }
+
+    public ILookupParameter<IVRPEncoding> VRPToursParameter {
+      get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
+    }
+   
+    public ILookupParameter<DoubleValue> FleetUsageFactor {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalFleetUsageFactor"]; }
+    }
+    public ILookupParameter<DoubleValue> TimeFactor {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalTimeFactor"]; }
+    }
+    public ILookupParameter<DoubleValue> DistanceFactor {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalDistanceFactor"]; }
+    }
+    public ILookupParameter<DoubleValue> OverloadPenalty {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalOverloadPenalty"]; }
+    }
+    public ILookupParameter<DoubleValue> TardinessPenalty {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalTardinessPenalty"]; }
+    }
+
+    public VRPEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The evaluated quality of the VRP solution."));
+      Parameters.Add(new LookupParameter<DoubleValue>("VehiclesUtilized", "The number of vehicles utilized."));
+      Parameters.Add(new LookupParameter<DoubleValue>("TravelTime", "The total travel time."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Distance", "The distance."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Overload", "The overload."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Tardiness", "The tardiness."));
+      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours which should be evaluated."));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalFleetUsageFactor", "The fleet usage factor considered in the evaluation."));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalTimeFactor", "The time factor considered in the evaluation."));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalDistanceFactor", "The distance factor considered in the evaluation."));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalOverloadPenalty", "The overload penalty considered in the evaluation."));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalTardinessPenalty", "The tardiness penalty considered in the evaluation."));
+    }
+
+    private double CalculateFleetUsage() {
+      IVRPEncoding vrpSolution = VRPToursParameter.ActualValue;
+
+      return vrpSolution.Tours.Count;
+    }
+
+    internal static TourEvaluation EvaluateTour(Tour tour, DoubleArray dueTimeArray,
+      DoubleArray serviceTimeArray, DoubleArray readyTimeArray, DoubleArray demandArray, DoubleValue capacity,
+      DoubleValue fleetUsageFactor, DoubleValue timeFactor, DoubleValue distanceFactor, DoubleValue overloadPenalty, DoubleValue tardinessPenalty,
+      DoubleMatrix coordinates, ILookupParameter<DoubleMatrix> distanceMatrix, BoolValue useDistanceMatrix) {
+      TourEvaluation eval = new TourEvaluation();
+
+      double quality = 0.0;
+      double time = 0.0;
+
+      double distance = 0.0;
+      double waitingTime = 0.0;
+      double serviceTime = 0.0;
+      double delivered = 0.0;
+
+      double overweight = 0.0;
+      double tardiness = 0.0;
+
+      //simulate a tour, start and end at depot
+      for (int i = 0; i <= tour.Cities.Count; i++) {
+        int start = 0;
+        if(i > 0)
+          start = tour.Cities[i - 1];
+        int end = 0;
+        if (i < tour.Cities.Count)
+          end = tour.Cities[i];
+
+        //drive there
+        double currentDistace = VRPUtilities.GetDistance(start, end, coordinates, distanceMatrix, useDistanceMatrix);
+        distance += currentDistace;
+        time += currentDistace;
+
+        //check if it was serviced on time
+        if (time > dueTimeArray[end])
+          tardiness += time - dueTimeArray[end];
+
+        //wait
+        double currentWaitingTime = 0.0;
+        if (time < readyTimeArray[end])
+          currentWaitingTime = readyTimeArray[end] - time;
+        waitingTime += currentWaitingTime;
+        time += currentWaitingTime;
+
+        //service
+        delivered += demandArray[end];
+        double currentServiceTime = serviceTimeArray[end];
+        serviceTime += currentServiceTime;
+        time += currentServiceTime;
+      }
+
+      if (delivered > capacity.Value) {
+        overweight = delivered - capacity.Value;
+      }
+
+      //Fleet usage
+      quality += fleetUsageFactor.Value;
+      //Travel time
+      quality += timeFactor.Value * time;
+      //Distance
+      quality += distanceFactor.Value * distance;
+
+      //Penalties
+      quality += overloadPenalty.Value * overweight;
+      quality += tardinessPenalty.Value * tardiness;
+
+      eval.Distance = distance;
+      eval.TravelTime = time;
+      eval.VehcilesUtilized = 1;
+      eval.Overload = overweight;
+      eval.Tardiness = tardiness;
+      eval.Quality = quality;
+
+      return eval;
+    }
+
+    public static TourEvaluation Evaluate(IVRPEncoding solution, DoubleArray dueTimeArray,
+      DoubleArray serviceTimeArray, DoubleArray readyTimeArray, DoubleArray demandArray, DoubleValue capacity,
+      DoubleValue fleetUsageFactor, DoubleValue timeFactor, DoubleValue distanceFactor, DoubleValue overloadPenalty, DoubleValue tardinessPenalty,
+      DoubleMatrix coordinates, ILookupParameter<DoubleMatrix> distanceMatrix, BoolValue useDistanceMatrix) {
+      TourEvaluation sumEval = new TourEvaluation();
+      sumEval.Distance = 0;
+      sumEval.Quality = 0;
+      sumEval.TravelTime = 0;
+      sumEval.VehcilesUtilized = 0;
+      sumEval.Overload = 0;
+      sumEval.Tardiness = 0;
+
+      foreach (Tour tour in solution.Tours) {
+        TourEvaluation eval = EvaluateTour(tour, dueTimeArray, serviceTimeArray, readyTimeArray, demandArray, capacity,
+          fleetUsageFactor, timeFactor, distanceFactor, overloadPenalty, tardinessPenalty,
+          coordinates, distanceMatrix, useDistanceMatrix);
+        sumEval.Quality += eval.Quality;
+        sumEval.Distance += eval.Distance;
+        sumEval.TravelTime += eval.TravelTime;
+        sumEval.VehcilesUtilized += eval.VehcilesUtilized;
+        sumEval.Overload += eval.Overload;
+        sumEval.Tardiness += eval.Tardiness;
+      }
+
+      return sumEval;
+    }
+
+    public sealed override IOperation Apply() {
+      IVRPEncoding solution = VRPToursParameter.ActualValue;
+
+      TourEvaluation sumEval = Evaluate(solution, DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,
+        DemandParameter.ActualValue, CapacityParameter.ActualValue,
+        FleetUsageFactor.ActualValue, TimeFactor.ActualValue, DistanceFactor.ActualValue, OverloadPenalty.ActualValue, TardinessPenalty.ActualValue,
+        CoordinatesParameter.ActualValue, DistanceMatrixParameter, UseDistanceMatrixParameter.ActualValue);
+
+      QualityParameter.ActualValue = new DoubleValue(sumEval.Quality);
+      VehcilesUtilizedParameter.ActualValue = new DoubleValue(sumEval.VehcilesUtilized);
+      TravelTimeParameter.ActualValue = new DoubleValue(sumEval.TravelTime);
+      DistanceParameter.ActualValue = new DoubleValue(sumEval.Distance);
+      OverloadParameter.ActualValue = new DoubleValue(sumEval.Overload);
+      TardinessParameter.ActualValue = new DoubleValue(sumEval.Tardiness);
+
+      return base.Apply();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/HeuristicLab.Problems.VehicleRouting-3.3.csproj
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/HeuristicLab.Problems.VehicleRouting-3.3.csproj	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/HeuristicLab.Problems.VehicleRouting-3.3.csproj	(revision 4218)
@@ -0,0 +1,278 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{6410BDA6-3641-42B2-BABA-AA626E2F6F71}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.VehicleRouting</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.VehicleRouting-3.3</AssemblyName>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <DocumentationFile>
+    </DocumentationFile>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <DocumentationFile>bin\Release\HeuristicLab.Problems.VehicleRouting-3.3.xml</DocumentationFile>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <DocumentationFile>bin\x86\Release\HeuristicLab.Routing.TSP-3.3.xml</DocumentationFile>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <DocumentationFile>bin\x64\Release\HeuristicLab.Routing.TSP-3.3.XML</DocumentationFile>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Analyzers\BestVRPSolutionAnalyzer.cs" />
+    <Compile Include="Encodings\Alba\Crossovers\PermutationCrossover.cs" />
+    <Compile Include="Encodings\Alba\Manipulators\IntraRouteInversionManipulator.cs" />
+    <Compile Include="Encodings\Alba\Manipulators\LambdaInterchangeManipulator.cs" />
+    <Compile Include="Encodings\Alba\Moves\Interfaces\IAlbaLambdaInterchangeMoveOperator.cs" />
+    <Compile Include="Encodings\Alba\Moves\Interfaces\IAlbaIntraRouteInversionMoveOperator.cs" />
+    <Compile Include="Encodings\Alba\Manipulators\CustomerInversionManipulator.cs" />
+    <Compile Include="Encodings\Alba\Manipulators\CustomerSwapManipulator.cs" />
+    <Compile Include="Encodings\Alba\Manipulators\CustomerInsertionManipulator.cs" />
+    <Compile Include="Encodings\Alba\Manipulators\PermutationManipulator.cs" />
+    <Compile Include="Encodings\Alba\Moves\LambdaInterchange\ExhaustiveLambdaInterchangeMoveGenerator.cs" />
+    <Compile Include="Encodings\Alba\Moves\LambdaInterchange\LambdaInterchangeMove.cs" />
+    <Compile Include="Encodings\Alba\Moves\LambdaInterchange\LambdaInterchangeMoveGenerator.cs" />
+    <Compile Include="Encodings\Alba\Moves\LambdaInterchange\LambdaInterchangeMoveEvaluator.cs" />
+    <Compile Include="Encodings\Alba\Moves\LambdaInterchange\LambdaInterchangeMoveMaker.cs" />
+    <Compile Include="Encodings\Alba\Moves\LambdaInterchange\StochasticLambdaInterchangeSingleMoveGenerator.cs" />
+    <Compile Include="Encodings\Alba\Moves\LambdaInterchange\StochasticLambdaInterchangeMutliMoveGenerator.cs" />
+    <Compile Include="Encodings\Alba\Moves\PermutationMoveOperator.cs" />
+    <Compile Include="Encodings\Alba\Moves\IntraRouteInversion\StochasticIntraRouteInversionMutliMoveGenerator.cs" />
+    <Compile Include="Encodings\Alba\Moves\IntraRouteInversion\StochasticIntraRouteInversionSingleMoveGenerator.cs" />
+    <Compile Include="Encodings\Alba\Moves\IntraRouteInversion\IntraRouteInversionMoveGenerator.cs" />
+    <Compile Include="Encodings\Alba\Moves\IntraRouteInversion\IntraRouteInversionEvaluator.cs" />
+    <Compile Include="Encodings\Alba\Moves\IntraRouteInversion\ExhaustiveIntraRouteInversionMoveGenerator.cs" />
+    <Compile Include="Encodings\Alba\Moves\IntraRouteInversion\IntraRouteInversionMoveMaker.cs" />
+    <Compile Include="Encodings\Alba\Moves\IntraRouteInversion\IntraRouteInversionMove.cs" />
+    <Compile Include="Encodings\General\Crossovers\MultiVRPManipulator.cs" />
+    <Compile Include="Encodings\General\Crossovers\MultiVRPCrossover.cs" />
+    <Compile Include="Encodings\General\Creators\RandomCreator.cs" />
+    <Compile Include="Encodings\General\Moves\Interfaces\IMultiVRPMoveGenerator.cs" />
+    <Compile Include="Encodings\General\Moves\Interfaces\IVRPMove.cs" />
+    <Compile Include="Encodings\General\Moves\Interfaces\IMultiVRPMoveOperator.cs" />
+    <Compile Include="Encodings\General\Moves\MultiVRPMoveOperator\MultiVRPMoveEvaluator.cs" />
+    <Compile Include="Encodings\General\Moves\MultiVRPMoveOperator\MultiVRPMoveMaker.cs" />
+    <Compile Include="Encodings\General\Moves\MultiVRPMoveOperator\MultiVRPMoveGenerator.cs" />
+    <Compile Include="Encodings\Potvin\Crossovers\RouteBasedCrossover.cs" />
+    <Compile Include="Encodings\Potvin\Crossovers\SequenceBasedCrossover.cs" />
+    <Compile Include="Encodings\Potvin\Crossovers\PotvinCrossover.cs" />
+    <Compile Include="Encodings\Potvin\Manipulators\LocalSearchManipulator.cs" />
+    <Compile Include="Encodings\Potvin\Manipulators\TwoLevelExchangeManipulator.cs" />
+    <Compile Include="Encodings\Potvin\Manipulators\OneLevelExchangeManipulator.cs" />
+    <Compile Include="Encodings\Potvin\Manipulators\PotvinManipulator.cs" />
+    <Compile Include="Interfaces\IVRPMoveMaker.cs" />
+    <Compile Include="VRPUtilities.cs" />
+    <Compile Include="VRPOperator.cs" />
+    <Compile Include="Encodings\General\Creators\PushForwardInsertionCreator.cs" />
+    <Compile Include="Encodings\General\Creators\DefaultRepresentationCreator.cs" />
+    <Compile Include="Encodings\Alba\Crossovers\AlbaCrossover.cs" />
+    <Compile Include="Encodings\Alba\Moves\Interfaces\IAlbaTranslocationMoveOperator.cs" />
+    <Compile Include="Encodings\Alba\Manipulators\AlbaManipulator.cs" />
+    <Compile Include="Encodings\Alba\Moves\AlbaMoveOperator.cs" />
+    <Compile Include="Encodings\Alba\Moves\AlbaMoveMaker.cs" />
+    <Compile Include="Encodings\Alba\Moves\ThreeOpt\PermutationTranslocationMoveGenerator.cs" />
+    <Compile Include="Encodings\Alba\Moves\ThreeOpt\PermutationTranslocationMoveMaker.cs" />
+    <Compile Include="Encodings\Alba\Moves\ThreeOpt\PermutationTranslocationMoveTabuMaker.cs" />
+    <Compile Include="Encodings\Alba\Moves\ThreeOpt\PermutationTranslocationMoveSoftTabuCriterion.cs" />
+    <Compile Include="Encodings\Alba\Moves\ThreeOpt\PermutationTranslocationMoveHardTabuCriterion.cs" />
+    <Compile Include="Encodings\Potvin\PotvinEncoding.cs" />
+    <Compile Include="Encodings\VRPMoveOperator.cs" />
+    <Compile Include="Encodings\VRPCrossover.cs" />
+    <Compile Include="Encodings\VRPCreator.cs" />
+    <Compile Include="Encodings\Alba\AlbaEncoding.cs" />
+    <Compile Include="Encodings\Tour.cs" />
+    <Compile Include="Encodings\VRPManipulator.cs" />
+    <Compile Include="Evaluators\VRPEvaluator.cs" />
+    <Compile Include="HeuristicLabProblemsVehicleRoutingPlugin.cs" />
+    <Compile Include="Interfaces\IVRPCrossover.cs" />
+    <Compile Include="Interfaces\IVRPEncoding.cs" />
+    <Compile Include="Interfaces\IVRPEvaluator.cs" />
+    <Compile Include="Interfaces\IVRPManipulator.cs" />
+    <Compile Include="Interfaces\IVRPMoveEvaluator.cs" />
+    <Compile Include="Interfaces\IVRPMoveOperator.cs" />
+    <Compile Include="Interfaces\IVRPCreator.cs" />
+    <Compile Include="Interfaces\IVRPOperator.cs" />
+    <Compile Include="Encodings\Alba\Moves\ThreeOpt\PermutationTranslocationMoveEvaluator.cs" />
+    <Compile Include="MoveEvaluators\VRPMoveEvaluator.cs" />
+    <Compile Include="VRPSolution.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="SolomonParser.cs" />
+    <Compile Include="VehicleRoutingProblem.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.PermutationEncoding\3.3\HeuristicLab.Encodings.PermutationEncoding-3.3.csproj">
+      <Project>{DBECB8B0-B166-4133-BAF1-ED67C3FD7FCA}</Project>
+      <Name>HeuristicLab.Encodings.PermutationEncoding-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
+      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
+      <Name>HeuristicLab.Operators-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">
+      <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>
+      <Name>HeuristicLab.Optimization.Operators-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
+      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
+      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
+      <Name>HeuristicLab.Parameters-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="HeuristicLabProblemsVehicleRoutingPlugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <ItemGroup />
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabProblemsVehicleRoutingPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabProblemsVehicleRoutingPlugin.cs"</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/HeuristicLabProblemsVehicleRoutingPlugin.cs.frame
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/HeuristicLabProblemsVehicleRoutingPlugin.cs.frame	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/HeuristicLabProblemsVehicleRoutingPlugin.cs.frame	(revision 4218)
@@ -0,0 +1,43 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  /// <summary>
+  /// Plugin class for HeuristicLab.Problems.VehicleRouting plugin
+  /// </summary>
+  [Plugin("HeuristicLab.Problems.VehicleRouting", "3.3.0.$WCREV$")]
+  [PluginFile("HeuristicLab.Problems.VehicleRouting-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.PermutationEncoding", "3.3")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  public class HeuristicLabProblemsVehicleRoutingPlugin : PluginBase {
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPCreator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPCreator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPCreator.cs	(revision 4218)
@@ -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.Data;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  public interface IVRPCreator : IVRPOperator, ISolutionCreator {
+    IValueLookupParameter<IntValue> CitiesParameter { get; }
+    ILookupParameter<IVRPEncoding> VRPToursParameter { get; }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPCrossover.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPCrossover.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPCrossover.cs	(revision 4218)
@@ -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.Optimization;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  public interface IVRPCrossover : IVRPOperator, ICrossover {
+    ILookupParameter<ItemArray<IVRPEncoding>> ParentsParameter { get; }
+    ILookupParameter<IVRPEncoding> ChildParameter { get; }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPEncoding.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPEncoding.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPEncoding.cs	(revision 4218)
@@ -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.Problems.VehicleRouting.Encodings;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  public interface IVRPEncoding : IItem {
+    ItemList<Tour> Tours {
+      get;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPEvaluator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPEvaluator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPEvaluator.cs	(revision 4218)
@@ -0,0 +1,42 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  public interface IVRPEvaluator : ISingleObjectiveEvaluator, IVRPOperator {
+    ILookupParameter<IVRPEncoding> VRPToursParameter { get; }
+    
+    ILookupParameter<DoubleValue> VehcilesUtilizedParameter { get; }
+    ILookupParameter<DoubleValue> TravelTimeParameter { get; }
+    ILookupParameter<DoubleValue> DistanceParameter { get; }
+    ILookupParameter<DoubleValue> OverloadParameter { get; }
+    ILookupParameter<DoubleValue> TardinessParameter { get; }
+
+    ILookupParameter<DoubleValue> FleetUsageFactor { get; }
+    ILookupParameter<DoubleValue> TimeFactor { get; }
+    ILookupParameter<DoubleValue> DistanceFactor { get; }
+    ILookupParameter<DoubleValue> OverloadPenalty { get; }
+    ILookupParameter<DoubleValue> TardinessPenalty { get; }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPManipulator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPManipulator.cs	(revision 4218)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  public interface IVRPManipulator : IVRPOperator, IManipulator {
+    ILookupParameter<IVRPEncoding> VRPToursParameter { get; }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveEvaluator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveEvaluator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveEvaluator.cs	(revision 4218)
@@ -0,0 +1,40 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  public interface IVRPMoveEvaluator : ISingleObjectiveMoveEvaluator, IVRPMoveOperator {    
+    ILookupParameter<DoubleValue> MoveVehcilesUtilizedParameter { get; }
+    ILookupParameter<DoubleValue> MoveTravelTimeParameter { get; }
+    ILookupParameter<DoubleValue> MoveDistanceParameter { get; }
+    ILookupParameter<DoubleValue> MoveOverloadParameter { get; }
+    ILookupParameter<DoubleValue> MoveTardinessParameter { get; }
+
+    ILookupParameter<DoubleValue> FleetUsageFactor { get; }
+    ILookupParameter<DoubleValue> TimeFactor { get; }
+    ILookupParameter<DoubleValue> DistanceFactor { get; }
+    ILookupParameter<DoubleValue> OverloadPenalty { get; }
+    ILookupParameter<DoubleValue> TardinessPenalty { get; }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveMaker.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveMaker.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveMaker.cs	(revision 4218)
@@ -0,0 +1,40 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  public interface IVRPMoveMaker : IMoveMaker, IVRPMoveOperator {
+    ILookupParameter<DoubleValue> MoveVehcilesUtilizedParameter { get; }
+    ILookupParameter<DoubleValue> MoveTravelTimeParameter { get; }
+    ILookupParameter<DoubleValue> MoveDistanceParameter { get; }
+    ILookupParameter<DoubleValue> MoveOverloadParameter { get; }
+    ILookupParameter<DoubleValue> MoveTardinessParameter { get; }
+
+    ILookupParameter<DoubleValue> VehcilesUtilizedParameter { get; }
+    ILookupParameter<DoubleValue> TravelTimeParameter { get; }
+    ILookupParameter<DoubleValue> DistanceParameter { get; }
+    ILookupParameter<DoubleValue> OverloadParameter { get; }
+    ILookupParameter<DoubleValue> TardinessParameter {get; }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveOperator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveOperator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPMoveOperator.cs	(revision 4218)
@@ -0,0 +1,30 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  public interface IVRPMoveOperator : IVRPOperator, IMoveOperator {
+    ILookupParameter<IVRPEncoding> VRPToursParameter { get; }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPOperator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPOperator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Interfaces/IVRPOperator.cs	(revision 4218)
@@ -0,0 +1,39 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  public interface IVRPOperator {
+    ILookupParameter<DoubleMatrix> CoordinatesParameter { get; }
+    int Cities { get; }
+    ILookupParameter<DoubleMatrix> DistanceMatrixParameter { get; }
+    ILookupParameter<BoolValue> UseDistanceMatrixParameter { get; }
+    ILookupParameter<IntValue> VehiclesParameter { get; }
+    ILookupParameter<DoubleValue> CapacityParameter { get; }
+    ILookupParameter<DoubleArray> DemandParameter { get; }
+    ILookupParameter<DoubleArray> ReadyTimeParameter { get; }
+    ILookupParameter<DoubleArray> DueTimeParameter { get; }
+    ILookupParameter<DoubleArray> ServiceTimeParameter { get; }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/MoveEvaluators/VRPMoveEvaluator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/MoveEvaluators/VRPMoveEvaluator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/MoveEvaluators/VRPMoveEvaluator.cs	(revision 4218)
@@ -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.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Encodings;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  [Item("VRPMoveEvaluator", "A base class for operators which evaluate VRP moves.")]
+  [StorableClass]
+  public abstract class VRPMoveEvaluator : VRPOperator, IVRPMoveEvaluator, IMoveOperator {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+
+    public ILookupParameter<IVRPEncoding> VRPToursParameter {
+      get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
+    }
+   
+    public ILookupParameter<DoubleValue> FleetUsageFactor {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalFleetUsageFactor"]; }
+    }
+    public ILookupParameter<DoubleValue> TimeFactor {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalTimeFactor"]; }
+    }
+    public ILookupParameter<DoubleValue> DistanceFactor {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalDistanceFactor"]; }
+    }
+    public ILookupParameter<DoubleValue> OverloadPenalty {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalOverloadPenalty"]; }
+    }
+    public ILookupParameter<DoubleValue> TardinessPenalty {
+      get { return (ILookupParameter<DoubleValue>)Parameters["EvalTardinessPenalty"]; }
+    }
+
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveQualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveVehcilesUtilizedParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveVehiclesUtilized"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveTravelTimeParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveTravelTime"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveDistanceParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveDistance"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveOverloadParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveOverload"]; }
+    }
+    public ILookupParameter<DoubleValue> MoveTardinessParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["MoveTardiness"]; }
+    }
+
+    [StorableConstructor]
+    protected VRPMoveEvaluator(bool deserializing) : base(deserializing) { }
+
+    protected VRPMoveEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of a VRP solution."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveVehiclesUtilized", "The number of vehicles utilized."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveTravelTime", "The total travel time."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveDistance", "The distance."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveOverload", "The overload."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveTardiness", "The tardiness."));
+      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The evaluated quality of a move on a VRP solution."));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalFleetUsageFactor", "The fleet usage factor considered in the evaluation."));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalTimeFactor", "The time factor considered in the evaluation."));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalDistanceFactor", "The distance factor considered in the evaluation."));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalOverloadPenalty", "The overload penalty considered in the evaluation."));
+      Parameters.Add(new LookupParameter<DoubleValue>("EvalTardinessPenalty", "The tardiness penalty considered in the evaluation."));
+    }
+
+    protected abstract TourEvaluation GetMoveQuality();
+
+    public override IOperation Apply() {
+      TourEvaluation tourEval = GetMoveQuality();
+
+      MoveQualityParameter.ActualValue = new DoubleValue(tourEval.Quality);
+      MoveDistanceParameter.ActualValue = new DoubleValue(tourEval.Distance);
+      MoveVehcilesUtilizedParameter.ActualValue = new DoubleValue(tourEval.VehcilesUtilized);
+      MoveOverloadParameter.ActualValue = new DoubleValue(tourEval.Overload);
+      MoveTardinessParameter.ActualValue = new DoubleValue(tourEval.Tardiness);
+      MoveTravelTimeParameter.ActualValue = new DoubleValue(tourEval.TravelTime);
+
+      return base.Apply();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Properties/AssemblyInfo.frame
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Properties/AssemblyInfo.frame	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Properties/AssemblyInfo.frame	(revision 4218)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Problems.VehicleRouting")]
+[assembly: AssemblyDescription("HeuristicLab Vehicle Routing Problem classes")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2010 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("91E21AF8-7C70-48de-A71B-6422ABB33764")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.0.$WCREV$")]
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/SolomonParser.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/SolomonParser.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/SolomonParser.cs	(revision 4218)
@@ -0,0 +1,156 @@
+﻿#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.IO;
+using System.Text.RegularExpressions;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  class SolomonParser {
+    private string file;
+    private string problemName;
+    private int cities;
+    private int vehicles;
+    private double capacity;
+    private List<double> xCoord;
+    private List<double> yCoord;
+    private List<double> demand;
+    private List<double> readyTime;
+    private List<double> dueTime;
+    private List<double> serviceTime;
+
+    public int Cities {
+      get {
+        return cities;
+      }
+    }
+
+    public int Vehicles {
+      get {
+        return vehicles;
+      }
+    }
+
+    public double Capacity {
+      get {
+        return capacity;
+      }
+    }
+
+    public double[,] Coordinates {
+      get {
+        double[] x = xCoord.ToArray();
+        double[] y = yCoord.ToArray();
+        double[,] coord = new double[x.Length, 2];
+        for (int i = 0; i < x.Length; i++) {
+          coord[i, 0] = x[i];
+          coord[i, 1] = y[i];
+        }
+        return coord;
+      }
+    }
+
+    public double[] Demands {
+      get {
+        return demand.ToArray();
+      }
+    }
+
+    public double[] Readytimes {
+      get {
+        return readyTime.ToArray();
+      }
+    }
+
+    public double[] Duetimes {
+      get {
+        return dueTime.ToArray();
+      }
+    }
+
+    public double[] Servicetimes {
+      get {
+        return serviceTime.ToArray();
+      }
+    }
+
+    public String ProblemName {
+      get {
+        return problemName;
+      }
+    }
+
+    public SolomonParser(string file) {
+      this.file = file;
+      xCoord = new List<double>();
+      yCoord = new List<double>();
+      demand = new List<double>();
+      readyTime = new List<double>();
+      dueTime = new List<double>();
+      serviceTime = new List<double>();
+    }
+
+    public void Parse() {
+      string line;
+      Regex reg = new Regex(@"-?\d+");
+      MatchCollection m;
+
+      StreamReader reader = new StreamReader(file);
+
+      problemName = reader.ReadLine();
+      for (int i = 0; i < 3; i++) {
+        reader.ReadLine();
+      }
+      line = reader.ReadLine();
+
+      m = reg.Matches(line);
+      if (m.Count != 2)
+        throw new InvalidDataException("File has wrong format!");
+
+      vehicles = int.Parse(m[0].Value);
+      capacity = double.Parse(m[1].Value);
+
+      for (int i = 0; i < 4; i++) {
+        reader.ReadLine();
+      }
+
+      line = reader.ReadLine();
+      while ((line != null) && (line.Length > 5)) {
+        m = reg.Matches(line);
+        if (m.Count != 7) { continue; }
+        xCoord.Add((double)int.Parse(m[1].Value));
+        yCoord.Add((double)int.Parse(m[2].Value));
+        demand.Add((double)int.Parse(m[3].Value));
+        readyTime.Add((double)int.Parse(m[4].Value));
+        double st = (double)int.Parse(m[6].Value);
+        dueTime.Add((double)int.Parse(m[5].Value));
+        serviceTime.Add(st);
+        line = reader.ReadLine();
+      }
+      cities = serviceTime.Count;
+    }
+
+    internal string OnReset() {
+      throw new NotImplementedException();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VRPOperator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VRPOperator.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VRPOperator.cs	(revision 4218)
@@ -0,0 +1,159 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Core;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Data;
+using HeuristicLab.Problems.VehicleRouting.Encodings;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  [Item("VRPOperator", "A VRP operator.")]
+  [StorableClass]
+  public abstract class VRPOperator : SingleSuccessorOperator, IVRPOperator {
+    public int Cities {
+      get { return CoordinatesParameter.ActualValue.Rows - 1; }
+    }
+    public ILookupParameter<DoubleMatrix> CoordinatesParameter {
+      get {
+        if (Parameters.ContainsKey("Coordinates"))
+          return (ILookupParameter<DoubleMatrix>)Parameters["Coordinates"];
+        else
+          return null;
+      }
+    }
+    public ILookupParameter<DoubleMatrix> DistanceMatrixParameter {
+      get {
+        if (Parameters.ContainsKey("DistanceMatrix"))
+          return (ILookupParameter<DoubleMatrix>)Parameters["DistanceMatrix"];
+        else
+          return null;
+      }
+    }
+    public ILookupParameter<BoolValue> UseDistanceMatrixParameter {
+      get {
+        if (Parameters.ContainsKey("UseDistanceMatrix"))
+          return (ILookupParameter<BoolValue>)Parameters["UseDistanceMatrix"];
+        else
+          return null;
+      }
+    }
+    public ILookupParameter<IntValue> VehiclesParameter {
+      get {
+        if (Parameters.ContainsKey("Vehicles"))
+          return (ILookupParameter<IntValue>)Parameters["Vehicles"];
+        else
+          return null;
+      }
+    }
+    public ILookupParameter<DoubleValue> CapacityParameter {
+      get {
+        if (Parameters.ContainsKey("Capacity"))
+          return (ILookupParameter<DoubleValue>)Parameters["Capacity"];
+        else
+          return null;
+      }
+    }
+    public ILookupParameter<DoubleArray> DemandParameter {
+      get {
+        if (Parameters.ContainsKey("Demand"))
+          return (ILookupParameter<DoubleArray>)Parameters["Demand"];
+        else
+          return null;
+      }
+    }
+    public ILookupParameter<DoubleArray> ReadyTimeParameter {
+      get {
+        if (Parameters.ContainsKey("ReadyTime"))
+          return (ILookupParameter<DoubleArray>)Parameters["ReadyTime"];
+        else
+          return null;
+      }
+    }
+    public ILookupParameter<DoubleArray> DueTimeParameter {
+      get {
+        if (Parameters.ContainsKey("DueTime"))
+          return (ILookupParameter<DoubleArray>)Parameters["DueTime"];
+        else
+          return null;
+      }
+    }
+    public ILookupParameter<DoubleArray> ServiceTimeParameter {
+      get {
+        if (Parameters.ContainsKey("ServiceTime"))
+          return (ILookupParameter<DoubleArray>)Parameters["ServiceTime"];
+        else
+          return null;
+      }
+    }
+
+    [StorableConstructor]
+    protected VRPOperator(bool deserializing) : base(deserializing) { }
+
+    public VRPOperator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>("Cities", "The city count."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The coordinates of the cities."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
+      Parameters.Add(new LookupParameter<BoolValue>("UseDistanceMatrix", "True if a distance matrix should be calculated and used for evaluation, otherwise false."));
+      Parameters.Add(new LookupParameter<IntValue>("Vehicles", "The number of vehicles."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Capacity", "The capacity of each vehicle."));
+      Parameters.Add(new LookupParameter<DoubleArray>("Demand", "The demand of each customer."));
+      Parameters.Add(new LookupParameter<DoubleArray>("ReadyTime", "The ready time of each customer."));
+      Parameters.Add(new LookupParameter<DoubleArray>("DueTime", "The due time of each customer."));
+      Parameters.Add(new LookupParameter<DoubleArray>("ServiceTime", "The service time of each customer."));
+    }
+
+    protected bool Feasible(Tour tour) {
+      return tour.Feasible(
+                  DueTimeParameter.ActualValue,
+                  ServiceTimeParameter.ActualValue,
+                  ReadyTimeParameter.ActualValue,
+                  DemandParameter.ActualValue,
+                  CapacityParameter.ActualValue,
+                  CoordinatesParameter.ActualValue,
+                  DistanceMatrixParameter,
+                  UseDistanceMatrixParameter.ActualValue);
+    }
+
+    protected bool Feasible(IVRPEncoding solution) {
+      bool feasible = true;
+
+      foreach (Tour tour in solution.Tours) {
+        if (!Feasible(tour)) {
+          feasible = false;
+          break;
+        }
+      }
+
+      return feasible;
+    }
+
+    protected double GetLength(Tour tour) {
+      return tour.GetLength(
+                CoordinatesParameter.ActualValue,
+                DistanceMatrixParameter,
+                UseDistanceMatrixParameter.ActualValue);
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VRPSolution.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VRPSolution.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VRPSolution.cs	(revision 4218)
@@ -0,0 +1,386 @@
+#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.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  /// <summary>
+  /// Represents a VRP solution which can be visualized in the GUI.
+  /// </summary>
+  [Item("VRPSolution", "Represents a VRP solution which can be visualized in the GUI.")]
+  [StorableClass]
+  public sealed class VRPSolution : Item {
+    public override Image ItemImage {
+      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Image; }
+    }
+
+    [Storable]
+    private DoubleMatrix coordinates;
+    public DoubleMatrix Coordinates {
+      get { return coordinates; }
+      set {
+        if (coordinates != value) {
+          if (coordinates != null) DeregisterCoordinatesEvents();
+          coordinates = value;
+          if (coordinates != null) RegisterCoordinatesEvents();
+          OnCoordinatesChanged();
+        }
+      }
+    }
+    [Storable]
+    private IVRPEncoding solution;
+    public IVRPEncoding Solution {
+      get { return solution; }
+      set {
+        if (solution != value) {
+          if (solution != null) DeregisterSolutionEvents();
+          solution = value;
+          if (solution != null) RegisterSolutionEvents();
+          OnSolutionChanged();
+        }
+      }
+    }
+    [Storable]
+    private DoubleValue quality;
+    public DoubleValue Quality {
+      get { return quality; }
+      set {
+        if (quality != value) {
+          if (quality != null) DeregisterQualityEvents();
+          quality = value;
+          if (quality != null) RegisterQualityEvents();
+          OnQualityChanged();
+        }
+      }
+    }
+    [Storable]
+    private DoubleValue distance;
+    public DoubleValue Distance {
+      get { return distance; }
+      set {
+        if (distance != value) {
+          if (distance != null) DeregisterDistanceEvents();
+          distance = value;
+          if (distance != null) RegisterDistanceEvents();
+          OnDistanceChanged();
+        }
+      }
+    }
+    [Storable]
+    private DoubleValue overload;
+    public DoubleValue Overload {
+      get { return overload; }
+      set {
+        if (overload != value) {
+          if (overload != null) DeregisterOverloadEvents();
+          overload = value;
+          if (overload != null) RegisterOverloadEvents();
+          OnOverloadChanged();
+        }
+      }
+    }
+    [Storable]
+    private DoubleValue tardiness;
+    public DoubleValue Tardiness {
+      get { return tardiness; }
+      set {
+        if (tardiness != value) {
+          if (tardiness != null) DeregisterTardinessEvents();
+          tardiness = value;
+          if (tardiness != null) RegisterTardinessEvents();
+          OnTardinessChanged();
+        }
+      }
+    }
+    [Storable]
+    private DoubleValue travelTime;
+    public DoubleValue TravelTime {
+      get { return travelTime; }
+      set {
+        if (travelTime != value) {
+          if (travelTime != null) DeregisterTravelTimeEvents();
+          travelTime = value;
+          if (travelTime != null) RegisterTravelTimeEvents();
+          OnTravelTimeChanged();
+        }
+      }
+    }
+    [Storable]
+    private DoubleValue vehicleUtilization;
+    public DoubleValue VehicleUtilization {
+      get { return vehicleUtilization; }
+      set {
+        if (vehicleUtilization != value) {
+          if (vehicleUtilization != null) DeregisterVehicleUtilizationEvents();
+          vehicleUtilization = value;
+          if (vehicleUtilization != null) RegisterVehicleUtilizationEvents();
+          OnVehicleUtilizationChanged();
+        }
+      }
+    }
+    [Storable]
+    private DoubleMatrix distanceMatrix;
+    public DoubleMatrix DistanceMatrix {
+      get { return distanceMatrix; }
+      set {
+        if (distanceMatrix != value) {
+          distanceMatrix = value;
+        }
+      }
+    }
+    [Storable]
+    private BoolValue useDistanceMatrix;
+    public BoolValue UseDistanceMatrix {
+      get { return useDistanceMatrix; }
+      set {
+        if (useDistanceMatrix != value) {
+          useDistanceMatrix = value;
+        }
+      }
+    }
+    [Storable]
+    private DoubleArray readyTime;
+    public DoubleArray ReadyTime {
+      get { return readyTime; }
+      set {
+        if (readyTime != value) {
+          readyTime = value;
+        }
+      }
+    }
+    [Storable]
+    private DoubleArray dueTime;
+    public DoubleArray DueTime {
+      get { return dueTime; }
+      set {
+        if (dueTime != value) {
+          dueTime = value;
+        }
+      }
+    }
+    [Storable]
+    private DoubleArray serviceTime;
+    public DoubleArray ServiceTime {
+      get { return serviceTime; }
+      set {
+        if (serviceTime != value) {
+          serviceTime = value;
+        }
+      }
+    }
+
+    public VRPSolution() : base() { }
+
+    public VRPSolution(DoubleMatrix coordinates): base() {
+      this.coordinates = coordinates;
+    }
+
+    public VRPSolution(DoubleMatrix coordinates, IVRPEncoding solution, DoubleValue quality, 
+      DoubleValue distance, DoubleValue overload, DoubleValue tardiness, DoubleValue travelTime, 
+      DoubleValue vehicleUtilization, DoubleMatrix distanceMatrix, BoolValue useDistanceMatrix,
+      DoubleArray readyTime, DoubleArray dueTime, DoubleArray serviceTime)
+      : base() {
+      this.coordinates = coordinates;
+      this.solution = solution;
+      this.quality = quality;
+      this.distance = distance;
+      this.overload = overload;
+      this.tardiness = tardiness;
+      this.travelTime = travelTime;
+      this.vehicleUtilization = vehicleUtilization;
+      this.distanceMatrix = distanceMatrix;
+      this.useDistanceMatrix = useDistanceMatrix;
+      this.readyTime = readyTime;
+      this.dueTime = dueTime;
+      this.serviceTime = serviceTime;
+      Initialize();
+    }
+    [StorableConstructor]
+    private VRPSolution(bool deserializing) : base(deserializing) { }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void Initialize() {
+      if (coordinates != null) RegisterCoordinatesEvents();
+      if (solution != null) RegisterSolutionEvents();
+      if (quality != null) RegisterQualityEvents();
+      if (distance != null) RegisterDistanceEvents();
+      if (overload != null) RegisterOverloadEvents();
+      if (tardiness != null) RegisterTardinessEvents();
+      if (travelTime != null) RegisterTravelTimeEvents();
+      if (vehicleUtilization != null) RegisterVehicleUtilizationEvents();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      VRPSolution clone = new VRPSolution();
+      cloner.RegisterClonedObject(this, clone);
+      clone.coordinates = (DoubleMatrix)cloner.Clone(coordinates);
+      clone.solution = (IVRPEncoding)cloner.Clone(solution);
+      clone.quality = (DoubleValue)cloner.Clone(quality);
+      clone.distance = (DoubleValue)cloner.Clone(distance);
+      clone.overload = (DoubleValue)cloner.Clone(overload);
+      clone.tardiness = (DoubleValue)cloner.Clone(tardiness);
+      clone.travelTime = (DoubleValue)cloner.Clone(travelTime);
+      clone.vehicleUtilization = (DoubleValue)cloner.Clone(vehicleUtilization);
+      clone.distanceMatrix = (DoubleMatrix)cloner.Clone(distanceMatrix);
+      clone.useDistanceMatrix = (BoolValue)cloner.Clone(useDistanceMatrix);
+      clone.readyTime = (DoubleArray)cloner.Clone(readyTime);
+      clone.dueTime = (DoubleArray)cloner.Clone(dueTime);
+      clone.serviceTime = (DoubleArray)cloner.Clone(serviceTime);
+      clone.Initialize();
+      return clone;
+    }
+
+    #region Events
+    public event EventHandler CoordinatesChanged;
+    private void OnCoordinatesChanged() {
+      var changed = CoordinatesChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+    public event EventHandler SolutionChanged;
+    private void OnSolutionChanged() {
+      var changed = SolutionChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+    public event EventHandler QualityChanged;
+    private void OnQualityChanged() {
+      var changed = QualityChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+    public event EventHandler DistanceChanged;
+    private void OnDistanceChanged() {
+      var changed = DistanceChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+    public event EventHandler OverloadChanged;
+    private void OnOverloadChanged() {
+      var changed = OverloadChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+    public event EventHandler TardinessChanged;
+    private void OnTardinessChanged() {
+      var changed = TardinessChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+    public event EventHandler TravelTimeChanged;
+    private void OnTravelTimeChanged() {
+      var changed = TravelTimeChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+    public event EventHandler VehicleUtilizationChanged;
+    private void OnVehicleUtilizationChanged() {
+      var changed = VehicleUtilizationChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+
+    private void RegisterCoordinatesEvents() {
+      Coordinates.ItemChanged += new EventHandler<EventArgs<int, int>>(Coordinates_ItemChanged);
+      Coordinates.Reset += new EventHandler(Coordinates_Reset);
+    }
+    private void DeregisterCoordinatesEvents() {
+      Coordinates.ItemChanged -= new EventHandler<EventArgs<int, int>>(Coordinates_ItemChanged);
+      Coordinates.Reset -= new EventHandler(Coordinates_Reset);
+    }
+    private void RegisterSolutionEvents() {
+      Solution.ToStringChanged += new EventHandler(Solution_ToStringChanged);
+    }
+    private void DeregisterSolutionEvents() {
+      Solution.ToStringChanged -= new EventHandler(Solution_ToStringChanged);
+    }
+    private void RegisterQualityEvents() {
+      Quality.ValueChanged += new EventHandler(Quality_ValueChanged);
+    }
+    private void DeregisterQualityEvents() {
+      Quality.ValueChanged -= new EventHandler(Quality_ValueChanged);
+    }
+    private void RegisterDistanceEvents() {
+      Distance.ValueChanged += new EventHandler(Distance_ValueChanged);
+    }
+    private void DeregisterDistanceEvents() {
+      Distance.ValueChanged -= new EventHandler(Distance_ValueChanged);
+    }
+    private void RegisterOverloadEvents() {
+      Overload.ValueChanged += new EventHandler(Overload_ValueChanged);
+    }
+    private void DeregisterOverloadEvents() {
+      Overload.ValueChanged -= new EventHandler(Overload_ValueChanged);
+    }
+    private void RegisterTardinessEvents() {
+      Tardiness.ValueChanged += new EventHandler(Tardiness_ValueChanged);
+    }
+    private void DeregisterTardinessEvents() {
+      Tardiness.ValueChanged -= new EventHandler(Tardiness_ValueChanged);
+    }
+    private void RegisterTravelTimeEvents() {
+      TravelTime.ValueChanged += new EventHandler(TravelTime_ValueChanged);
+    }
+    private void DeregisterTravelTimeEvents() {
+      TravelTime.ValueChanged -= new EventHandler(TravelTime_ValueChanged);
+    }
+    private void RegisterVehicleUtilizationEvents() {
+      VehicleUtilization.ValueChanged += new EventHandler(VehicleUtilization_ValueChanged);
+    }
+    private void DeregisterVehicleUtilizationEvents() {
+      VehicleUtilization.ValueChanged -= new EventHandler(VehicleUtilization_ValueChanged);
+    }
+
+    private void Coordinates_ItemChanged(object sender, EventArgs<int, int> e) {
+      OnCoordinatesChanged();
+    }
+    private void Coordinates_Reset(object sender, EventArgs e) {
+      OnCoordinatesChanged();
+    }
+    private void Solution_ToStringChanged(object sender, EventArgs e) {
+      OnSolutionChanged();
+    }
+    private void Quality_ValueChanged(object sender, EventArgs e) {
+      OnQualityChanged();
+    }
+    private void Distance_ValueChanged(object sender, EventArgs e) {
+      OnDistanceChanged();
+    }
+    private void Overload_ValueChanged(object sender, EventArgs e) {
+      OnOverloadChanged();
+    }
+    private void Tardiness_ValueChanged(object sender, EventArgs e) {
+      OnTardinessChanged();
+    }
+    private void TravelTime_ValueChanged(object sender, EventArgs e) {
+      OnTravelTimeChanged();
+    }
+    private void VehicleUtilization_ValueChanged(object sender, EventArgs e) {
+      OnVehicleUtilizationChanged();
+    }
+    #endregion
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VRPUtilities.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VRPUtilities.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VRPUtilities.cs	(revision 4218)
@@ -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 System;
+using System.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  public sealed class VRPUtilities {
+    public static double CalculateDistance(int start, int end, DoubleMatrix coordinates) {
+      double distance = 0.0;
+
+      distance =
+          Math.Sqrt(
+            Math.Pow(coordinates[start, 0] - coordinates[end, 0], 2) +
+            Math.Pow(coordinates[start, 1] - coordinates[end, 1], 2));
+
+      return distance;
+    }
+
+    private static DoubleMatrix CreateDistanceMatrix(DoubleMatrix coordinates) {
+      DoubleMatrix distanceMatrix = new DoubleMatrix(coordinates.Rows, coordinates.Rows);
+
+      for (int i = 0; i < distanceMatrix.Rows; i++) {
+        for (int j = i; j < distanceMatrix.Columns; j++) {
+          double distance = CalculateDistance(i, j, coordinates);
+
+          distanceMatrix[i, j] = distance;
+          distanceMatrix[j, i] = distance;
+        }
+      }
+
+      return distanceMatrix;
+    }
+
+    public static double GetDistance(int start, int end,
+      DoubleMatrix coordinates, ILookupParameter<DoubleMatrix> distanceMatrix, BoolValue useDistanceMatrix) {
+      double distance = 0.0;
+
+      if (useDistanceMatrix.Value) {
+        if (distanceMatrix.ActualValue == null) {
+          distanceMatrix.ActualValue = CreateDistanceMatrix(coordinates);
+        }
+
+        distance = distanceMatrix.ActualValue[start, end];
+      } else {
+        distance = CalculateDistance(start, end, coordinates);
+      }
+
+      return distance;
+    }
+
+    public static double GetDistance(int start, int end,
+      DoubleMatrix coordinates, DoubleMatrix distanceMatrix, BoolValue useDistanceMatrix) {
+      double distance = 0.0;
+
+      if (useDistanceMatrix.Value) {
+        distance = distanceMatrix[start, end];
+      } else {
+        distance = CalculateDistance(start, end, coordinates);
+      }
+
+      return distance;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VehicleRoutingProblem.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VehicleRoutingProblem.cs	(revision 4218)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/VehicleRoutingProblem.cs	(revision 4218)
@@ -0,0 +1,465 @@
+﻿#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.Drawing;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+
+namespace HeuristicLab.Problems.VehicleRouting {
+  [Item("Vehicle Routing Problem", "Represents a Vehicle Routing Problem.")]
+  [Creatable("Problems")]
+  [StorableClass]
+  public sealed class VehicleRoutingProblem : ParameterizedNamedItem, ISingleObjectiveProblem {
+    public override Image ItemImage {
+      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Type; }
+    }
+
+    #region Parameter Properties
+    public ValueParameter<BoolValue> MaximizationParameter {
+      get { return (ValueParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    IParameter ISingleObjectiveProblem.MaximizationParameter {
+      get { return MaximizationParameter; }
+    }
+    public ValueParameter<DoubleMatrix> CoordinatesParameter {
+      get { return (ValueParameter<DoubleMatrix>)Parameters["Coordinates"]; }
+    }
+    public OptionalValueParameter<DoubleMatrix> DistanceMatrixParameter {
+      get { return (OptionalValueParameter<DoubleMatrix>)Parameters["DistanceMatrix"]; }
+    }
+    public ValueParameter<BoolValue> UseDistanceMatrixParameter {
+      get { return (ValueParameter<BoolValue>)Parameters["UseDistanceMatrix"]; }
+    }
+    public ValueParameter<IntValue> VehiclesParameter {
+      get { return (ValueParameter<IntValue>)Parameters["Vehicles"]; }
+    }
+    public ValueParameter<DoubleValue> CapacityParameter {
+      get { return (ValueParameter<DoubleValue>)Parameters["Capacity"]; }
+    }
+    public ValueParameter<DoubleArray> DemandParameter {
+      get { return (ValueParameter<DoubleArray>)Parameters["Demand"]; }
+    }
+    public ValueParameter<DoubleArray> ReadyTimeParameter {
+      get { return (ValueParameter<DoubleArray>)Parameters["ReadyTime"]; }
+    }
+    public ValueParameter<DoubleArray> DueTimeParameter {
+      get { return (ValueParameter<DoubleArray>)Parameters["DueTime"]; }
+    }
+    public ValueParameter<DoubleArray> ServiceTimeParameter {
+      get { return (ValueParameter<DoubleArray>)Parameters["ServiceTime"]; }
+    }
+    ValueParameter<IVRPCreator> SolutionCreatorParameter {
+      get { return (ValueParameter<IVRPCreator>)Parameters["SolutionCreator"]; }
+    }
+    IParameter IProblem.SolutionCreatorParameter {
+      get { return SolutionCreatorParameter; }
+    }
+    ValueParameter<IVRPEvaluator> EvaluatorParameter {
+      get { return (ValueParameter<IVRPEvaluator>)Parameters["Evaluator"]; }
+    }
+    IParameter IProblem.EvaluatorParameter {
+      get { return EvaluatorParameter; }
+    }
+    public IValueParameter<DoubleValue> FleetUsageFactor {
+      get { return (IValueParameter<DoubleValue>)Parameters["EvalFleetUsageFactor"]; }
+    }
+    public IValueParameter<DoubleValue> TimeFactor {
+      get { return (IValueParameter<DoubleValue>)Parameters["EvalTimeFactor"]; }
+    }
+    public IValueParameter<DoubleValue> DistanceFactor {
+      get { return (IValueParameter<DoubleValue>)Parameters["EvalDistanceFactor"]; }
+    }
+    public IValueParameter<DoubleValue> OverloadPenalty {
+      get { return (IValueParameter<DoubleValue>)Parameters["EvalOverloadPenalty"]; }
+    }
+    public IValueParameter<DoubleValue> TardinessPenalty {
+      get { return (IValueParameter<DoubleValue>)Parameters["EvalTardinessPenalty"]; }
+    }
+    public OptionalValueParameter<DoubleValue> BestKnownQualityParameter {
+      get { return (OptionalValueParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
+    }
+    IParameter ISingleObjectiveProblem.BestKnownQualityParameter {
+      get { return BestKnownQualityParameter; }
+    }
+    #endregion
+
+    #region Properties
+    public DoubleMatrix Coordinates {
+      get { return CoordinatesParameter.Value; }
+      set { CoordinatesParameter.Value = value; }
+    }
+    public DoubleMatrix DistanceMatrix {
+      get { return DistanceMatrixParameter.Value; }
+      set { DistanceMatrixParameter.Value = value; }
+    }
+    public BoolValue UseDistanceMatrix {
+      get { return UseDistanceMatrixParameter.Value; }
+      set { UseDistanceMatrixParameter.Value = value; }
+    }
+    public IntValue Vehicles {
+      get { return VehiclesParameter.Value; }
+      set { VehiclesParameter.Value = value; }
+    }
+    public DoubleValue Capacity {
+      get { return CapacityParameter.Value; }
+      set { CapacityParameter.Value = value; }
+    }
+    public DoubleArray Demand {
+      get { return DemandParameter.Value; }
+      set { DemandParameter.Value = value; }
+    }
+    public DoubleArray ReadyTime {
+      get { return ReadyTimeParameter.Value; }
+      set { ReadyTimeParameter.Value = value; }
+    }
+    public DoubleArray DueTime {
+      get { return DueTimeParameter.Value; }
+      set { DueTimeParameter.Value = value; }
+    }
+    public DoubleArray ServiceTime {
+      get { return ServiceTimeParameter.Value; }
+      set { ServiceTimeParameter.Value = value; }
+    }
+    public DoubleValue BestKnownQuality {
+      get { return BestKnownQualityParameter.Value; }
+      set { BestKnownQualityParameter.Value = value; }
+    }
+    IVRPCreator SolutionCreator {
+      get { return SolutionCreatorParameter.Value; }
+      set { SolutionCreatorParameter.Value = value; }
+    }
+    ISolutionCreator IProblem.SolutionCreator {
+      get { return SolutionCreatorParameter.Value; }
+    }
+    IVRPEvaluator Evaluator {
+      get { return EvaluatorParameter.Value; }
+      set { EvaluatorParameter.Value = value; }
+    }
+    ISingleObjectiveEvaluator ISingleObjectiveProblem.Evaluator {
+      get { return EvaluatorParameter.Value; }
+    }
+    IEvaluator IProblem.Evaluator {
+      get { return EvaluatorParameter.Value; }
+    }
+    public IEnumerable<IOperator> Operators {
+      get { return operators; }
+    }
+    private BestVRPSolutionAnalyzer BestVRPSolutionAnalyzer {
+      get { return operators.OfType<BestVRPSolutionAnalyzer>().FirstOrDefault(); }
+    }
+    #endregion
+
+    [Storable]
+    private List<IOperator> operators;
+
+    [StorableConstructor]
+    private VehicleRoutingProblem(bool deserializing) : base(deserializing) { }
+    public VehicleRoutingProblem()
+      : base() {
+      IVRPCreator creator = new RandomCreator();
+      IVRPEvaluator evaluator = new VRPEvaluator();
+
+      Parameters.Add(new ValueParameter<BoolValue>("Maximization", "Set to false as the Vehicle Routing Problem is a minimization problem.", new BoolValue(false)));
+      Parameters.Add(new ValueParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the cities.", new DoubleMatrix()));
+      Parameters.Add(new OptionalValueParameter<DoubleMatrix>("DistanceMatrix", "The matrix which contains the distances between the cities."));
+      Parameters.Add(new ValueParameter<BoolValue>("UseDistanceMatrix", "True if a distance matrix should be calculated and used for evaluation, otherwise false.", new BoolValue(true)));
+      Parameters.Add(new ValueParameter<IntValue>("Vehicles", "The number of vehicles.", new IntValue(0)));
+      Parameters.Add(new ValueParameter<DoubleValue>("Capacity", "The capacity of each vehicle.", new DoubleValue(0)));
+      Parameters.Add(new ValueParameter<DoubleArray>("Demand", "The demand of each customer.", new DoubleArray()));
+      Parameters.Add(new ValueParameter<DoubleArray>("ReadyTime", "The ready time of each customer.", new DoubleArray()));
+      Parameters.Add(new ValueParameter<DoubleArray>("DueTime", "The due time of each customer.", new DoubleArray()));
+      Parameters.Add(new ValueParameter<DoubleArray>("ServiceTime", "The service time of each customer.", new DoubleArray()));
+      Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this VRP instance."));
+      Parameters.Add(new ValueParameter<DoubleValue>("EvalFleetUsageFactor", "The fleet usage factor considered in the evaluation.", new DoubleValue(100)));
+      Parameters.Add(new ValueParameter<DoubleValue>("EvalTimeFactor", "The time factor considered in the evaluation.", new DoubleValue(0)));
+      Parameters.Add(new ValueParameter<DoubleValue>("EvalDistanceFactor", "The distance factor considered in the evaluation.", new DoubleValue(1)));
+      Parameters.Add(new ValueParameter<DoubleValue>("EvalOverloadPenalty", "The overload penalty considered in the evaluation.", new DoubleValue(100)));
+      Parameters.Add(new ValueParameter<DoubleValue>("EvalTardinessPenalty", "The tardiness penalty considered in the evaluation.", new DoubleValue(100)));
+
+      Parameters.Add(new ValueParameter<IVRPCreator>("SolutionCreator", "The operator which should be used to create new VRP solutions.", creator));
+      Parameters.Add(new ValueParameter<IVRPEvaluator>("Evaluator", "The operator which should be used to evaluate VRP solutions.", evaluator));
+
+      creator.VRPToursParameter.ActualName = "VRPTours";
+      evaluator.QualityParameter.ActualName = "VRPQuality";
+
+      InitializeRandomVRPInstance();
+
+      ParameterizeSolutionCreator();
+      ParameterizeEvaluator();
+
+      InitializeOperators();
+      AttachEventHandlers();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      VehicleRoutingProblem clone = (VehicleRoutingProblem)base.Clone(cloner);
+      clone.operators = operators.Select(x => (IOperator)cloner.Clone(x)).ToList();
+      clone.DistanceMatrixParameter.Value = DistanceMatrixParameter.Value;
+      clone.AttachEventHandlers();
+      return clone;
+    }
+
+    #region Events
+    public event EventHandler SolutionCreatorChanged;
+    private void OnSolutionCreatorChanged() {
+      EventHandler handler = SolutionCreatorChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler EvaluatorChanged;
+    private void OnEvaluatorChanged() {
+      EventHandler handler = EvaluatorChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler OperatorsChanged;
+    private void OnOperatorsChanged() {
+      EventHandler handler = OperatorsChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Reset;
+    private void OnReset() {
+      EventHandler handler = Reset;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    void VehiclesValue_ValueChanged(object sender, EventArgs e) {
+      ParameterizeSolutionCreator();
+    }
+    private void CoordinatesParameter_ValueChanged(object sender, EventArgs e) {
+      Coordinates.ItemChanged += new EventHandler<EventArgs<int, int>>(Coordinates_ItemChanged);
+      Coordinates.Reset += new EventHandler(Coordinates_Reset);
+      ParameterizeSolutionCreator();
+      ClearDistanceMatrix();
+    }
+    private void Coordinates_ItemChanged(object sender, EventArgs<int, int> e) {
+      ClearDistanceMatrix();
+    }
+    private void Coordinates_Reset(object sender, EventArgs e) {
+      ParameterizeSolutionCreator();
+      ClearDistanceMatrix();
+    }
+    private void SolutionCreatorParameter_ValueChanged(object sender, EventArgs e) {
+      ParameterizeSolutionCreator();
+      ParameterizeEvaluator();
+      ParameterizeAnalyzer();
+      ParameterizeOperators();
+      OnSolutionCreatorChanged();
+    }
+    private void SolutionCreator_PermutationParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeEvaluator();
+      ParameterizeAnalyzer();
+      ParameterizeOperators();
+    }
+    private void EvaluatorParameter_ValueChanged(object sender, EventArgs e) {
+      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      ParameterizeEvaluator();
+      UpdateMoveEvaluators();
+      ParameterizeAnalyzer();
+      OnEvaluatorChanged();
+    }
+    private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeAnalyzer();
+    }
+    private void TranslocationMoveParameter_ActualNameChanged(object sender, EventArgs e) {
+      string name = ((ILookupParameter<TranslocationMove>)sender).ActualName;
+      foreach (IPermutationTranslocationMoveOperator op in Operators.OfType<IPermutationTranslocationMoveOperator>()) {
+        op.TranslocationMoveParameter.ActualName = name;
+      }
+    }
+    #endregion
+
+    #region Helpers
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserializationHook() {
+      AttachEventHandlers();
+    }
+
+    private void AttachEventHandlers() {
+      CoordinatesParameter.ValueChanged += new EventHandler(CoordinatesParameter_ValueChanged);
+      Vehicles.ValueChanged += new EventHandler(VehiclesValue_ValueChanged);
+      Coordinates.ItemChanged += new EventHandler<EventArgs<int, int>>(Coordinates_ItemChanged);
+      Coordinates.Reset += new EventHandler(Coordinates_Reset);
+      SolutionCreatorParameter.ValueChanged += new EventHandler(SolutionCreatorParameter_ValueChanged);
+      EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged);
+      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+    }
+    private void InitializeOperators() {
+      operators = new List<IOperator>();
+      operators.Add(new BestVRPSolutionAnalyzer());
+      ParameterizeAnalyzer();
+      operators.AddRange(ApplicationManager.Manager.GetInstances<IVRPOperator>().Cast<IOperator>());
+      ParameterizeOperators();
+      UpdateMoveEvaluators();
+      InitializeMoveGenerators();
+    }
+    private void InitializeMoveGenerators() {
+      foreach (IAlbaTranslocationMoveOperator op in Operators.OfType<IAlbaTranslocationMoveOperator>()) {
+        if (op is IMoveGenerator) {
+          op.TranslocationMoveParameter.ActualNameChanged += new EventHandler(TranslocationMoveParameter_ActualNameChanged);
+        }
+      }
+
+    }
+    private void UpdateMoveEvaluators() {
+      ParameterizeOperators();
+      OnOperatorsChanged();
+    }
+    private void ParameterizeSolutionCreator() {
+      SolutionCreator.CitiesParameter.Value = new IntValue(Coordinates.Rows - 1);
+      SolutionCreator.VehiclesParameter.ActualName = VehiclesParameter.Name;
+      SolutionCreator.CoordinatesParameter.ActualName = CoordinatesParameter.Name;
+      Evaluator.DistanceMatrixParameter.ActualName = DistanceMatrixParameter.Name;
+      Evaluator.UseDistanceMatrixParameter.ActualName = UseDistanceMatrixParameter.Name;
+      SolutionCreator.CapacityParameter.ActualName = CapacityParameter.Name;
+      SolutionCreator.DemandParameter.ActualName = DemandParameter.Name;
+      SolutionCreator.ReadyTimeParameter.ActualName = ReadyTimeParameter.Name;
+      SolutionCreator.DueTimeParameter.ActualName = DueTimeParameter.Name;
+      SolutionCreator.ServiceTimeParameter.ActualName = ServiceTimeParameter.Name;
+    }
+    private void ParameterizeEvaluator() {
+      Evaluator.VRPToursParameter.ActualName = SolutionCreator.VRPToursParameter.ActualName;
+      Evaluator.CoordinatesParameter.ActualName = CoordinatesParameter.Name;
+      Evaluator.DistanceMatrixParameter.ActualName = DistanceMatrixParameter.Name;
+      Evaluator.UseDistanceMatrixParameter.ActualName = UseDistanceMatrixParameter.Name;
+      Evaluator.VehiclesParameter.ActualName = VehiclesParameter.Name;
+      Evaluator.CapacityParameter.ActualName = CapacityParameter.Name;
+      Evaluator.DemandParameter.ActualName = DemandParameter.Name;
+      Evaluator.ReadyTimeParameter.ActualName = ReadyTimeParameter.Name;
+      Evaluator.DueTimeParameter.ActualName = DueTimeParameter.Name;
+      Evaluator.ServiceTimeParameter.ActualName = ServiceTimeParameter.Name;
+      Evaluator.FleetUsageFactor.ActualName = FleetUsageFactor.Name;
+      Evaluator.TimeFactor.ActualName = TimeFactor.Name;
+      Evaluator.DistanceFactor.ActualName = DistanceFactor.Name;
+      Evaluator.OverloadPenalty.ActualName = OverloadPenalty.Name;
+      Evaluator.TardinessPenalty.ActualName = TardinessPenalty.Name;
+    }
+    private void ParameterizeAnalyzer() {
+      BestVRPSolutionAnalyzer.CoordinatesParameter.ActualName = CoordinatesParameter.Name;
+      BestVRPSolutionAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
+      BestVRPSolutionAnalyzer.DistanceParameter.ActualName = Evaluator.DistanceParameter.ActualName;
+      BestVRPSolutionAnalyzer.OverloadParameter.ActualName = Evaluator.OverloadParameter.ActualName;
+      BestVRPSolutionAnalyzer.TardinessParameter.ActualName = Evaluator.TardinessParameter.ActualName;
+      BestVRPSolutionAnalyzer.VRPToursParameter.ActualName = SolutionCreator.VRPToursParameter.ActualName;
+      BestVRPSolutionAnalyzer.ResultsParameter.ActualName = "Results";
+    }
+    private void ParameterizeOperators() {
+      foreach (IVRPOperator op in Operators.OfType<IVRPOperator>()) {
+        if(op.CoordinatesParameter != null) op.CoordinatesParameter.ActualName = CoordinatesParameter.Name;
+        if(op.DistanceMatrixParameter != null) op.DistanceMatrixParameter.ActualName = DistanceMatrixParameter.Name;
+        if(op.UseDistanceMatrixParameter != null) op.UseDistanceMatrixParameter.ActualName = UseDistanceMatrixParameter.Name;
+        if(op.VehiclesParameter != null) op.VehiclesParameter.ActualName = VehiclesParameter.Name;
+        if(op.CapacityParameter != null) op.CapacityParameter.ActualName = CapacityParameter.Name;
+        if(op.DemandParameter != null) op.DemandParameter.ActualName = DemandParameter.Name;
+        if(op.ReadyTimeParameter != null) op.ReadyTimeParameter.ActualName = ReadyTimeParameter.Name;
+        if(op.DueTimeParameter != null) op.DueTimeParameter.ActualName = DueTimeParameter.Name;
+        if(op.ServiceTimeParameter != null) op.ServiceTimeParameter.ActualName = ServiceTimeParameter.Name;
+      }
+      
+      foreach (IVRPMoveOperator op in Operators.OfType<IVRPMoveOperator>()) {
+        op.VRPToursParameter.ActualName = SolutionCreator.VRPToursParameter.ActualName;
+      }
+
+      foreach (IVRPMoveEvaluator op in Operators.OfType<IVRPMoveEvaluator>()) {
+        op.FleetUsageFactor.ActualName = FleetUsageFactor.Name;
+        op.TimeFactor.ActualName = TimeFactor.Name;
+        op.DistanceFactor.ActualName = DistanceFactor.Name;
+        op.OverloadPenalty.ActualName = OverloadPenalty.Name;
+        op.TardinessPenalty.ActualName = TardinessPenalty.Name;
+        op.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
+        op.VRPToursParameter.ActualName = SolutionCreator.VRPToursParameter.ActualName;
+      }
+      string translocationMove = Operators.OfType<IMoveGenerator>().OfType<IAlbaTranslocationMoveOperator>().First().TranslocationMoveParameter.ActualName;
+      foreach (IAlbaTranslocationMoveOperator op in Operators.OfType<IAlbaTranslocationMoveOperator>())
+        op.TranslocationMoveParameter.ActualName = translocationMove;
+
+      foreach (IVRPCrossover op in Operators.OfType<IVRPCrossover>()) {
+        op.ParentsParameter.ActualName = SolutionCreator.VRPToursParameter.ActualName;
+        op.ChildParameter.ActualName = SolutionCreator.VRPToursParameter.ActualName;
+      }
+
+      foreach (IVRPManipulator op in Operators.OfType<IVRPManipulator>()) {
+        op.VRPToursParameter.ActualName = SolutionCreator.VRPToursParameter.ActualName;
+      }
+    }
+    private void ClearDistanceMatrix() {
+      DistanceMatrixParameter.Value = null;
+    }
+    #endregion
+
+    public void ImportFromSolomon(string solomonFileName) {
+      SolomonParser parser = new SolomonParser(solomonFileName);
+      parser.Parse();
+
+      this.Name = parser.ProblemName;
+
+      Coordinates = new DoubleMatrix(parser.Coordinates);
+      Vehicles.Value = parser.Vehicles;
+      Capacity.Value = parser.Capacity;
+      Demand = new DoubleArray(parser.Demands);
+      ReadyTime = new DoubleArray(parser.Readytimes);
+      DueTime = new DoubleArray(parser.Duetimes);
+      ServiceTime = new DoubleArray(parser.Servicetimes);
+
+      OnReset();
+    }
+
+    private void InitializeRandomVRPInstance() {
+      System.Random rand = new System.Random();
+
+      int cities = 100;
+
+      Coordinates = new DoubleMatrix(cities + 1, 2);
+      Demand = new DoubleArray(cities + 1);
+      DueTime = new DoubleArray(cities + 1);
+      ReadyTime = new DoubleArray(cities + 1);
+      ServiceTime = new DoubleArray(cities + 1);
+
+      Vehicles.Value = 100;
+      Capacity.Value = 200;
+
+      for (int i = 0; i <= cities; i++) {
+        Coordinates[i, 0] = rand.Next(0, 100);
+        Coordinates[i, 1] = rand.Next(0, 100);
+
+        if (i == 0) {
+          Demand[i] = 0;
+          DueTime[i] = Int16.MaxValue;
+          ReadyTime[i] = 0;
+          ServiceTime[i] = 0;
+        } else {
+          Demand[i] = rand.Next(10, 50);
+          DueTime[i] = rand.Next((int)Math.Ceiling(VRPUtilities.CalculateDistance(0, i, Coordinates)), 1200);
+          ReadyTime[i] = DueTime[i] - rand.Next(0, 100);
+          ServiceTime[i] = 90;
+        }
+      }
+    }
+  }
+}
