Changeset 4691 for branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinLocalSearchManipulator.cs
- Timestamp:
- 10/29/10 20:34:10 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinLocalSearchManipulator.cs
r4352 r4691 20 20 #endregion 21 21 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 22 24 using HeuristicLab.Core; 23 using HeuristicLab. Encodings.PermutationEncoding;25 using HeuristicLab.Data; 24 26 using HeuristicLab.Parameters; 25 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Data;27 using System.Collections.Generic;28 28 29 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 37 37 [StorableConstructor] 38 38 private PotvinLocalSearchManipulator(bool deserializing) : base(deserializing) { } 39 40 public PotvinLocalSearchManipulator() : base() { 39 private PotvinLocalSearchManipulator(PotvinLocalSearchManipulator original, Cloner cloner) 40 : base(original, cloner) { 41 } 42 public override IDeepCloneable Clone(Cloner cloner) { 43 return new PotvinLocalSearchManipulator(this, cloner); 44 } 45 public PotvinLocalSearchManipulator() 46 : base() { 41 47 Parameters.Add(new ValueParameter<IntValue>("Iterations", "The number of max iterations.", new IntValue(100))); 42 48 } … … 71 77 } 72 78 individual.Tours[currentTour].Cities.RemoveRange(currentCity, length); 73 79 74 80 currentCity++; 75 81 } … … 106 112 individual.Tours[insertionTour].Cities.InsertRange( 107 113 insertionPlace, 108 toBeInserted); 114 toBeInserted); 109 115 } 110 116 city++; … … 115 121 } 116 122 iterations++; 117 } while (insertionFound && 123 } while (insertionFound && 118 124 iterations < Iterations.Value.Value); 119 125
Note: See TracChangeset
for help on using the changeset viewer.