- Timestamp:
- 10/29/10 20:28:04 (14 years ago)
- Location:
- branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/GVR
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/GVR/Crossovers/GVRCrossover.cs
r4352 r4689 27 27 using HeuristicLab.Optimization; 28 28 using System.Collections.Generic; 29 using HeuristicLab.Common; 29 30 30 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.GVR { … … 38 39 [StorableConstructor] 39 40 private GVRCrossover(bool deserializing) : base(deserializing) { } 40 41 private GVRCrossover(GVRCrossover original, Cloner cloner) : base(original, cloner) { } 42 public override IDeepCloneable Clone(Cloner cloner) { 43 return new GVRCrossover(this, cloner); 44 } 41 45 public GVRCrossover() { 42 46 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); 43 44 47 //remove unused parameters 45 48 Parameters.Remove("ReadyTime"); -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/GVR/GVREncoding.cs
r4352 r4689 75 75 return tours; 76 76 } 77 78 public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) { 79 GVREncoding clone = new GVREncoding(capacity, demand); 80 cloner.RegisterClonedObject(this, clone); 81 clone.Tours = (ItemList<Tour>)cloner.Clone(this.Tours); 82 83 return clone; 77 78 [StorableConstructor] 79 protected GVREncoding(bool deserializing) : base(deserializing) { } 80 protected GVREncoding(GVREncoding original, Cloner cloner) 81 : base(original, cloner) { 82 this.capacity = original.capacity; 83 this.demand = original.demand; 84 this.Tours = cloner.Clone(original.Tours); 84 85 } 85 86 public override IDeepCloneable Clone(Cloner cloner) { 87 return new GVREncoding(this, cloner); 88 } 86 89 public GVREncoding(DoubleValue capacity, DoubleArray demand) 87 90 : base() { 88 91 this.capacity = capacity; 89 92 this.demand = demand; 90 }91 92 [StorableConstructor]93 private GVREncoding(bool serializing)94 : base() {95 93 } 96 94 -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/GVR/Manipulators/GVRDisplacementManipulator.cs
r4352 r4689 26 26 using HeuristicLab.Data; 27 27 using System.Collections.Generic; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.GVR { … … 33 34 [StorableConstructor] 34 35 private GVRDisplacementManipulator(bool deserializing) : base(deserializing) { } 35 36 private GVRDisplacementManipulator(GVRDisplacementManipulator original, Cloner cloner) : base(original, cloner) { } 37 public override IDeepCloneable Clone(Cloner cloner) { 38 return new GVRDisplacementManipulator(this, cloner); 39 } 36 40 public GVRDisplacementManipulator() 37 41 : base() { -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/GVR/Manipulators/GVRInsertionManipulator.cs
r4352 r4689 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.GVR { … … 32 33 [StorableConstructor] 33 34 private GVRInsertionManipulator(bool deserializing) : base(deserializing) { } 34 35 public GVRInsertionManipulator()36 : base() {35 private GVRInsertionManipulator(GVRInsertionManipulator original, Cloner cloner) : base(original, cloner) { } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new GVRInsertionManipulator(this, cloner); 37 38 } 39 public GVRInsertionManipulator() : base() { } 38 40 39 41 protected override void Manipulate(IRandom random, GVREncoding individual) { -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/GVR/Manipulators/GVRInversionManipulator.cs
r4352 r4689 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.GVR { … … 32 33 [StorableConstructor] 33 34 private GVRInversionManipulator(bool deserializing) : base(deserializing) { } 34 35 public GVRInversionManipulator()36 : base() {35 private GVRInversionManipulator(GVRInversionManipulator original, Cloner cloner) : base(original, cloner) { } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new GVRInversionManipulator(this, cloner); 37 38 } 39 public GVRInversionManipulator() : base() { } 38 40 39 41 protected override void Manipulate(IRandom random, GVREncoding individual) { -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/GVR/Manipulators/GVRManipulator.cs
r4352 r4689 26 26 using HeuristicLab.Data; 27 27 using HeuristicLab.Optimization; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.GVR { … … 37 38 [StorableConstructor] 38 39 protected GVRManipulator(bool deserializing) : base(deserializing) { } 39 40 protected GVRManipulator(GVRManipulator original, Cloner cloner) : base(original, cloner) { } 40 41 public GVRManipulator() { 41 42 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/GVR/Manipulators/GVRSwapManipulator.cs
r4352 r4689 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.GVR { … … 32 33 [StorableConstructor] 33 34 private GVRSwapManipulator(bool deserializing) : base(deserializing) { } 34 35 private GVRSwapManipulator(GVRSwapManipulator original, Cloner cloner) : base(original, cloner) { } 36 public override IDeepCloneable Clone(Cloner cloner) { 37 return new GVRSwapManipulator(this, cloner); 38 } 35 39 public GVRSwapManipulator() 36 40 : base() {
Note: See TracChangeset
for help on using the changeset viewer.