Changeset 4691 for branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinTwoLevelExchangeManipulator.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/PotvinTwoLevelExchangeManipulator.cs
r4352 r4691 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 using HeuristicLab.Parameters;25 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Data;27 using System.Collections.Generic;28 25 29 26 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 33 30 [StorableConstructor] 34 31 private PotvinTwoLevelExchangeManipulator(bool deserializing) : base(deserializing) { } 32 private PotvinTwoLevelExchangeManipulator(PotvinTwoLevelExchangeManipulator original, Cloner cloner) : base(original, cloner) { } 33 public override IDeepCloneable Clone(Cloner cloner) { 34 return new PotvinTwoLevelExchangeManipulator(this, cloner); 35 } 36 public PotvinTwoLevelExchangeManipulator() : base() { } 35 37 36 public PotvinTwoLevelExchangeManipulator() : base() { }37 38 38 protected override void Manipulate(IRandom random, PotvinEncoding individual) { 39 39 int selectedIndex = SelectRandomTourBiasedByLength(random, individual); … … 54 54 if (FindInsertionPlace(individual, 55 55 customer2, selectedIndex, out route, out place)) { 56 56 individual.Tours[route].Cities.Insert(place, customer2); 57 57 route1.Cities.RemoveAt(customer1Position); 58 58
Note: See TracChangeset
for help on using the changeset viewer.