- Timestamp:
- 11/09/10 09:55:31 (14 years ago)
- 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 28 28 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 29 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Common; 30 31 31 32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu { … … 43 44 : base() { 44 45 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) { 45 50 } 46 51 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuHeuristicCrossover1.cs
r4379 r4752 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 using HeuristicLab.Data; 27 using HeuristicLab.Common; 27 28 28 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu { … … 35 36 public ZhuHeuristicCrossover1() 36 37 : 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) { 37 46 } 38 47 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuHeuristicCrossover2.cs
r4379 r4752 26 26 using HeuristicLab.Data; 27 27 using System.Collections.Generic; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu { … … 36 37 public ZhuHeuristicCrossover2() 37 38 : 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) { 38 47 } 39 48 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuMergeCrossover1.cs
r4379 r4752 26 26 using HeuristicLab.Data; 27 27 using HeuristicLab.Problems.VehicleRouting.Variants; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu { … … 36 37 public ZhuMergeCrossover1() 37 38 : 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) { 38 47 } 39 48 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuMergeCrossover2.cs
r4379 r4752 27 27 using System.Collections.Generic; 28 28 using HeuristicLab.Problems.VehicleRouting.Variants; 29 using HeuristicLab.Common; 29 30 30 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu { … … 37 38 public ZhuMergeCrossover2() 38 39 : 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) { 39 48 } 40 49 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuPermutationCrossover.cs
r4379 r4752 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 using HeuristicLab.Data; 27 using HeuristicLab.Common; 27 28 28 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu { … … 40 41 : base() { 41 42 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) { 42 51 } 43 52 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Manipulators/ZhuManipulator.cs
r4379 r4752 28 28 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 29 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Common; 30 31 31 32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu { … … 45 46 } 46 47 48 protected ZhuManipulator(ZhuManipulator original, Cloner cloner) 49 : base(original, cloner) { 50 } 51 47 52 protected abstract void Manipulate(IRandom random, ZhuEncoding individual); 48 53 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Manipulators/ZhuPermutationManipulator.cs
r4379 r4752 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 using HeuristicLab.Data; 27 using HeuristicLab.Common; 27 28 28 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu { … … 42 43 } 43 44 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 44 53 protected override void Manipulate(IRandom random, ZhuEncoding individual) { 45 54 InnerManipulatorParameter.ActualValue.PermutationParameter.ActualName = VRPToursParameter.ActualName; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/ZhuEncoding.cs
r4379 r4752 93 93 #endregion 94 94 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) { 102 97 } 103 98 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) { 106 105 } 107 106
Note: See TracChangeset
for help on using the changeset viewer.