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:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Problems.VehicleRouting

  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeSingleMoveGenerator.cs

    r4352 r4722  
    2121
    2222using System;
     23using System.Collections.Generic;
     24using HeuristicLab.Common;
    2325using HeuristicLab.Core;
    2426using HeuristicLab.Optimization;
     27using HeuristicLab.Parameters;
    2528using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    27 using HeuristicLab.Parameters;
    28 using System.Collections.Generic;
    2929using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    3030
     
    4141
    4242    #endregion
    43    
     43
    4444    public ILookupParameter<IRandom> RandomParameter {
    4545      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
    4646    }
    47    
     47
    4848    [StorableConstructor]
    4949    private AlbaStochasticLambdaInterchangeSingleMoveGenerator(bool deserializing) : base(deserializing) { }
    50 
     50    private AlbaStochasticLambdaInterchangeSingleMoveGenerator(AlbaStochasticLambdaInterchangeSingleMoveGenerator original, Cloner cloner)
     51      : base(original, cloner) {
     52    }
    5153    public AlbaStochasticLambdaInterchangeSingleMoveGenerator()
    5254      : base() {
    53         Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     55      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     56    }
     57
     58    public override IDeepCloneable Clone(Cloner cloner) {
     59      return new AlbaStochasticLambdaInterchangeSingleMoveGenerator(this, cloner);
    5460    }
    5561
     
    8187
    8288      AlbaLambdaInterchangeMove move = Apply(individual, Cities, lambda, RandomParameter.ActualValue);
    83       if(move != null)
     89      if (move != null)
    8490        moves.Add(move);
    8591
Note: See TracChangeset for help on using the changeset viewer.