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/Prins
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Prins/Crossovers/PrinsCrossover.cs

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

    r4379 r4752  
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Data;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Prins {
     
    4041      : base() {
    4142      Parameters.Add(new ValueLookupParameter<IPermutationCrossover>("InnerCrossover", "The permutation crossover.", new OrderCrossover()));
     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/Prins/Manipulators/PrinsExhaustiveLSManipulator.cs

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

    r4379 r4752  
    2626using HeuristicLab.Data;
    2727using System.Collections.Generic;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting.Encodings.Prins {
     
    4142      : base() {
    4243      Parameters.Add(new ValueParameter<IntValue>("Iterations", "The number of max iterations.", new IntValue(5)));
     44    }
     45
     46    protected PrinsLSManipulator(PrinsLSManipulator original, Cloner cloner)
     47      : base(original, cloner) {
    4348    }
    4449
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Prins/Manipulators/PrinsManipulator.cs

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

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

    r4379 r4752  
    2626using HeuristicLab.Data;
    2727using System.Collections.Generic;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting.Encodings.Prins {
     
    4142      : base() {
    4243        Parameters.Add(new ValueParameter<IntValue>("SampleSize", "The sample size.", new IntValue(200)));
     44    }
     45
     46    public override IDeepCloneable Clone(Cloner cloner) {
     47      return new PrinsStochasticLSManipulator(this, cloner);
     48    }
     49
     50    private PrinsStochasticLSManipulator(PrinsStochasticLSManipulator original, Cloner cloner)
     51      : base(original, cloner) {
    4352    }
    4453
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Prins/PrinsEncoding.cs

    r4379 r4752  
    132132    }
    133133    #endregion
    134 
    135     public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) {
    136       PrinsEncoding clone = new PrinsEncoding(
    137         new Permutation(this.PermutationType, this.array), ProblemInstance);
    138 
    139       cloner.RegisterClonedObject(this, clone);
    140       clone.readOnly = readOnly;
    141       return clone;
    142     }
    143 
    144134    public PrinsEncoding(Permutation permutation, IVRPProblemInstance problemInstance)
    145135      : base(permutation, problemInstance) {
     
    149139    private PrinsEncoding(bool serializing)
    150140      : base(serializing) {
     141    }
     142
     143    public override IDeepCloneable Clone(Cloner cloner) {
     144      return new PrinsEncoding(this, cloner);
     145    }
     146
     147    protected PrinsEncoding(PrinsEncoding original, Cloner cloner)
     148      : base(original, cloner) {
    151149    }
    152150
Note: See TracChangeset for help on using the changeset viewer.