Changeset 4177 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers
- Timestamp:
- 08/09/10 13:29:06 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/PotvinSBXCrossover.cs
r4174 r4177 27 27 28 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 29 [Item("PotvinSBXCrossover", "The SBX crossover for the Potvin VRP representations. ")]29 [Item("PotvinSBXCrossover", "The SBX crossover for the Potvin VRP representations. It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")] 30 30 [StorableClass] 31 31 public sealed class PotvinSBXCrossover : PotvinCrossover { … … 72 72 child.Unrouted.Add(city); 73 73 74 if (Repair(random, child, newTour))74 if (Repair(random, child, newTour)) 75 75 return child; 76 else 77 return parent1.Clone() as PotvinEncoding; 76 else { 77 if(random.NextDouble() < 0.5) 78 return parent1.Clone() as PotvinEncoding; 79 else 80 return parent2.Clone() as PotvinEncoding; 81 } 78 82 } 79 83 }
Note: See TracChangeset
for help on using the changeset viewer.