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/AlbaLambdaInterchangeMoveMaker.cs

    r4352 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Data;
    24 using HeuristicLab.Operators;
    2525using HeuristicLab.Optimization;
    2626using HeuristicLab.Parameters;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using System.Collections.Generic;
    2928
    3029namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    4645
    4746    [StorableConstructor]
    48     private AlbaLambdaInterchangeMoveMaker(bool deserializing) : base(deserializing) { }
    49 
     47    protected AlbaLambdaInterchangeMoveMaker(bool deserializing) : base(deserializing) { }
     48    protected AlbaLambdaInterchangeMoveMaker(AlbaLambdaInterchangeMoveMaker original, Cloner cloner)
     49      : base(original, cloner) {
     50    }
    5051    public AlbaLambdaInterchangeMoveMaker()
    5152      : base() {
     
    5354      Parameters.Add(new LookupParameter<AlbaLambdaInterchangeMove>("AlbaLambdaInterchangeMove", "The move to make."));
    5455      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move."));
     56    }
     57
     58    public override IDeepCloneable Clone(Cloner cloner) {
     59      return new AlbaLambdaInterchangeMoveMaker(this, cloner);
    5560    }
    5661
     
    6469    public override IOperation Apply() {
    6570      IOperation next = base.Apply();
    66      
     71
    6772      AlbaLambdaInterchangeMove move = LambdaInterchangeMoveParameter.ActualValue;
    6873      DoubleValue moveQuality = MoveQualityParameter.ActualValue;
    6974      DoubleValue quality = QualityParameter.ActualValue;
    70      
     75
    7176      //perform move
    7277      VRPToursParameter.ActualValue = move.MakeMove();
Note: See TracChangeset for help on using the changeset viewer.