Changeset 6569 for branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/PotvinRouteBasedCrossover.cs
- Timestamp:
- 07/17/11 22:51:11 (13 years ago)
- Location:
- branches/QAPAlgorithms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/QAPAlgorithms
- Property svn:ignore
-
old new 12 12 *.psess 13 13 *.vsp 14 *.docstates
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.VehicleRouting merged: 6441,6448-6450,6455,6459,6491,6522-6523,6548
- Property svn:mergeinfo changed
-
branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/PotvinRouteBasedCrossover.cs
r5445 r6569 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 52 bool allowInfeasible = AllowInfeasibleSolutions.Value.Value; 53 42 54 PotvinEncoding child = parent2.Clone() as PotvinEncoding; 43 55 … … 55 67 child.Unrouted.Add(city); 56 68 57 if (Repair(random, child, replacing ))69 if (Repair(random, child, replacing, distMatrix, dueTime, readyTime, serviceTime, demand, capacity, allowInfeasible) || allowInfeasible) 58 70 return child; 59 71 else { … … 61 73 return parent1.Clone() as PotvinEncoding; 62 74 else 63 return parent2.Clone() as PotvinEncoding; 75 return parent2.Clone() as PotvinEncoding; 64 76 } 65 77 }
Note: See TracChangeset
for help on using the changeset viewer.