Changeset 6449 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/PotvinRouteBasedCrossover.cs
- Timestamp:
- 06/20/11 13:36:49 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/PotvinRouteBasedCrossover.cs
r5445 r6449 23 23 using HeuristicLab.Core; 24 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 using HeuristicLab.Data; 25 26 26 27 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 40 41 41 42 protected override PotvinEncoding Crossover(IRandom random, PotvinEncoding parent1, PotvinEncoding parent2) { 43 BoolValue useDistanceMatrix = UseDistanceMatrixParameter.ActualValue; 44 DoubleMatrix coordinates = CoordinatesParameter.ActualValue; 45 DistanceMatrix distMatrix = VRPUtilities.GetDistanceMatrix(coordinates, DistanceMatrixParameter, useDistanceMatrix); 46 DoubleArray dueTime = DueTimeParameter.ActualValue; 47 DoubleArray readyTime = ReadyTimeParameter.ActualValue; 48 DoubleArray serviceTime = ServiceTimeParameter.ActualValue; 49 DoubleArray demand = DemandParameter.ActualValue; 50 DoubleValue capacity = CapacityParameter.ActualValue; 51 42 52 PotvinEncoding child = parent2.Clone() as PotvinEncoding; 43 53 … … 55 65 child.Unrouted.Add(city); 56 66 57 if (Repair(random, child, replacing ))67 if (Repair(random, child, replacing, distMatrix, dueTime, readyTime, serviceTime, demand, capacity)) 58 68 return child; 59 69 else { … … 61 71 return parent1.Clone() as PotvinEncoding; 62 72 else 63 return parent2.Clone() as PotvinEncoding; 73 return parent2.Clone() as PotvinEncoding; 64 74 } 65 75 }
Note: See TracChangeset
for help on using the changeset viewer.