Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/AlbaEncoding.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/AlbaEncoding.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/AlbaEncoding.cs	(revision 4365)
@@ -0,0 +1,106 @@
+﻿#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;
+using HeuristicLab.Problems.VehicleRouting.Encodings.General;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+
+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 : PermutationEncoding {   
+    #region IVRPEncoding Members
+    public override List<Tour> GetTours() {
+      List<Tour> result = new List<Tour>();
+
+      int cities = ProblemInstance.Cities.Value;
+      
+      Tour tour = new Tour();
+      for (int i = 0; i < this.array.Length; i++) {
+        if (this.array[i] >= cities) {
+          if (tour.Stops.Count > 0) {
+            result.Add(tour);
+
+            tour = new Tour();
+          }
+        } else {
+          tour.Stops.Add(this.array[i] + 1);
+        }
+      }
+
+      if (tour.Stops.Count > 0) {
+        result.Add(tour);
+      }   
+
+      return result;
+    }
+    #endregion
+
+    public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) {
+      AlbaEncoding clone = new AlbaEncoding(
+        new Permutation(this.PermutationType, this.array), 
+        (IVRPProblemInstance)cloner.Clone(ProblemInstance));
+      cloner.RegisterClonedObject(this, clone);
+      clone.readOnly = readOnly;
+      return clone;
+    }
+
+    public AlbaEncoding(Permutation permutation, IVRPProblemInstance instance)
+      : base(permutation, instance) {
+    }
+
+    [StorableConstructor]
+    private AlbaEncoding(bool serializing)
+      : base(serializing) {
+    }
+
+    public static AlbaEncoding ConvertFrom(List<int> routeParam, IVRPProblemInstance instance) {
+      List<int> route = new List<int>(routeParam);
+      route.RemoveAt(routeParam.Count - 1);
+      
+      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()),
+        instance);
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Creators/DefaultRepresentationCreator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Creators/DefaultRepresentationCreator.cs	(revision 4363)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Creators/DefaultRepresentationCreator.cs	(revision 4365)
@@ -42,5 +42,5 @@
     public override IOperation Apply() {
       //choose default encoding here
-      //VRPToursParameter.ActualValue = AlbaEncoding.ConvertFrom(CreateSolution());
+      VRPToursParameter.ActualValue = AlbaEncoding.ConvertFrom(CreateSolution(), ProblemInstance);
 
       return base.Apply();
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Creators/PushForwardInsertionCreator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Creators/PushForwardInsertionCreator.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Creators/PushForwardInsertionCreator.cs	(revision 4365)
@@ -0,0 +1,206 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.VehicleRouting.Variants;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [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, ITimeWindowedOperator {
+    #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 Distance(int start, int end) {
+      return ProblemInstance.GetDistance(start, end);
+    }
+
+    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) {     
+      Tour subroute = new Tour();
+      subroute.Stops.AddRange(route.GetRange(begin,
+          route.Count - begin));
+
+      return ProblemInstance.Feasible(subroute);
+    }
+
+    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 = ProblemInstance.Coordinates[0, 0];
+      double y0 = ProblemInstance.Coordinates[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 <= ProblemInstance.Cities.Value; i++) {
+        distance = Distance(i, 0);
+        if (ProblemInstance.Coordinates[i, 0] < x0) distance = -distance;
+
+        cost = -alpha * distance + // distance 0 <-> City[i]
+               beta * (ProblemInstance as ITimeWindowedProblemInstance).DueTime[i] + // latest arrival time
+               gamma * (Math.Asin((ProblemInstance.Coordinates[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>(ProblemInstance.Cities.Value + ProblemInstance.Vehicles.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 < ProblemInstance.Cities.Value + ProblemInstance.Vehicles.Value)
+        route.Add(0);
+
+      return route;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Crossovers/AlbaCrossover.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Crossovers/AlbaCrossover.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Crossovers/AlbaCrossover.cs	(revision 4365)
@@ -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 HeuristicLab.Core;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("AlbaCrossover", "An operator which crosses two VRP representations.")]
+  [StorableClass]
+  public abstract class AlbaCrossover : AlbaOperator, IVRPCrossover, IStochasticOperator {
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+
+    public ILookupParameter<ItemArray<IVRPEncoding>> ParentsParameter {
+      get { return (ScopeTreeLookupParameter<IVRPEncoding>)Parameters["Parents"]; }
+    }
+
+    public ILookupParameter<IVRPEncoding> ChildParameter {
+      get { return (ILookupParameter<IVRPEncoding>)Parameters["Child"]; }
+    }
+    
+    [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."));
+
+      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";
+    }
+
+    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,
+            DistanceMatrixParameter);
+        } 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.4/Encodings/Alba/Crossovers/AlbaPermutationCrossover.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Crossovers/AlbaPermutationCrossover.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Crossovers/AlbaPermutationCrossover.cs	(revision 4365)
@@ -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("AlbaPermutationCrossover", "An operator which crosses two VRP representations using a standard permutation operator.  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 AlbaPermutationCrossover : AlbaCrossover {    
+    public IValueLookupParameter<IPermutationCrossover> InnerCrossoverParameter {
+      get { return (IValueLookupParameter<IPermutationCrossover>)Parameters["InnerCrossover"]; }
+    }
+
+    [StorableConstructor]
+    private AlbaPermutationCrossover(bool deserializing) : base(deserializing) { }
+
+    public AlbaPermutationCrossover()
+      : 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, ProblemInstance);
+      } else
+        return null;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaCustomerInsertionManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaCustomerInsertionManipulator.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaCustomerInsertionManipulator.cs	(revision 4365)
@@ -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("AlbaCustomerInsertionManipulator", "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 AlbaCustomerInsertionManipulator : AlbaManipulator {
+    [StorableConstructor]
+    private AlbaCustomerInsertionManipulator(bool deserializing) : base(deserializing) { }
+
+    public AlbaCustomerInsertionManipulator()
+      : base() {
+    }
+
+    protected override void Manipulate(IRandom random, AlbaEncoding individual) {
+      AlbaEncoding original = (AlbaEncoding)individual.Clone();
+      int cutIndex, insertIndex, number;
+
+      int customer = random.Next(ProblemInstance.Cities.Value);
+      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.4/Encodings/Alba/Manipulators/AlbaCustomerInversionManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaCustomerInversionManipulator.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaCustomerInversionManipulator.cs	(revision 4365)
@@ -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("AlbaCustomerInversionManipulator", "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 AlbaCustomerInversionManipulator : AlbaManipulator {
+    [StorableConstructor]
+    private AlbaCustomerInversionManipulator(bool deserializing) : base(deserializing) { }
+
+    public AlbaCustomerInversionManipulator()
+      : base() {
+    }
+
+    protected override void Manipulate(IRandom random, AlbaEncoding individual) {
+      int breakPoint1, breakPoint2;
+
+      int customer1 = random.Next(ProblemInstance.Cities.Value);
+      breakPoint1 = FindCustomerLocation(customer1, individual);
+
+      int customer2 = random.Next(ProblemInstance.Cities.Value);
+      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.4/Encodings/Alba/Manipulators/AlbaCustomerSwapManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaCustomerSwapManipulator.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaCustomerSwapManipulator.cs	(revision 4365)
@@ -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("AlbaCustomerSwapManipulator", "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 AlbaCustomerSwapManipulator : AlbaManipulator {
+    [StorableConstructor]
+    private AlbaCustomerSwapManipulator(bool deserializing) : base(deserializing) { }
+
+    public AlbaCustomerSwapManipulator()
+      : base() {
+    }
+
+    protected override void Manipulate(IRandom random, AlbaEncoding individual) {
+      int index1, index2, temp;
+
+      int customer1 = random.Next(ProblemInstance.Cities.Value);
+      index1 = FindCustomerLocation(customer1, individual);
+
+      int customer2 = random.Next(ProblemInstance.Cities.Value);
+      index2 = FindCustomerLocation(customer2, individual);
+
+      temp = individual[index1];
+      individual[index1] = individual[index2];
+      individual[index2] = temp;
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaIntraRouteInversionManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaIntraRouteInversionManipulator.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaIntraRouteInversionManipulator.cs	(revision 4365)
@@ -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("AlbaIntraRouteInversionManipulator", "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 AlbaIntraRouteInversionManipulator : AlbaManipulator {   
+    [StorableConstructor]
+    private AlbaIntraRouteInversionManipulator(bool deserializing) : base(deserializing) { }
+
+    public AlbaIntraRouteInversionManipulator()
+      : 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.GetTours()) {
+        if (tour.Stops.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.Stops[0]) {
+            currentTourStart = i;
+            break;
+          }
+        }
+
+        int currentTourEnd = currentTourStart;
+        while (currentTourEnd < individual.Length &&
+          individual[currentTourEnd] < ProblemInstance.Cities.Value) {
+          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.4/Encodings/Alba/Manipulators/AlbaLambdaInterchangeManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaLambdaInterchangeManipulator.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaLambdaInterchangeManipulator.cs	(revision 4365)
@@ -0,0 +1,125 @@
+﻿#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("AlbaLambdaInterchangeManipulator", "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 AlbaLambdaInterchangeManipulator : AlbaManipulator {
+    public IValueParameter<IntValue> LambdaParameter {
+      get { return (IValueParameter<IntValue>)Parameters["Lambda"]; }
+    }
+    
+    [StorableConstructor]
+    private AlbaLambdaInterchangeManipulator(bool deserializing) : base(deserializing) { }
+
+    public AlbaLambdaInterchangeManipulator()
+      : 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) {
+      List<Tour> tours = individual.GetTours();
+
+      Tour tour1 = tours[tour1Index];
+      int tour1Start = -1;
+      for (int i = 0; i < individual.Length; i++) {
+        if (individual[i] == tour1.Stops[0] - 1) {
+          tour1Start = i;
+          break;
+        }
+      }
+
+      Tour tour2 = tours[tour2Index];
+      int tour2Start = -1;
+      for (int i = 0; i < individual.Length; i++) {
+        if (individual[i] == tour2.Stops[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) {
+      List<Tour> tours = individual.GetTours();
+      int lambda = LambdaParameter.Value.Value;
+
+      int route1Index = rand.Next(tours.Count);
+      Tour route1 = tours[route1Index];
+
+      int route2Index = rand.Next(tours.Count - 1);
+      if (route2Index >= route1Index)
+        route2Index += 1;
+      Tour route2 = tours[route2Index];
+
+      int length1 = rand.Next(Math.Min(lambda + 1, route1.Stops.Count + 1));
+      int index1 = rand.Next(route1.Stops.Count - length1 + 1);
+
+      int l2Min = 0;
+      if (length1 == 0)
+        l2Min = 1;
+      int length2 = rand.Next(l2Min, Math.Min(lambda + 1, route2.Stops.Count + 1));
+      int index2 = rand.Next(route2.Stops.Count - length2 + 1);
+
+      Apply(individual, route1Index, index1, length1,
+        route2Index, index2, length2);
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaManipulator.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaManipulator.cs	(revision 4365)
@@ -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 HeuristicLab.Optimization;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
+  [Item("AlbaManipulator", "An operator which manipulates a VRP representation.")]
+  [StorableClass]
+  public abstract class AlbaManipulator : AlbaOperator, IVRPManipulator, IStochasticOperator {
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+
+    public ILookupParameter<IVRPEncoding> VRPToursParameter {
+      get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
+    }
+
+    [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."));
+        Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours to be manipulated."));
+    }
+
+    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, DistanceMatrixParameter);
+      }
+
+      Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as AlbaEncoding);
+
+      return base.Apply();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaPermutationManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaPermutationManipulator.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaPermutationManipulator.cs	(revision 4365)
@@ -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("AlbaPermutationManipulator", "An operator which manipulates a VRP representation by using a standard permutation manipulator.  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 AlbaPermutationManipualtor : AlbaManipulator {
+    public IValueLookupParameter<IPermutationManipulator> InnerManipulatorParameter {
+      get { return (IValueLookupParameter<IPermutationManipulator>)Parameters["InnerManipulator"]; }
+    }
+
+    [StorableConstructor]
+    private AlbaPermutationManipualtor(bool deserializing) : base(deserializing) { }
+
+    public AlbaPermutationManipualtor()
+      : 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.4/Encodings/General/Creators/MultiVRPSolutionCreator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Creators/MultiVRPSolutionCreator.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Creators/MultiVRPSolutionCreator.cs	(revision 4365)
@@ -0,0 +1,97 @@
+﻿#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 HeuristicLab.Problems.VehicleRouting.Interfaces;
+using HeuristicLab.Problems.VehicleRouting.Variants;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
+  [Item("MultiVRPSolutionCreator", "Randomly selects and applies one of its creator every time it is called.")]
+  [StorableClass]
+  public class MultiVRPSolutionCreator : StochasticMultiBranch<IVRPCreator>, IVRPCreator, IGeneralVRPOperator, IMultiVRPOperator, IStochasticOperator {
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    protected override bool CreateChildOperation {
+      get { return true; }
+    }
+
+    public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter {
+      get { return (LookupParameter<IVRPProblemInstance>)Parameters["ProblemInstance"]; }
+    }
+
+    public ILookupParameter<IVRPEncoding> VRPToursParameter {
+      get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; }
+    }
+
+    [StorableConstructor]
+    private MultiVRPSolutionCreator(bool deserializing) : base(deserializing) { }
+    public MultiVRPSolutionCreator()
+      : base() {
+      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The new VRP tours."));
+
+      Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance"));
+    }
+
+    protected override void Operators_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<IVRPCreator>> e) {
+      base.Operators_ItemsReplaced(sender, e);
+      ParameterizeCreators();
+    }
+
+    protected override void Operators_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<IVRPCreator>> e) {
+      base.Operators_ItemsAdded(sender, e);
+      ParameterizeCreators();
+    }
+
+    public void SetOperators(IEnumerable<IOperator> operators) {
+      foreach (IOperator op in operators) {
+        if (op is IVRPCreator && !(op is MultiVRPSolutionCreator)) {
+          Operators.Add(op.Clone() as IVRPCreator, true);
+        }
+      }
+    }
+
+    private void ParameterizeCreators() {
+      foreach (IVRPCreator creator in Operators.OfType<IVRPCreator>()) {
+        creator.VRPToursParameter.ActualName = VRPToursParameter.Name;
+        creator.ProblemInstanceParameter.ActualName = ProblemInstanceParameter.Name;
+      }
+      foreach (IStochasticOperator creator in Operators.OfType<IStochasticOperator>()) {
+        creator.RandomParameter.ActualName = RandomParameter.Name;
+      }
+    }
+
+    public override IOperation Apply() {
+      if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one VRP creator to choose from.");
+      return base.Apply();
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/PermutationEncoding.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/PermutationEncoding.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/PermutationEncoding.cs	(revision 4365)
@@ -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.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Collections.Generic;
+using System;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
+  [Item("PermutationEncoding", "Represents a base class for permutation encodings of VRP solutions.")]
+  [StorableClass]
+  public abstract class PermutationEncoding : Permutation, IVRPEncoding {
+    #region IVRPEncoding Members
+    public abstract List<Tour> GetTours();
+    #endregion
+
+    [Storable]
+    protected IVRPProblemInstance ProblemInstance { get; set; }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      PermutationEncoding clone = (PermutationEncoding)base.Clone(cloner);
+
+      clone.ProblemInstance = (IVRPProblemInstance)cloner.Clone(ProblemInstance);
+
+      return clone;
+    }
+
+    public PermutationEncoding(Permutation permutation, IVRPProblemInstance problemInstance)
+      : base(PermutationTypes.RelativeUndirected) {
+      this.array = new int[permutation.Length];
+      for (int i = 0; i < array.Length; i++)
+        this.array[i] = permutation[i];
+
+      this.ProblemInstance = problemInstance;
+    }
+
+    [StorableConstructor]
+    protected PermutationEncoding(bool serializing)
+      : base() {
+    }
+
+    public int IndexOf(int city) {
+      return Array.IndexOf(this.array, city);
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/TourEncoding.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/TourEncoding.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/TourEncoding.cs	(revision 4365)
@@ -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.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Drawing;
+using System.Collections.Generic;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+
+namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
+  [Item("TourEncoding", "Represents a base class for tour encodings of VRP solutions.")]
+  [StorableClass]
+  public abstract class TourEncoding : Item, IVRPEncoding {
+    public override Image ItemImage {
+      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Class; }
+    }
+    
+    #region IVRPEncoding Members
+    public virtual List<Tour> GetTours() {
+      List<Tour> result = new List<Tour>(Tours);
+
+     while (result.Count > ProblemInstance.Vehicles.Value) {
+        Tour tour = result[result.Count - 1];
+        result[result.Count - 2].Stops.AddRange(tour.Stops);
+
+        result.Remove(tour);
+      }   
+
+      return result;
+    }
+
+    public int Cities {
+      get 
+      {
+        int cities = 0;
+
+        foreach (Tour tour in Tours) {
+          cities += tour.Stops.Count;
+        }
+
+        return cities;
+      }
+    }
+    #endregion
+
+    [Storable]
+    public ItemList<Tour> Tours { get; set; }
+
+    [Storable]
+    protected IVRPProblemInstance ProblemInstance { get; set; }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      TourEncoding clone = (TourEncoding)base.Clone(cloner);
+
+      clone.ProblemInstance = (IVRPProblemInstance)cloner.Clone(ProblemInstance);
+
+      return clone;
+    }
+
+    public TourEncoding(IVRPProblemInstance problemInstance) {
+      Tours = new ItemList<Tour>();
+
+      ProblemInstance = problemInstance;
+    }
+
+    [StorableConstructor]
+    protected TourEncoding(bool serializing)
+      : base() {
+    }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/VRPEncoding.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/VRPEncoding.cs	(revision 4363)
+++ 	(revision )
@@ -1,43 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Problems.VehicleRouting.Interfaces;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Core;
-
-namespace HeuristicLab.Problems.VehicleRouting.Encodings {
-  [Item("VRPEncoding", "Represents a VRP encoding.")]
-  [StorableClass]
-  public abstract class VRPEncoding : Item, IVRPEncoding {
-    public abstract List<Tour> GetTours();
-
-    [StorableConstructor]
-    protected VRPEncoding(bool deserializing) : base(deserializing) { }
-
-    public VRPEncoding()
-      : base() {
-    }
-  }
-}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/VRPOperator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/VRPOperator.cs	(revision 4363)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/VRPOperator.cs	(revision 4365)
@@ -34,9 +34,9 @@
   [StorableClass]
   public abstract class VRPOperator : SingleSuccessorOperator, IVRPOperator {
-    protected LookupParameter<IVRPProblemInstance> ProblemInstanceParameter {
+    public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter {
       get { return (LookupParameter<IVRPProblemInstance>)Parameters["ProblemInstance"]; }
     }
 
-    protected IVRPProblemInstance ProblemInstance {
+    public IVRPProblemInstance ProblemInstance {
       get { return ProblemInstanceParameter.ActualValue; }
     }
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/HeuristicLab.Problems.VehicleRouting-3.4.csproj
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/HeuristicLab.Problems.VehicleRouting-3.4.csproj	(revision 4363)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/HeuristicLab.Problems.VehicleRouting-3.4.csproj	(revision 4365)
@@ -106,10 +106,29 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Encodings\Alba\AlbaEncoding.cs" />
     <Compile Include="Encodings\Alba\Creators\DefaultRepresentationCreator.cs" />
+    <Compile Include="Encodings\Alba\Creators\PushForwardInsertionCreator.cs" />
     <Compile Include="Encodings\Alba\Creators\RandomCreator.cs" />
     <Compile Include="Encodings\Alba\Creators\AlbaCreator.cs" />
     <Compile Include="Encodings\Alba\AlbaOperator.cs" />
+    <Compile Include="Encodings\Alba\Crossovers\AlbaCrossover.cs" />
+    <Compile Include="Encodings\Alba\Crossovers\AlbaPermutationCrossover.cs" />
+    <Compile Include="Encodings\Alba\Manipulators\AlbaCustomerInsertionManipulator.cs" />
+    <Compile Include="Encodings\Alba\Manipulators\AlbaCustomerInversionManipulator.cs" />
+    <Compile Include="Encodings\Alba\Manipulators\AlbaCustomerSwapManipulator.cs" />
+    <Compile Include="Encodings\Alba\Manipulators\AlbaIntraRouteInversionManipulator.cs" />
+    <Compile Include="Encodings\Alba\Manipulators\AlbaLambdaInterchangeManipulator.cs" />
+    <Compile Include="Encodings\Alba\Manipulators\AlbaManipulator.cs" />
+    <Compile Include="Encodings\Alba\Manipulators\AlbaPermutationManipulator.cs" />
+    <Compile Include="Encodings\General\Creators\MultiVRPSolutionCreator.cs" />
+    <Compile Include="Encodings\General\Crossovers\MultiVRPSolutionCrossover.cs" />
+    <Compile Include="Encodings\General\Crossovers\RandomParentCloneCrossover.cs" />
+    <Compile Include="Encodings\General\Manipulators\MultiVRPSolutionManipulator.cs" />
+    <Compile Include="Encodings\General\PermutationEncoding.cs" />
+    <Compile Include="Encodings\General\TourEncoding.cs" />
     <Compile Include="Encodings\VRPOperator.cs" />
-    <Compile Include="Encodings\VRPEncoding.cs" />
+    <Compile Include="Interfaces\IMultiVRPOperator.cs" />
+    <Compile Include="Interfaces\IVRPManipulator.cs" />
+    <Compile Include="Interfaces\IVRPCrossover.cs" />
     <Compile Include="Interfaces\IVRPEvaluator.cs" />
     <Compile Include="Interfaces\IVRPCreator.cs" />
@@ -123,4 +142,5 @@
     <Compile Include="Variants\Capacitated\Homogenous\ICapacitatedOperator.cs" />
     <Compile Include="Variants\Capacitated\Homogenous\ICapacitatedProblemInstance.cs" />
+    <Compile Include="Variants\General\IGeneralVRPOperator.cs" />
     <Compile Include="Variants\SingleDepot\ISingleDepotOperator.cs" />
     <Compile Include="Variants\SingleDepot\ISingleDepotEncoding.cs" />
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/HeuristicLabProblemsVehicleRoutingPlugin.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/HeuristicLabProblemsVehicleRoutingPlugin.cs	(revision 4363)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/HeuristicLabProblemsVehicleRoutingPlugin.cs	(revision 4365)
@@ -26,5 +26,5 @@
   /// Plugin class for HeuristicLab.Problems.VehicleRouting plugin
   /// </summary>
-  [Plugin("HeuristicLab.Problems.VehicleRouting", "3.4.0.4362")]
+  [Plugin("HeuristicLab.Problems.VehicleRouting", "3.4.0.4363")]
   [PluginFile("HeuristicLab.Problems.VehicleRouting-3.4.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Analysis", "3.3")]
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Interfaces/IMultiVRPOperator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Interfaces/IMultiVRPOperator.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Interfaces/IMultiVRPOperator.cs	(revision 4365)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Problems.VehicleRouting.Interfaces {
+  interface IMultiVRPOperator: IVRPOperator {
+    void SetOperators(IEnumerable<IOperator> operators);
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Interfaces/IVRPCrossover.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Interfaces/IVRPCrossover.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Interfaces/IVRPCrossover.cs	(revision 4365)
@@ -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.Interfaces {
+  public interface IVRPCrossover : IVRPOperator, ICrossover {
+    ILookupParameter<ItemArray<IVRPEncoding>> ParentsParameter { get; }
+    ILookupParameter<IVRPEncoding> ChildParameter { get; }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Interfaces/IVRPManipulator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Interfaces/IVRPManipulator.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Interfaces/IVRPManipulator.cs	(revision 4365)
@@ -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.Data;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.VehicleRouting.Interfaces {
+  public interface IVRPManipulator : IVRPOperator, IManipulator {
+    ILookupParameter<IVRPEncoding> VRPToursParameter { get; }
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Interfaces/IVRPOperator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Interfaces/IVRPOperator.cs	(revision 4363)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Interfaces/IVRPOperator.cs	(revision 4365)
@@ -28,4 +28,5 @@
 namespace HeuristicLab.Problems.VehicleRouting.Interfaces {
   public interface IVRPOperator: IItem {
+    ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter { get; }
   }
 }
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/SingleDepotVRPProblemInstance.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/SingleDepotVRPProblemInstance.cs	(revision 4363)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/SingleDepotVRPProblemInstance.cs	(revision 4365)
@@ -43,4 +43,10 @@
     }
 
+    public override IntValue Cities {
+      get {
+        return new IntValue(Demand.Length - 1);
+      }
+    }
+
     protected override IVRPEvaluator Evaluator {
       get {
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPEvaluator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPEvaluator.cs	(revision 4363)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPEvaluator.cs	(revision 4365)
@@ -124,11 +124,15 @@
 
     public override IOperation Apply() {
+      double quality = 0;
       InitResultParameters();
 
       foreach (Tour tour in VRPToursParameter.ActualValue.GetTours()) {
         VRPEvaluation tourEvaluation = EvaluateTour(ProblemInstance, tour);
+        quality += tourEvaluation.Quality;
 
         UpdateResultParameters(tourEvaluation);
       }
+
+      QualityParameter.ActualValue = new DoubleValue(quality);
 
       return base.Apply();
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPProblemInstance.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPProblemInstance.cs	(revision 4363)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPProblemInstance.cs	(revision 4365)
@@ -89,5 +89,5 @@
       set { DemandParameter.Value = value; }
     }
-    public IntValue Cities {
+    public virtual IntValue Cities {
       get { return new IntValue(Demand.Length); }
     }
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Variants/General/IGeneralVRPOperator.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Variants/General/IGeneralVRPOperator.cs	(revision 4365)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Variants/General/IGeneralVRPOperator.cs	(revision 4365)
@@ -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 System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Problems.VehicleRouting.Interfaces;
+
+namespace HeuristicLab.Problems.VehicleRouting.Variants {
+  public interface IGeneralVRPOperator: IVRPOperator {
+  }
+}
Index: branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/VehicleRoutingProblem.cs
===================================================================
--- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/VehicleRoutingProblem.cs	(revision 4363)
+++ branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/VehicleRoutingProblem.cs	(revision 4365)
@@ -35,4 +35,5 @@
 using HeuristicLab.Problems.VehicleRouting.Parsers;
 using HeuristicLab.Problems.VehicleRouting.ProblemInstances;
+using HeuristicLab.Problems.VehicleRouting.Variants;
 
 namespace HeuristicLab.Problems.VehicleRouting {
@@ -61,19 +62,15 @@
       get { return BestKnownQualityParameter; }
     }
-    public IParameter SolutionCreatorParameter {
-      get {
-        if (ProblemInstance != null)
-          return ProblemInstance.SolutionCreatorParameter;
-        else
-          return null;
-      }
-    }
-    public IParameter EvaluatorParameter {
-      get {
-        if (ProblemInstance != null)
-          return ProblemInstance.EvaluatorParameter;
-        else
-          return null;
-      }
+    public IValueParameter<IVRPCreator> SolutionCreatorParameter {
+      get { return (IValueParameter<IVRPCreator>)Parameters["SolutionCreator"]; }
+    }
+    IParameter IProblem.SolutionCreatorParameter {
+      get { return SolutionCreatorParameter; }
+    }
+    public IValueParameter<IVRPEvaluator> EvaluatorParameter {
+      get { return (IValueParameter<IVRPEvaluator>)Parameters["Evaluator"]; }
+    }
+    IParameter IProblem.EvaluatorParameter {
+      get { return EvaluatorParameter; }
     }
     #endregion
@@ -86,10 +83,5 @@
 
     public ISingleObjectiveEvaluator Evaluator {
-      get {
-        if (ProblemInstance != null)
-          return ProblemInstance.EvaluatorParameter.Value;
-        else
-          return null;
-      }
+      get { return ProblemInstance.EvaluatorParameter.Value; }
     }
 
@@ -99,19 +91,12 @@
 
     public ISolutionCreator SolutionCreator {
-      get {
-        if (ProblemInstance != null)
-          return ProblemInstance.SolutionCreatorParameter.Value;
-        else
-          return null;
-      }
-    }
+      get { return ProblemInstance.SolutionCreatorParameter.Value; }
+    }
+
+    [Storable]
+    private List<IOperator> operators; 
 
     public IEnumerable<IOperator> Operators {
-      get {
-        if (ProblemInstance != null)
-          return ProblemInstance.Operators.OrderBy(op => op.Name);
-        else
-          return null;
-      }
+      get { return operators; }
     }
     #endregion
@@ -124,6 +109,9 @@
       Parameters.Add(new ValueParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance"));
       Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this VRP instance."));
- 
+
+      operators = new List<IOperator>();
+
       InitializeRandomVRPInstance();
+      InitializeOperators();
 
       AttachEventHandlers();
@@ -133,4 +121,5 @@
     public override IDeepCloneable Clone(Cloner cloner) {
       VehicleRoutingProblem clone = (VehicleRoutingProblem)base.Clone(cloner);
+      clone.operators = operators.Select(x => (IOperator)cloner.Clone(x)).ToList();
       clone.AttachEventHandlers();
       return clone;
@@ -172,7 +161,15 @@
 
     private void AttachProblemInstanceEventHandlers() {
+      if (Parameters.ContainsKey("Evaluator"))
+        Parameters.Remove("Evaluator");
+
+      if (Parameters.ContainsKey("SolutionCreator"))
+        Parameters.Remove("SolutionCreator");
+
       if (ProblemInstance != null) {
         ProblemInstance.SolutionCreatorParameter.ValueChanged += new EventHandler(SolutionCreatorParameter_ValueChanged);
         ProblemInstance.EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged);
+        Parameters.Add(ProblemInstance.EvaluatorParameter);
+        Parameters.Add(ProblemInstance.SolutionCreatorParameter);
       }
     }
@@ -180,11 +177,43 @@
     void ProblemInstanceParameter_ValueChanged(object sender, EventArgs e) {
       AttachProblemInstanceEventHandlers();
-    }
-
+      InitializeOperators();
+
+      OnSolutionCreatorChanged();
+      OnEvaluatorChanged();
+      OnOperatorsChanged();
+    }
     private void SolutionCreatorParameter_ValueChanged(object sender, EventArgs e) {
+      ParameterizeSolutionCreator();
+      
       OnSolutionCreatorChanged();
     }
     private void EvaluatorParameter_ValueChanged(object sender, EventArgs e) {
       OnEvaluatorChanged();
+    }
+
+    private void InitializeOperators() {
+      operators = new List<IOperator>();
+
+      if (ProblemInstance != null) {
+        operators.AddRange(
+        ProblemInstance.Operators.Concat(
+          ApplicationManager.Manager.GetInstances<IGeneralVRPOperator>().Cast<IOperator>()).OrderBy(op => op.Name));
+      }
+
+      ParameterizeOperators();
+    }
+
+    private void ParameterizeSolutionCreator() {
+      if (SolutionCreator is IMultiVRPOperator) {
+        (SolutionCreator as IMultiVRPOperator).SetOperators(Operators);
+      }
+    }
+
+    private void ParameterizeOperators() {
+      foreach (IOperator op in Operators) {
+        if (op is IMultiVRPOperator) {
+          (op as IMultiVRPOperator).SetOperators(Operators);
+        }
+      }
     }
     #endregion
