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/Zhu
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuCrossover.cs

    r4379 r4752  
    2828using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2929using HeuristicLab.Problems.VehicleRouting.Interfaces;
     30using HeuristicLab.Common;
    3031
    3132namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu {
     
    4344      : base() {
    4445      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
     46    }
     47
     48    protected ZhuCrossover(ZhuCrossover original, Cloner cloner)
     49      : base(original, cloner) {
    4550    }
    4651
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuHeuristicCrossover1.cs

    r4379 r4752  
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Data;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu {
     
    3536    public ZhuHeuristicCrossover1()
    3637      : base() {
     38    }
     39
     40    public override IDeepCloneable Clone(Cloner cloner) {
     41      return new ZhuHeuristicCrossover1(this, cloner);
     42    }
     43
     44    private ZhuHeuristicCrossover1(ZhuHeuristicCrossover1 original, Cloner cloner)
     45      : base(original, cloner) {
    3746    }
    3847
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuHeuristicCrossover2.cs

    r4379 r4752  
    2626using HeuristicLab.Data;
    2727using System.Collections.Generic;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu {
     
    3637    public ZhuHeuristicCrossover2()
    3738      : base() {
     39    }
     40
     41    public override IDeepCloneable Clone(Cloner cloner) {
     42      return new ZhuHeuristicCrossover2(this, cloner);
     43    }
     44
     45    private ZhuHeuristicCrossover2(ZhuHeuristicCrossover2 original, Cloner cloner)
     46      : base(original, cloner) {
    3847    }
    3948
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuMergeCrossover1.cs

    r4379 r4752  
    2626using HeuristicLab.Data;
    2727using HeuristicLab.Problems.VehicleRouting.Variants;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu {
     
    3637    public ZhuMergeCrossover1()
    3738      : base() {
     39    }
     40
     41    public override IDeepCloneable Clone(Cloner cloner) {
     42      return new ZhuMergeCrossover1(this, cloner);
     43    }
     44
     45    private ZhuMergeCrossover1(ZhuMergeCrossover1 original, Cloner cloner)
     46      : base(original, cloner) {
    3847    }
    3948
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuMergeCrossover2.cs

    r4379 r4752  
    2727using System.Collections.Generic;
    2828using HeuristicLab.Problems.VehicleRouting.Variants;
     29using HeuristicLab.Common;
    2930
    3031namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu {
     
    3738    public ZhuMergeCrossover2()
    3839      : base() {
     40    }
     41
     42    public override IDeepCloneable Clone(Cloner cloner) {
     43      return new ZhuMergeCrossover2(this, cloner);
     44    }
     45
     46    private ZhuMergeCrossover2(ZhuMergeCrossover2 original, Cloner cloner)
     47      : base(original, cloner) {
    3948    }
    4049
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuPermutationCrossover.cs

    r4379 r4752  
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Data;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu {
     
    4041      : base() {
    4142      Parameters.Add(new ValueLookupParameter<IPermutationCrossover>("InnerCrossover", "The permutation crossover.", new PartiallyMatchedCrossover()));
     43    }
     44
     45    public override IDeepCloneable Clone(Cloner cloner) {
     46      return new PrinsPermutationCrossover(this, cloner);
     47    }
     48
     49    private PrinsPermutationCrossover(PrinsPermutationCrossover original, Cloner cloner)
     50      : base(original, cloner) {
    4251    }
    4352
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Manipulators/ZhuManipulator.cs

    r4379 r4752  
    2828using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2929using HeuristicLab.Problems.VehicleRouting.Interfaces;
     30using HeuristicLab.Common;
    3031
    3132namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu {
     
    4546    }
    4647
     48    protected ZhuManipulator(ZhuManipulator original, Cloner cloner)
     49      : base(original, cloner) {
     50    }
     51
    4752    protected abstract void Manipulate(IRandom random, ZhuEncoding individual);
    4853
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Manipulators/ZhuPermutationManipulator.cs

    r4379 r4752  
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Data;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu {
     
    4243    }
    4344
     45    public override IDeepCloneable Clone(Cloner cloner) {
     46      return new ZhuPermutationManipulator(this, cloner);
     47    }
     48
     49    private ZhuPermutationManipulator(ZhuPermutationManipulator original, Cloner cloner)
     50      : base(original, cloner) {
     51    }
     52
    4453    protected override void Manipulate(IRandom random, ZhuEncoding individual) {
    4554      InnerManipulatorParameter.ActualValue.PermutationParameter.ActualName = VRPToursParameter.ActualName;
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/ZhuEncoding.cs

    r4379 r4752  
    9393    #endregion
    9494
    95     public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) {
    96       ZhuEncoding clone = new ZhuEncoding(
    97         new Permutation(this.PermutationType, this.array), ProblemInstance);
    98 
    99       cloner.RegisterClonedObject(this, clone);
    100       clone.readOnly = readOnly;
    101       return clone;
     95    public ZhuEncoding(Permutation permutation, IVRPProblemInstance problemInstance)
     96      : base(permutation, problemInstance) {
    10297    }
    10398
    104     public ZhuEncoding(Permutation permutation, IVRPProblemInstance problemInstance)
    105       : base(permutation, problemInstance) {
     99    public override IDeepCloneable Clone(Cloner cloner) {
     100      return new ZhuEncoding(this, cloner);
     101    }
     102
     103    protected ZhuEncoding(ZhuEncoding original, Cloner cloner)
     104      : base(original, cloner) {
    106105    }
    107106
Note: See TracChangeset for help on using the changeset viewer.