Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/10 01:56:04 (14 years ago)
Author:
swagner
Message:

Merged cloning refactoring branch back into trunk (#922)

Location:
trunk/sources
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Problems.VehicleRouting

  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaCrossover.cs

    r4352 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
     24using HeuristicLab.Optimization;
    2425using HeuristicLab.Parameters;
    2526using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Data;
    27 using HeuristicLab.Optimization;
    2827
    2928namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    3433      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    3534    }
    36    
     35
    3736    [StorableConstructor]
    3837    protected AlbaCrossover(bool deserializing) : base(deserializing) { }
    39 
     38    protected AlbaCrossover(AlbaCrossover original, Cloner cloner) : base(original, cloner) { }
    4039    public AlbaCrossover()
    4140      : base() {
    4241      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    43    
     42
    4443      AlbaEncoding.RemoveUnusedParameters(Parameters);
    4544    }
     
    6160      ParentsParameter.ActualValue = parents;
    6261
    63       ChildParameter.ActualValue = 
     62      ChildParameter.ActualValue =
    6463        Crossover(RandomParameter.ActualValue, parents[0] as AlbaEncoding, parents[1] as AlbaEncoding);
    6564
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaPermutationCrossover.cs

    r4352 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.PermutationEncoding;
    2425using HeuristicLab.Parameters;
    2526using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Data;
    2727
    2828namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    2929  [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.")]
    3030  [StorableClass]
    31   public sealed class AlbaPermutationCrossover : AlbaCrossover {   
     31  public sealed class AlbaPermutationCrossover : AlbaCrossover {
    3232    public IValueLookupParameter<IPermutationCrossover> InnerCrossoverParameter {
    3333      get { return (IValueLookupParameter<IPermutationCrossover>)Parameters["InnerCrossover"]; }
     
    3636    [StorableConstructor]
    3737    private AlbaPermutationCrossover(bool deserializing) : base(deserializing) { }
    38 
     38    private AlbaPermutationCrossover(AlbaPermutationCrossover original, Cloner cloner)
     39      : base(original, cloner) {
     40    }
     41    public override IDeepCloneable Clone(Cloner cloner) {
     42      return new AlbaPermutationCrossover(this, cloner);
     43    }
    3944    public AlbaPermutationCrossover()
    4045      : base() {
Note: See TracChangeset for help on using the changeset viewer.