Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/29/10 20:30:20 (14 years ago)
Author:
gkronber
Message:

Refactored cloning in HeuristicLab.Problems.VehicleRouting. #922

Location:
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/AlbaEncoding.cs

    r4352 r4690  
    3434    [Storable]
    3535    private int cities;
    36    
     36
    3737    #region IVRPEncoding Members
    3838    public override List<Tour> GetTours(ILookupParameter<DoubleMatrix> distanceMatrix = null, int maxVehicles = int.MaxValue) {
     
    6464
    6565    public int MaxVehicles {
    66       get { return Length - Cities + 1;  }
     66      get { return Length - Cities + 1; }
    6767    }
    6868
    6969    #endregion
    7070
    71     public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) {
    72       AlbaEncoding clone = new AlbaEncoding(
    73         new Permutation(this.PermutationType, this.array), cities);
    74       cloner.RegisterClonedObject(this, clone);
    75       clone.readOnly = readOnly;
    76       return clone;
     71
     72    [StorableConstructor]
     73    protected AlbaEncoding(bool deserializing) : base(deserializing) { }
     74    protected AlbaEncoding(AlbaEncoding original, Cloner cloner)
     75      : base(original, cloner) {
     76      cities = original.cities;
     77      readOnly = original.readOnly;
    7778    }
    7879
     
    8283    }
    8384
    84     [StorableConstructor]
    85     private AlbaEncoding(bool serializing)
    86       : base(serializing) {
     85    public override IDeepCloneable Clone(Cloner cloner) {
     86      return new AlbaEncoding(this, cloner);
    8787    }
    8888
     
    103103      foreach (Tour tour in tours) {
    104104        foreach (int city in tour.Cities) {
    105             array[arrayIndex] = city - 1;
    106             arrayIndex++;
     105          array[arrayIndex] = city - 1;
     106          arrayIndex++;
    107107        }
    108108
     
    119119        arrayIndex++;
    120120      }
    121            
     121
    122122      AlbaEncoding solution = new AlbaEncoding(new Permutation(PermutationTypes.RelativeUndirected, new IntArray(array)), cities);
    123123
     
    128128      List<int> route = new List<int>(routeParam);
    129129      route.RemoveAt(routeParam.Count - 1);
    130      
     130
    131131      int cities = 0;
    132132      for (int i = 0; i < route.Count; i++) {
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaCrossover.cs

    r4352 r4690  
    2626using HeuristicLab.Data;
    2727using HeuristicLab.Optimization;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    3435      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    3536    }
    36    
     37
    3738    [StorableConstructor]
    3839    protected AlbaCrossover(bool deserializing) : base(deserializing) { }
    39 
     40    protected AlbaCrossover(AlbaCrossover original, Cloner cloner) : base(original, cloner) { }
    4041    public AlbaCrossover()
    4142      : base() {
    4243      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    43    
     44
    4445      AlbaEncoding.RemoveUnusedParameters(Parameters);
    4546    }
     
    6162      ParentsParameter.ActualValue = parents;
    6263
    63       ChildParameter.ActualValue = 
     64      ChildParameter.ActualValue =
    6465        Crossover(RandomParameter.ActualValue, parents[0] as AlbaEncoding, parents[1] as AlbaEncoding);
    6566
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaPermutationCrossover.cs

    r4352 r4690  
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Data;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    3637    [StorableConstructor]
    3738    private AlbaPermutationCrossover(bool deserializing) : base(deserializing) { }
    38 
     39    private AlbaPermutationCrossover(AlbaPermutationCrossover original, Cloner cloner)
     40      : base(original, cloner) {
     41    }
    3942    public AlbaPermutationCrossover()
    4043      : base() {
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaCustomerInsertionManipulator.cs

    r4352 r4690  
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Data;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    3233    [StorableConstructor]
    3334    private AlbaCustomerInsertionManipulator(bool deserializing) : base(deserializing) { }
    34 
     35    private AlbaCustomerInsertionManipulator(AlbaCustomerInsertionManipulator original, Cloner cloner)
     36      : base(original, cloner) {
     37    }
    3538    public AlbaCustomerInsertionManipulator()
    3639      : base() {
     40    }
     41
     42    public override IDeepCloneable Clone(Cloner cloner) {
     43      return new AlbaCustomerInsertionManipulator(this, cloner);
    3744    }
    3845
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaCustomerInversionManipulator.cs

    r4352 r4690  
    2626using HeuristicLab.Data;
    2727using System.Collections.Generic;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    3334    [StorableConstructor]
    3435    private AlbaCustomerInversionManipulator(bool deserializing) : base(deserializing) { }
    35 
     36    private AlbaCustomerInversionManipulator(AlbaCustomerInversionManipulator original, Cloner cloner)
     37      : base(original, cloner) {
     38    }
    3639    public AlbaCustomerInversionManipulator()
    3740      : base() {
    3841    }
    3942
     43    public override IDeepCloneable Clone(Cloner cloner) {
     44      return new AlbaCustomerInversionManipulator(this, cloner);
     45    }
    4046    protected override void Manipulate(IRandom random, AlbaEncoding individual) {
    4147      int breakPoint1, breakPoint2;
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaCustomerSwapManipulator.cs

    r4352 r4690  
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Data;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    3233    [StorableConstructor]
    3334    private AlbaCustomerSwapManipulator(bool deserializing) : base(deserializing) { }
    34 
     35    private AlbaCustomerSwapManipulator(AlbaCustomerSwapManipulator original, Cloner cloner) : base(original, cloner) { }
    3536    public AlbaCustomerSwapManipulator()
    3637      : base() {
     38    }
     39    public override IDeepCloneable Clone(Cloner cloner) {
     40      return new AlbaCustomerSwapManipulator(this, cloner);
    3741    }
    3842
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaIntraRouteInversionManipulator.cs

    r4352 r4690  
    2727using System;
    2828using System.Collections.Generic;
     29using HeuristicLab.Common;
    2930
    3031namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    3132  [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.")]
    3233  [StorableClass]
    33   public sealed class AlbaIntraRouteInversionManipulator : AlbaManipulator {   
     34  public sealed class AlbaIntraRouteInversionManipulator : AlbaManipulator {
    3435    [StorableConstructor]
    3536    private AlbaIntraRouteInversionManipulator(bool deserializing) : base(deserializing) { }
    36 
     37    private AlbaIntraRouteInversionManipulator(AlbaIntraRouteInversionManipulator original, Cloner cloner) : base(original, cloner) { }
    3738    public AlbaIntraRouteInversionManipulator()
    3839      : base() {
    39      }
     40    }
     41
     42    public override IDeepCloneable Clone(Cloner cloner) {
     43      return new AlbaIntraRouteInversionManipulator(this, cloner);
     44    }
    4045
    4146    public static void Apply(AlbaEncoding individual, int index1, int index2) {
     
    7277
    7378        int currentTourEnd = currentTourStart;
    74         while (currentTourEnd < individual.Length && 
     79        while (currentTourEnd < individual.Length &&
    7580          individual[currentTourEnd] < individual.Cities) {
    7681          currentTourEnd++;
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaLambdaInterchangeManipulator.cs

    r4352 r4690  
    2727using System;
    2828using System.Collections.Generic;
     29using HeuristicLab.Common;
    2930
    3031namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    3536      get { return (IValueParameter<IntValue>)Parameters["Lambda"]; }
    3637    }
    37    
     38
    3839    [StorableConstructor]
    3940    private AlbaLambdaInterchangeManipulator(bool deserializing) : base(deserializing) { }
    40 
     41    private AlbaLambdaInterchangeManipulator(AlbaLambdaInterchangeManipulator original, Cloner cloner) : base(original, cloner) { }
    4142    public AlbaLambdaInterchangeManipulator()
    4243      : base() {
    43         Parameters.Add(new ValueParameter<IntValue>("Lambda", "The lambda value.", new IntValue(1)));
    44      }
     44      Parameters.Add(new ValueParameter<IntValue>("Lambda", "The lambda value.", new IntValue(1)));
     45    }
    4546
    46     public static void Apply(AlbaEncoding individual, int tour1Index, int position1, int length1,
     47    public override IDeepCloneable Clone(Cloner cloner) {
     48      return new AlbaLambdaInterchangeManipulator(this, cloner);
     49    }
     50
     51    public static void Apply(AlbaEncoding individual, int tour1Index, int position1, int length1,
    4752      int tour2Index, int position2, int length2) {
    4853      List<Tour> tours = individual.GetTours();
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaManipulator.cs

    r4352 r4690  
    2626using HeuristicLab.Data;
    2727using HeuristicLab.Optimization;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    3738    [StorableConstructor]
    3839    protected AlbaManipulator(bool deserializing) : base(deserializing) { }
    39 
     40    protected AlbaManipulator(AlbaManipulator original, Cloner cloner) : base(original, cloner) { }
    4041    public AlbaManipulator()
    4142      : base() {
    42         Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
     43      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    4344
    44         AlbaEncoding.RemoveUnusedParameters(Parameters);
     45      AlbaEncoding.RemoveUnusedParameters(Parameters);
    4546    }
    4647
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaPermutationManipulator.cs

    r4416 r4690  
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Data;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    3637    [StorableConstructor]
    3738    private AlbaPermutationManipualtor(bool deserializing) : base(deserializing) { }
    38 
     39    private AlbaPermutationManipualtor(AlbaPermutationManipualtor original, Cloner cloner) : base(original, cloner) { }
    3940    public AlbaPermutationManipualtor()
    4041      : base() {
    41         Parameters.Add(new ValueLookupParameter<IPermutationManipulator>("InnerManipulator", "The permutation manipulator.", new TranslocationManipulator()));
     42      Parameters.Add(new ValueLookupParameter<IPermutationManipulator>("InnerManipulator", "The permutation manipulator.", new TranslocationManipulator()));
     43    }
     44
     45    public override IDeepCloneable Clone(Cloner cloner) {
     46      return new AlbaPermutationManipualtor(this, cloner);
    4247    }
    4348
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveMaker.cs

    r4352 r4690  
    2424using HeuristicLab.Parameters;
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HeuristicLab.Common;
    2627
    2728namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    6061      get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; }
    6162    }
    62    
     63
    6364    [StorableConstructor]
    6465    protected AlbaMoveMaker(bool deserializing) : base(deserializing) { }
    65 
     66    protected AlbaMoveMaker(AlbaMoveMaker original, Cloner cloner) : base(original, cloner) { }
    6667    public AlbaMoveMaker()
    6768      : base() {
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveOperator.cs

    r4352 r4690  
    2525using HeuristicLab.Data;
    2626using HeuristicLab.Parameters;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    2930  [Item("AlbaMoveOperator", "A move operator for an Alba VRP representation.")]
    3031  [StorableClass]
    31   public abstract class AlbaMoveOperator : VRPMoveOperator {   
     32  public abstract class AlbaMoveOperator : VRPMoveOperator {
    3233    [StorableConstructor]
    3334    protected AlbaMoveOperator(bool deserializing) : base(deserializing) { }
    34 
    35     public AlbaMoveOperator() : base()
    36     {
     35    protected AlbaMoveOperator(AlbaMoveOperator original, Cloner cloner) : base(original, cloner) { }
     36    public AlbaMoveOperator()
     37      : base() {
    3738      AlbaEncoding.RemoveUnusedParameters(Parameters);
    3839    }
     
    4142      IVRPEncoding solution = VRPToursParameter.ActualValue;
    4243      if (!(solution is AlbaEncoding)) {
    43         VRPToursParameter.ActualValue = AlbaEncoding.ConvertFrom(solution, VehiclesParameter.ActualValue.Value, 
     44        VRPToursParameter.ActualValue = AlbaEncoding.ConvertFrom(solution, VehiclesParameter.ActualValue.Value,
    4445          DistanceMatrixParameter);
    4546      }
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaPermutationMoveOperator.cs

    r4352 r4690  
    2525using HeuristicLab.Data;
    2626using HeuristicLab.Parameters;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    2930  [Item("AlbaPermutationMoveOperator", "A move operator for an Alba VRP representation using an inner permutation move operator.")]
    3031  [StorableClass]
    31   public abstract class AlbaPermutationMoveOperator : AlbaMoveOperator {   
     32  public abstract class AlbaPermutationMoveOperator : AlbaMoveOperator {
    3233    [Storable]
    3334    protected abstract IPermutationMoveOperator PermutationMoveOperatorParameter { get; set; }
     
    3536    [StorableConstructor]
    3637    protected AlbaPermutationMoveOperator(bool deserializing) : base(deserializing) { }
    37 
     38    protected AlbaPermutationMoveOperator(AlbaPermutationMoveOperator original, Cloner cloner) : base(original, cloner) { }
    3839    public AlbaPermutationMoveOperator()
    39       : base()
    40     {
     40      : base() {
    4141    }
    4242
    4343    public override IOperation Apply() {
    4444      IOperation next = base.Apply();
    45      
     45
    4646      IVRPEncoding solution = VRPToursParameter.ActualValue;
    4747
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/AlbaExhaustiveIntraRouteInversionMoveGenerator.cs

    r4352 r4690  
    2727using HeuristicLab.Parameters;
    2828using System.Collections.Generic;
     29using HeuristicLab.Common;
    2930
    3031namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    3435    [StorableConstructor]
    3536    private AlbaExhaustiveIntraRouteInversionGenerator(bool deserializing) : base(deserializing) { }
    36 
     37    private AlbaExhaustiveIntraRouteInversionGenerator(AlbaExhaustiveIntraRouteInversionGenerator original, Cloner cloner) : base(original, cloner) { }
    3738    public AlbaExhaustiveIntraRouteInversionGenerator()
    3839      : base() {
     40    }
     41
     42    public override IDeepCloneable Clone(Cloner cloner) {
     43      return new AlbaExhaustiveIntraRouteInversionGenerator(this, cloner);
    3944    }
    4045
     
    4449      int currentTourStart = 0;
    4550      int currentTourEnd = 0;
    46       while(currentTourEnd != individual.Length) {
     51      while (currentTourEnd != individual.Length) {
    4752        currentTourEnd = currentTourStart;
    48         while (individual[currentTourEnd] < individual.Cities && 
     53        while (individual[currentTourEnd] < individual.Cities &&
    4954          currentTourEnd < individual.Length) {
    5055          currentTourEnd++;
     
    5358        int tourLength = currentTourEnd - currentTourStart;
    5459        if (tourLength >= 4) {
    55           for (int i = 0; i <= tourLength - 4; i++ ) {
     60          for (int i = 0; i <= tourLength - 4; i++) {
    5661            for (int j = i + 2; j <= tourLength - 2; j++) {
    5762              AlbaIntraRouteInversionMove move = new AlbaIntraRouteInversionMove(
    58                 currentTourStart + i, 
    59                 currentTourStart + j, 
     63                currentTourStart + i,
     64                currentTourStart + j,
    6065                individual);
    6166
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionEvaluator.cs

    r4352 r4690  
    2626using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    2727using HeuristicLab.Data;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting {
     
    3738    [StorableConstructor]
    3839    private AlbaIntraRouteInversionMoveEvaluator(bool deserializing) : base(deserializing) { }
    39 
     40    private AlbaIntraRouteInversionMoveEvaluator(AlbaIntraRouteInversionMoveEvaluator original, Cloner cloner) : base(original, cloner) { }
    4041    public AlbaIntraRouteInversionMoveEvaluator()
    4142      : base() {
    42         Parameters.Add(new LookupParameter<AlbaIntraRouteInversionMove>("AlbaIntraRouteInversionMove", "The move to evaluate."));
     43      Parameters.Add(new LookupParameter<AlbaIntraRouteInversionMove>("AlbaIntraRouteInversionMove", "The move to evaluate."));
     44    }
     45
     46    public override IDeepCloneable Clone(Cloner cloner) {
     47      return new AlbaIntraRouteInversionMoveEvaluator(this, cloner);
    4348    }
    4449
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMove.cs

    r4352 r4690  
    3232  public class AlbaIntraRouteInversionMove : TwoIndexMove, IVRPMove {
    3333    public IVRPEncoding Individual { get { return Permutation as AlbaEncoding; } }
    34    
     34
     35    [StorableConstructor]
     36    protected AlbaIntraRouteInversionMove(bool deserializing) : base(deserializing) { }
     37    protected AlbaIntraRouteInversionMove(AlbaIntraRouteInversionMove original, Cloner cloner)
     38      : base(original, cloner) {
     39      Permutation = cloner.Clone(original.Permutation);
     40    }
    3541    public AlbaIntraRouteInversionMove()
    3642      : base() {
     
    4349    public AlbaIntraRouteInversionMove(int index1, int index2, AlbaEncoding permutation)
    4450      : base(index1, index2, permutation) {
    45         this.Permutation = permutation.Clone() as AlbaEncoding;
     51      this.Permutation = permutation.Clone() as AlbaEncoding;
    4652    }
    4753
    48     public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) {
    49       AlbaIntraRouteInversionMove clone = new AlbaIntraRouteInversionMove(
    50         Index1, Index2);
    51 
    52       if (Permutation != null)
    53         clone.Permutation = (AlbaEncoding)cloner.Clone(Permutation);
    54 
    55       cloner.RegisterClonedObject(this, clone);
    56       return clone;
     54    public override IDeepCloneable Clone(Cloner cloner) {
     55      return new AlbaIntraRouteInversionMove(this, cloner);
    5756    }
    5857
     
    6160    public TourEvaluation GetMoveQuality(
    6261      IntValue vehicles,
    63       DoubleArray dueTimeArray, DoubleArray serviceTimeArray, DoubleArray readyTimeArray, 
     62      DoubleArray dueTimeArray, DoubleArray serviceTimeArray, DoubleArray readyTimeArray,
    6463      DoubleArray demandArray, DoubleValue capacity, DoubleMatrix coordinates,
    6564      DoubleValue fleetUsageFactor, DoubleValue timeFactor, DoubleValue distanceFactor,
    6665      DoubleValue overloadPenalty, DoubleValue tardinessPenalty,
    6766      ILookupParameter<DoubleMatrix> distanceMatrix, Data.BoolValue useDistanceMatrix) {
    68         return AlbaIntraRouteInversionMoveEvaluator.GetMoveQuality(Permutation as AlbaEncoding, this, vehicles,
    69           dueTimeArray, serviceTimeArray, readyTimeArray, demandArray, capacity,
    70           coordinates, fleetUsageFactor, timeFactor, distanceFactor,
    71           overloadPenalty, tardinessPenalty, distanceMatrix, useDistanceMatrix);
     67      return AlbaIntraRouteInversionMoveEvaluator.GetMoveQuality(Permutation as AlbaEncoding, this, vehicles,
     68        dueTimeArray, serviceTimeArray, readyTimeArray, demandArray, capacity,
     69        coordinates, fleetUsageFactor, timeFactor, distanceFactor,
     70        overloadPenalty, tardinessPenalty, distanceMatrix, useDistanceMatrix);
    7271    }
    7372
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveGenerator.cs

    r4352 r4690  
    2727using HeuristicLab.Parameters;
    2828using System.Collections.Generic;
     29using HeuristicLab.Common;
    2930
    3031namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    4243    [StorableConstructor]
    4344    protected AlbaIntraRouteInversionMoveGenerator(bool deserializing) : base(deserializing) { }
    44 
     45    protected AlbaIntraRouteInversionMoveGenerator(AlbaIntraRouteInversionMoveGenerator original, Cloner cloner) : base(original, cloner) { }
    4546    public AlbaIntraRouteInversionMoveGenerator()
    4647      : base() {
    47         Parameters.Add(new LookupParameter<AlbaIntraRouteInversionMove>("AlbaIntraRouteInversionMove", "The moves that should be generated in subscopes."));
    48         Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
     48      Parameters.Add(new LookupParameter<AlbaIntraRouteInversionMove>("AlbaIntraRouteInversionMove", "The moves that should be generated in subscopes."));
     49      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
    4950    }
    5051
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveMaker.cs

    r4352 r4690  
    2626using HeuristicLab.Parameters;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    4647    [StorableConstructor]
    4748    private AlbaIntraRouteInversionMoveMaker(bool deserializing) : base(deserializing) { }
    48 
     49    private AlbaIntraRouteInversionMoveMaker(AlbaIntraRouteInversionMoveMaker original, Cloner cloner)
     50      : base(original, cloner) {
     51    }
    4952    public AlbaIntraRouteInversionMoveMaker()
    5053      : base() {
     
    5255      Parameters.Add(new LookupParameter<AlbaIntraRouteInversionMove>("AlbaIntraRouteInversionMove", "The move to make."));
    5356      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move."));
     57    }
     58
     59    public override IDeepCloneable Clone(Cloner cloner) {
     60      return new AlbaIntraRouteInversionMoveMaker(this, cloner);
    5461    }
    5562
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionMutliMoveGenerator.cs

    r4352 r4690  
    2828using System.Collections.Generic;
    2929using HeuristicLab.Data;
     30using HeuristicLab.Common;
    3031
    3132namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    4041      get { return (IValueLookupParameter<IntValue>)Parameters["SampleSize"]; }
    4142    }
    42    
     43
    4344    [StorableConstructor]
    4445    private AlbaStochasticIntraRouteInversionMultiMoveGenerator(bool deserializing) : base(deserializing) { }
    45 
     46    private AlbaStochasticIntraRouteInversionMultiMoveGenerator(AlbaStochasticIntraRouteInversionMultiMoveGenerator original, Cloner cloner) : base(original, cloner) { }
    4647    public AlbaStochasticIntraRouteInversionMultiMoveGenerator()
    4748      : base() {
    48         Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
    49         Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
     49      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     50      Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
     51    }
     52
     53    public override IDeepCloneable Clone(Cloner cloner) {
     54      return new AlbaStochasticIntraRouteInversionMultiMoveGenerator(this, cloner);
    5055    }
    5156
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionSingleMoveGenerator.cs

    r4352 r4690  
    2828using System.Collections.Generic;
    2929using HeuristicLab.Problems.VehicleRouting.Encodings.General;
     30using HeuristicLab.Common;
    3031
    3132namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    4142
    4243    #endregion
    43    
     44
    4445    public ILookupParameter<IRandom> RandomParameter {
    4546      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
    4647    }
    47    
     48
    4849    [StorableConstructor]
    4950    private AlbaStochasticIntraRouteInversionSingleMoveGenerator(bool deserializing) : base(deserializing) { }
    50 
     51    private AlbaStochasticIntraRouteInversionSingleMoveGenerator(AlbaStochasticIntraRouteInversionSingleMoveGenerator original, Cloner cloner) : base(original, cloner) { }
    5152    public AlbaStochasticIntraRouteInversionSingleMoveGenerator()
    5253      : base() {
    53         Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     54      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     55    }
     56
     57    public override IDeepCloneable Clone(Cloner cloner) {
     58      return new AlbaStochasticIntraRouteInversionSingleMoveGenerator(this, cloner);
    5459    }
    5560
     
    7580
    7681        int currentTourEnd = currentTourStart;
    77         while (currentTourEnd < individual.Length && 
     82        while (currentTourEnd < individual.Length &&
    7883          individual[currentTourEnd] < individual.Cities) {
    7984          currentTourEnd++;
     
    9398
    9499      AlbaIntraRouteInversionMove move = Apply(individual, Cities, RandomParameter.ActualValue);
    95       if(move != null)
     100      if (move != null)
    96101        moves.Add(move);
    97102
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaExhaustiveLambdaInterchangeMoveGenerator.cs

    r4352 r4690  
    2727using HeuristicLab.Parameters;
    2828using System.Collections.Generic;
     29using HeuristicLab.Common;
    2930
    3031namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    3435    [StorableConstructor]
    3536    private AlbaExhaustiveLambdaInterchangeMoveGenerator(bool deserializing) : base(deserializing) { }
    36 
    37     public AlbaExhaustiveLambdaInterchangeMoveGenerator()
    38       : base() {
     37    private AlbaExhaustiveLambdaInterchangeMoveGenerator(AlbaExhaustiveLambdaInterchangeMoveGenerator original, Cloner cloner) : base(original, cloner) { }
     38    public AlbaExhaustiveLambdaInterchangeMoveGenerator() : base() { }
     39    public override IDeepCloneable Clone(Cloner cloner) {
     40      return new AlbaExhaustiveLambdaInterchangeMoveGenerator(this, cloner);
    3941    }
    4042
     
    5052
    5153          for (int length1 = 0; length1 <= Math.Min(lambda, tour1.Cities.Count); length1++) {
    52             for(int length2 = 0; length2 <= Math.Min(lambda, tour2.Cities.Count); length2++) {
    53               if(length1 != 0 || length2 != 0) {
    54                 for(int index1 = 0; index1 < tour1.Cities.Count - length1 + 1; index1++) {
    55                   for(int index2 = 0; index2 < tour2.Cities.Count - length2 + 1; index2++) {
    56                     moves.Add(new AlbaLambdaInterchangeMove(tour1Index, index1, length1, 
     54            for (int length2 = 0; length2 <= Math.Min(lambda, tour2.Cities.Count); length2++) {
     55              if (length1 != 0 || length2 != 0) {
     56                for (int index1 = 0; index1 < tour1.Cities.Count - length1 + 1; index1++) {
     57                  for (int index2 = 0; index2 < tour2.Cities.Count - length2 + 1; index2++) {
     58                    moves.Add(new AlbaLambdaInterchangeMove(tour1Index, index1, length1,
    5759                      tour2Index, index2, length2, individual));
    5860                  }
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMove.cs

    r4352 r4690  
    5252    [Storable]
    5353    public int Length2 { get; protected set; }
    54    
     54
     55    [StorableConstructor]
     56    protected AlbaLambdaInterchangeMove(bool deserializing) : base(deserializing) { }
     57    protected AlbaLambdaInterchangeMove(AlbaLambdaInterchangeMove original, Cloner cloner)      : base(original, cloner) {
     58      Tour1 = original.Tour1;
     59      Position1 = original.Position1;
     60      Length1 = original.Length1;
     61
     62      Tour2 = original.Tour2;
     63      Position2 = original.Position2;
     64      Length2 = original.Length2;
     65
     66      Individual = cloner.Clone(original.Individual);
     67    }
     68
    5569    public AlbaLambdaInterchangeMove(): base() {
    5670      Tour1 = -1;
     
    7690
    7791        this.Individual = permutation.Clone() as AlbaEncoding;
    78     }
    79 
    80     public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) {
    81       AlbaLambdaInterchangeMove clone = new AlbaLambdaInterchangeMove();
    82 
    83       clone.Tour1 = Tour1;
    84       clone.Position1 = Position1;
    85       clone.Length1 = Length1;
    86 
    87       clone.Tour2 = Tour2;
    88       clone.Position2 = Position2;
    89       clone.Length2 = Length2;
    90 
    91       if (Individual != null)
    92         clone.Individual = (AlbaEncoding)cloner.Clone(Individual);
    93 
    94       cloner.RegisterClonedObject(this, clone);
    95       return clone;
    9692    }
    9793
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveEvaluator.cs

    r4352 r4690  
    2626using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    2727using HeuristicLab.Data;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting {
     
    3738    [StorableConstructor]
    3839    private AlbaLambdaInterchangeMoveEvaluator(bool deserializing) : base(deserializing) { }
    39 
     40    private AlbaLambdaInterchangeMoveEvaluator(AlbaLambdaInterchangeMoveEvaluator original, Cloner cloner)
     41      : base(original, cloner) {
     42    }
    4043    public AlbaLambdaInterchangeMoveEvaluator()
    4144      : base() {
     
    4346    }
    4447
     48    public override IDeepCloneable Clone(Cloner cloner) {
     49      return new AlbaLambdaInterchangeMoveEvaluator(this, cloner);
     50    }
    4551    public static TourEvaluation GetMoveQuality(AlbaEncoding individual, AlbaLambdaInterchangeMove move,
    4652      IntValue vehicles,
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveGenerator.cs

    r4352 r4690  
    2828using System.Collections.Generic;
    2929using HeuristicLab.Data;
     30using HeuristicLab.Common;
    3031
    3132namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5152    [StorableConstructor]
    5253    protected AlbaLambdaInterchangeMoveGenerator(bool deserializing) : base(deserializing) { }
    53 
     54    protected AlbaLambdaInterchangeMoveGenerator(AlbaLambdaInterchangeMoveGenerator original, Cloner cloner)
     55      : base(original, cloner) {
     56    }
    5457    public AlbaLambdaInterchangeMoveGenerator()
    5558      : base() {
    56         Parameters.Add(new LookupParameter<AlbaLambdaInterchangeMove>("AlbaLambdaInterchangeMove", "The moves that should be generated in subscopes."));
    57         Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
    58         Parameters.Add(new ValueParameter<IntValue>("Lambda", "The lambda value.", new IntValue(1)));
     59      Parameters.Add(new LookupParameter<AlbaLambdaInterchangeMove>("AlbaLambdaInterchangeMove", "The moves that should be generated in subscopes."));
     60      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes."));
     61      Parameters.Add(new ValueParameter<IntValue>("Lambda", "The lambda value.", new IntValue(1)));
    5962    }
    6063
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveMaker.cs

    r4352 r4690  
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828using System.Collections.Generic;
     29using HeuristicLab.Common;
    2930
    3031namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    4748    [StorableConstructor]
    4849    private AlbaLambdaInterchangeMoveMaker(bool deserializing) : base(deserializing) { }
    49 
     50    protected AlbaLambdaInterchangeMoveMaker(AlbaLambdaInterchangeMoveMaker original, Cloner cloner)
     51      : base(original, cloner) {
     52    }
    5053    public AlbaLambdaInterchangeMoveMaker()
    5154      : base() {
     
    5356      Parameters.Add(new LookupParameter<AlbaLambdaInterchangeMove>("AlbaLambdaInterchangeMove", "The move to make."));
    5457      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move."));
     58    }
     59
     60    public override IDeepCloneable Clone(Cloner cloner) {
     61      return new AlbaLambdaInterchangeMoveMaker(this, cloner);
    5562    }
    5663
     
    6471    public override IOperation Apply() {
    6572      IOperation next = base.Apply();
    66      
     73
    6774      AlbaLambdaInterchangeMove move = LambdaInterchangeMoveParameter.ActualValue;
    6875      DoubleValue moveQuality = MoveQualityParameter.ActualValue;
    6976      DoubleValue quality = QualityParameter.ActualValue;
    70      
     77
    7178      //perform move
    7279      VRPToursParameter.ActualValue = move.MakeMove();
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeMutliMoveGenerator.cs

    r4352 r4690  
    2828using System.Collections.Generic;
    2929using HeuristicLab.Data;
     30using HeuristicLab.Common;
    3031
    3132namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    4041      get { return (IValueLookupParameter<IntValue>)Parameters["SampleSize"]; }
    4142    }
    42    
     43
    4344    [StorableConstructor]
    4445    private AlbaStochasticLambdaInterchangeMultiMoveGenerator(bool deserializing) : base(deserializing) { }
    45 
     46    private AlbaStochasticLambdaInterchangeMultiMoveGenerator(AlbaStochasticLambdaInterchangeMultiMoveGenerator original, Cloner cloner) : base(original, cloner) { }
    4647    public AlbaStochasticLambdaInterchangeMultiMoveGenerator()
    4748      : base() {
    48         Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
    49         Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
     49      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     50      Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
    5051    }
    51 
     52    public override IDeepCloneable Clone(Cloner cloner) {
     53      return new AlbaStochasticLambdaInterchangeMultiMoveGenerator(this, cloner);
     54    }
    5255    protected override AlbaLambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda) {
    5356      int sampleSize = SampleSizeParameter.ActualValue.Value;
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeSingleMoveGenerator.cs

    r4352 r4690  
    2828using System.Collections.Generic;
    2929using HeuristicLab.Problems.VehicleRouting.Encodings.General;
     30using HeuristicLab.Common;
    3031
    3132namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    4142
    4243    #endregion
    43    
     44
    4445    public ILookupParameter<IRandom> RandomParameter {
    4546      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
    4647    }
    47    
     48
    4849    [StorableConstructor]
    4950    private AlbaStochasticLambdaInterchangeSingleMoveGenerator(bool deserializing) : base(deserializing) { }
    50 
     51    private AlbaStochasticLambdaInterchangeSingleMoveGenerator(AlbaStochasticLambdaInterchangeSingleMoveGenerator original, Cloner cloner)
     52      : base(original, cloner) {
     53    }
    5154    public AlbaStochasticLambdaInterchangeSingleMoveGenerator()
    5255      : base() {
    53         Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     56      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     57    }
     58
     59    public override IDeepCloneable Clone(Cloner cloner) {
     60      return new AlbaStochasticLambdaInterchangeSingleMoveGenerator(this, cloner);
    5461    }
    5562
     
    8188
    8289      AlbaLambdaInterchangeMove move = Apply(individual, Cities, lambda, RandomParameter.ActualValue);
    83       if(move != null)
     90      if (move != null)
    8491        moves.Add(move);
    8592
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveEvaluator.cs

    r4352 r4690  
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting {
     
    3738    [StorableConstructor]
    3839    private AlbaTranslocationMoveEvaluator(bool deserializing) : base(deserializing) { }
    39 
     40    private AlbaTranslocationMoveEvaluator(AlbaTranslocationMoveEvaluator original, Cloner cloner)      : base(original, cloner) {    }
    4041    public AlbaTranslocationMoveEvaluator()
    4142      : base() {
    4243      Parameters.Add(new LookupParameter<TranslocationMove>("TranslocationMove", "The move to evaluate."));
     44    }
     45
     46    public override IDeepCloneable Clone(Cloner cloner) {
     47      return new AlbaTranslocationMoveEvaluator(this, cloner);
    4348    }
    4449
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs

    r4352 r4690  
    2727using HeuristicLab.Parameters;
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using HeuristicLab.Common;
    2930
    3031namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    7071    [StorableConstructor]
    7172    private AlbaTranslocationMoveGenerator(bool deserializing) : base(deserializing) { }
    72 
     73    private AlbaTranslocationMoveGenerator(AlbaTranslocationMoveGenerator original, Cloner cloner) : base(original, cloner) { }
    7374    public AlbaTranslocationMoveGenerator()
    7475      : base() {
     
    7879
    7980      ((IMultiMoveGenerator)TranslocationMoveGeneratorParameter.Value).SampleSizeParameter.ActualName = SampleSizeParameter.Name;
     81    }
     82
     83    public override IDeepCloneable Clone(Cloner cloner) {
     84      return new AlbaTranslocationMoveGenerator(this, cloner);
    8085    }
    8186
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveHardTabuCriterion.cs

    r4352 r4690  
    2525using HeuristicLab.Optimization;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5859    [StorableConstructor]
    5960    private AlbaTranslocationMoveHardTabuCriterion(bool deserializing) : base(deserializing) { }
    60 
     61    private AlbaTranslocationMoveHardTabuCriterion(AlbaTranslocationMoveHardTabuCriterion original, Cloner cloner)
     62      : base(original, cloner) {
     63    }
    6164    public AlbaTranslocationMoveHardTabuCriterion()
    6265      : base() {
    6366      tabuChecker = new TranslocationMoveHardTabuCriterion();
    6467    }
     68    public override IDeepCloneable Clone(Cloner cloner) {
     69      return new AlbaTranslocationMoveHardTabuCriterion(this, cloner);
     70    }
    6571  }
    6672}
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveMaker.cs

    r4352 r4690  
    2525using HeuristicLab.Optimization;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5051    [StorableConstructor]
    5152    private AlbaTranslocationMoveMaker(bool deserializing) : base(deserializing) { }
    52 
     53    private AlbaTranslocationMoveMaker(AlbaTranslocationMoveMaker original, Cloner cloner)
     54      : base(original, cloner) {
     55    }
    5356    public AlbaTranslocationMoveMaker()
    5457      : base() {
    5558      moveMaker = new TranslocationMoveMaker();
    5659    }
    57 
     60    public override IDeepCloneable Clone(Cloner cloner) {
     61      return new AlbaTranslocationMoveMaker(this, cloner);
     62    }
    5863    public override IOperation Apply() {
    5964      IOperation next = base.Apply();
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveSoftTabuCriterion.cs

    r4352 r4690  
    2525using HeuristicLab.Optimization;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5859    [StorableConstructor]
    5960    private AlbaTranslocationMoveSoftTabuCriterion(bool deserializing) : base(deserializing) { }
    60 
     61    private AlbaTranslocationMoveSoftTabuCriterion(AlbaTranslocationMoveSoftTabuCriterion original, Cloner cloner)
     62      : base(original, cloner) {
     63    }
    6164    public AlbaTranslocationMoveSoftTabuCriterion()
    6265      : base() {
    6366      tabuChecker = new TranslocationMoveSoftTabuCriterion();
    6467    }
     68    public override IDeepCloneable Clone(Cloner cloner) {
     69      return new AlbaTranslocationMoveSoftTabuCriterion(this, cloner);
     70    }
    6571  }
    6672}
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveTabuMaker.cs

    r4352 r4690  
    2525using HeuristicLab.Optimization;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5859    [StorableConstructor]
    5960    private AlbaTranslocationMoveTabuMaker(bool deserializing) : base(deserializing) { }
    60 
     61    private AlbaTranslocationMoveTabuMaker(AlbaTranslocationMoveTabuMaker original, Cloner cloner)
     62      : base(original, cloner) {
     63    }
    6164    public AlbaTranslocationMoveTabuMaker()
    6265      : base() {
    6366      moveTabuMaker = new TranslocationMoveTabuMaker();
    6467    }
     68    public override IDeepCloneable Clone(Cloner cloner) {
     69      return new AlbaTranslocationMoveTabuMaker(this, cloner);
     70    }
    6571  }
    6672}
Note: See TracChangeset for help on using the changeset viewer.