Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/09/10 09:55:31 (14 years ago)
Author:
svonolfe
Message:

Merged relevant changes from the trunk into the branch (cloning,...) (#1177)

Location:
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaExhaustiveIntraRouteInversionMoveGenerator.cs

    r4370 r4752  
    2828using System.Collections.Generic;
    2929using HeuristicLab.Problems.VehicleRouting.Interfaces;
     30using HeuristicLab.Common;
    3031
    3132namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    3839    public AlbaExhaustiveIntraRouteInversionGenerator()
    3940      : base() {
     41    }
     42
     43    public override IDeepCloneable Clone(Cloner cloner) {
     44      return new AlbaExhaustiveIntraRouteInversionGenerator(this, cloner);
     45    }
     46
     47    private AlbaExhaustiveIntraRouteInversionGenerator(AlbaExhaustiveIntraRouteInversionGenerator original, Cloner cloner)
     48      : base(original, cloner) {
    4049    }
    4150
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionEvaluator.cs

    r4383 r4752  
    2626using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
    2727using HeuristicLab.Data;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting {
     
    4748    }
    4849
     50    public override IDeepCloneable Clone(Cloner cloner) {
     51      return new AlbaIntraRouteInversionMoveEvaluator(this, cloner);
     52    }
     53
     54    private AlbaIntraRouteInversionMoveEvaluator(AlbaIntraRouteInversionMoveEvaluator original, Cloner cloner)
     55      : base(original, cloner) {
     56    }
     57
    4958    protected override void EvaluateMove() {
    5059      AlbaEncoding newSolution = IntraRouteInversionMoveParameter.ActualValue.Permutation.Clone() as AlbaEncoding;
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMove.cs

    r4383 r4752  
    4646     }
    4747
    48     public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) {
    49       AlbaIntraRouteInversionMove clone = new AlbaIntraRouteInversionMove(
    50         Index1, Index2);
     48    public override IDeepCloneable Clone(Cloner cloner) {
     49      return new AlbaIntraRouteInversionMove(this, cloner);
     50    }
    5151
    52       if (Permutation != null)
    53         clone.Permutation = Permutation.Clone() as AlbaEncoding;
    54 
    55       cloner.RegisterClonedObject(this, clone);
    56       return clone;
     52    protected AlbaIntraRouteInversionMove(AlbaIntraRouteInversionMove original, Cloner cloner)
     53      : base(original, cloner) {
     54        if (Permutation != null)
     55          this.Permutation = cloner.Clone(original.Permutation);
    5756    }
    5857
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveGenerator.cs

    r4370 r4752  
    2828using System.Collections.Generic;
    2929using HeuristicLab.Problems.VehicleRouting.Interfaces;
     30using HeuristicLab.Common;
    3031
    3132namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5455    }
    5556
     57    protected AlbaIntraRouteInversionMoveGenerator(AlbaIntraRouteInversionMoveGenerator original, Cloner cloner)
     58      : base(original, cloner) {
     59    }
     60
    5661    protected abstract AlbaIntraRouteInversionMove[] GenerateMoves(AlbaEncoding individual, IVRPProblemInstance problemInstance);
    5762
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveMaker.cs

    r4383 r4752  
    2626using HeuristicLab.Parameters;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    4748    }
    4849
     50    public override IDeepCloneable Clone(Cloner cloner) {
     51      return new AlbaIntraRouteInversionMoveMaker(this, cloner);
     52    }
     53
     54    protected AlbaIntraRouteInversionMoveMaker(AlbaIntraRouteInversionMoveMaker original, Cloner cloner)
     55      : base(original, cloner) {
     56    }
     57
    4958    public static void Apply(AlbaEncoding solution, AlbaIntraRouteInversionMove move) {
    5059      AlbaIntraRouteInversionManipulator.Apply(solution, move.Index1, move.Index2);
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionMutliMoveGenerator.cs

    r4370 r4752  
    2929using HeuristicLab.Data;
    3030using HeuristicLab.Problems.VehicleRouting.Interfaces;
     31using HeuristicLab.Common;
    3132
    3233namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5152    }
    5253
     54    public override IDeepCloneable Clone(Cloner cloner) {
     55      return new AlbaStochasticIntraRouteInversionMultiMoveGenerator(this, cloner);
     56    }
     57
     58    private AlbaStochasticIntraRouteInversionMultiMoveGenerator(AlbaStochasticIntraRouteInversionMultiMoveGenerator original, Cloner cloner)
     59      : base(original, cloner) {
     60    }
     61
    5362    protected override AlbaIntraRouteInversionMove[] GenerateMoves(AlbaEncoding individual, IVRPProblemInstance problemInstance) {
    5463      int sampleSize = SampleSizeParameter.ActualValue.Value;
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionSingleMoveGenerator.cs

    r4370 r4752  
    2929using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    3030using HeuristicLab.Problems.VehicleRouting.Interfaces;
     31using HeuristicLab.Common;
    3132
    3233namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5354      : base() {
    5455        Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
     56    }
     57
     58    public override IDeepCloneable Clone(Cloner cloner) {
     59      return new AlbaStochasticIntraRouteInversionSingleMoveGenerator(this, cloner);
     60    }
     61
     62    private AlbaStochasticIntraRouteInversionSingleMoveGenerator(AlbaStochasticIntraRouteInversionSingleMoveGenerator original, Cloner cloner)
     63      : base(original, cloner) {
    5564    }
    5665
Note: See TracChangeset for help on using the changeset viewer.