Changeset 4686
- Timestamp:
- 10/29/10 20:20:35 (14 years ago)
- Location:
- branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Crossovers/PrinsCrossover.cs
r4352 r4686 26 26 using HeuristicLab.Data; 27 27 using HeuristicLab.Optimization; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Prins { … … 53 54 [StorableConstructor] 54 55 protected PrinsCrossover(bool deserializing) : base(deserializing) { } 55 56 protected PrinsCrossover(PrinsCrossover original, Cloner cloner) : base(original, cloner) { } 56 57 public PrinsCrossover() 57 58 : base() { -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Crossovers/PrinsPermutationCrossover.cs
r4352 r4686 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.Prins { … … 36 37 [StorableConstructor] 37 38 private PrinsPermutationCrossover(bool deserializing) : base(deserializing) { } 38 39 private PrinsPermutationCrossover(PrinsPermutationCrossover original, Cloner cloner) : base(original, cloner) { } 40 public override IDeepCloneable Clone(Cloner cloner) { 41 return new PrinsPermutationCrossover(this, cloner); 42 } 39 43 public PrinsPermutationCrossover() 40 44 : base() { -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Manipulators/PrinsExhaustiveLSManipulator.cs
r4352 r4686 26 26 using HeuristicLab.Data; 27 27 using System.Collections.Generic; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Prins { … … 33 34 [StorableConstructor] 34 35 private PrinsExhaustiveLSManipulator(bool deserializing) : base(deserializing) { } 35 36 private PrinsExhaustiveLSManipulator(PrinsExhaustiveLSManipulator original, Cloner cloner) : base(original, cloner) { } 37 public override IDeepCloneable Clone(Cloner cloner) { 38 return new PrinsExhaustiveLSManipulator(this, cloner); 39 } 36 40 public PrinsExhaustiveLSManipulator() 37 41 : base() { -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Manipulators/PrinsLSManipulator.cs
r4352 r4686 26 26 using HeuristicLab.Data; 27 27 using System.Collections.Generic; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Prins { … … 37 38 [StorableConstructor] 38 39 protected PrinsLSManipulator(bool deserializing) : base(deserializing) { } 39 40 protected PrinsLSManipulator(PrinsLSManipulator original, Cloner cloner) : base(original, cloner) { } 40 41 public PrinsLSManipulator() 41 42 : base() { -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Manipulators/PrinsManipulator.cs
r4352 r4686 26 26 using HeuristicLab.Data; 27 27 using HeuristicLab.Optimization; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Prins { … … 53 54 [StorableConstructor] 54 55 protected PrinsManipulator(bool deserializing) : base(deserializing) { } 55 56 protected PrinsManipulator(PrinsManipulator original, Cloner cloner) : base(original, cloner) { } 56 57 public PrinsManipulator() 57 58 : base() { … … 61 62 Parameters.Add(new LookupParameter<DoubleValue>("EvalOverloadPenalty", "The overload penalty considered in the evaluation.")); 62 63 Parameters.Add(new LookupParameter<DoubleValue>("EvalTardinessPenalty", "The tardiness penalty considered in the evaluation.")); 63 64 64 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); 65 65 } -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Manipulators/PrinsPermutationManipulator.cs
r4352 r4686 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.Prins { … … 36 37 [StorableConstructor] 37 38 private PrinsPermutationManipulator(bool deserializing) : base(deserializing) { } 38 39 private PrinsPermutationManipulator(PrinsPermutationManipulator original, Cloner cloner) : base(original, cloner) { } 40 public override IDeepCloneable Clone(Cloner cloner) { 41 return new PrinsPermutationManipulator(this, cloner); 42 } 39 43 public PrinsPermutationManipulator() 40 44 : base() { -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/Manipulators/PrinsStochasticLSManipulator.cs
r4352 r4686 26 26 using HeuristicLab.Data; 27 27 using System.Collections.Generic; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Prins { … … 37 38 [StorableConstructor] 38 39 private PrinsStochasticLSManipulator(bool deserializing) : base(deserializing) { } 39 40 private PrinsStochasticLSManipulator(PrinsStochasticLSManipulator original, Cloner cloner) : base(original, cloner) { } 41 public override IDeepCloneable Clone(Cloner cloner) { 42 return new PrinsStochasticLSManipulator(this, cloner); 43 } 40 44 public PrinsStochasticLSManipulator() 41 45 : base() { -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Prins/PrinsEncoding.cs
r4352 r4686 178 178 } 179 179 #endregion 180 181 public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) { 182 PrinsEncoding clone = new PrinsEncoding( 183 new Permutation(this.PermutationType, this.array), cities, 184 dueTimeArray, serviceTimeArray, readyTimeArray, demandArray, capacity, 185 fleetUsageFactor, timeFactor, distanceFactor, overloadPenalty, tardinessPenalty, 186 coordinates, useDistanceMatrix); 187 188 cloner.RegisterClonedObject(this, clone); 189 clone.readOnly = readOnly; 190 return clone; 191 } 192 180 181 [StorableConstructor] 182 protected PrinsEncoding(bool deserializing) : base(deserializing) { } 183 protected PrinsEncoding(PrinsEncoding original, Cloner cloner) 184 : base(original, cloner) { 185 this.cities = original.cities; 186 this.dueTimeArray = original.dueTimeArray; 187 this.serviceTimeArray = original.serviceTimeArray; 188 this.readyTimeArray = original.readyTimeArray; 189 this.demandArray = original.demandArray; 190 this.capacity = original.capacity; 191 this.fleetUsageFactor = original.fleetUsageFactor; 192 this.timeFactor = original.timeFactor; 193 this.distanceFactor = original.distanceFactor; 194 this.overloadPenalty = original.overloadPenalty; 195 this.tardinessPenalty = original.tardinessPenalty; 196 this.coordinates = original.coordinates; 197 this.useDistanceMatrix = original.useDistanceMatrix; 198 } 199 public override IDeepCloneable Clone(Cloner cloner) { 200 return new PrinsEncoding(this, cloner); 201 } 193 202 public PrinsEncoding(Permutation permutation, int cities, 194 203 DoubleArray dueTimeArray, DoubleArray serviceTimeArray, DoubleArray readyTimeArray, DoubleArray demandArray, DoubleValue capacity, … … 211 220 } 212 221 213 [StorableConstructor]214 private PrinsEncoding(bool serializing)215 : base(serializing) {216 }217 218 222 public static PrinsEncoding ConvertFrom(IVRPEncoding encoding, int cities, 219 223 DoubleArray dueTimeArray, DoubleArray serviceTimeArray, DoubleArray readyTimeArray, DoubleArray demandArray, DoubleValue capacity,
Note: See TracChangeset
for help on using the changeset viewer.