- Timestamp:
- 07/17/11 22:51:11 (13 years ago)
- Location:
- branches/QAPAlgorithms
- Files:
-
- 10 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/PotvinCrossover.cs
r5445 r6569 26 26 using HeuristicLab.Parameters; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Data; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 33 34 public ILookupParameter<IRandom> RandomParameter { 34 35 get { return (LookupParameter<IRandom>)Parameters["Random"]; } 36 } 37 38 public IValueParameter<BoolValue> AllowInfeasibleSolutions { 39 get { return (IValueParameter<BoolValue>)Parameters["AllowInfeasibleSolutions"]; } 40 } 41 42 [StorableHook(HookType.AfterDeserialization)] 43 private void AfterDeserialization() { 44 // BackwardsCompatibility3.3 45 #region Backwards compatible code (remove with 3.4) 46 if (!Parameters.ContainsKey("AllowInfeasibleSolutions")) { 47 Parameters.Add(new ValueParameter<BoolValue>("AllowInfeasibleSolutions", "Indicates if infeasible solutions should be allowed.", new BoolValue(false))); 48 } 49 #endregion 35 50 } 36 51 … … 43 58 public PotvinCrossover() { 44 59 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); 60 Parameters.Add(new ValueParameter<BoolValue>("AllowInfeasibleSolutions", "Indicates if infeasible solutions should be allowed.", new BoolValue(false))); 45 61 } 46 62 47 63 protected abstract PotvinEncoding Crossover(IRandom random, PotvinEncoding parent1, PotvinEncoding parent2); 48 64 49 protected bool FindInsertionPlace(PotvinEncoding individual, int city, out int route, out int place) { 65 protected static bool FindInsertionPlace(PotvinEncoding individual, int city, 66 DoubleArray dueTime, DoubleArray serviceTime, DoubleArray readyTime, DoubleArray demand, 67 DoubleValue capacity, DistanceMatrix distMatrix, bool allowInfeasible, 68 out int route, out int place) { 50 69 return individual.FindInsertionPlace( 51 DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,52 DemandParameter.ActualValue, CapacityParameter.ActualValue, CoordinatesParameter.ActualValue,53 DistanceMatrixParameter, UseDistanceMatrixParameter.ActualValue,54 city, -1,out route, out place);70 dueTime, serviceTime, readyTime, 71 demand, capacity, distMatrix, 72 city, -1, allowInfeasible, 73 out route, out place); 55 74 } 56 75 … … 68 87 } 69 88 70 protected bool Repair(IRandom random, PotvinEncoding solution, Tour newTour) { 89 protected static bool RouteUnrouted(PotvinEncoding solution, DistanceMatrix distMatrix, 90 DoubleArray dueTime, DoubleArray readyTime, DoubleArray serviceTime, DoubleArray demand, DoubleValue capacity, bool allowInfeasible) { 91 bool success = true; 92 int index = 0; 93 while (index < solution.Unrouted.Count && success) { 94 int unrouted = solution.Unrouted[index]; 95 96 int route, place; 97 if (FindInsertionPlace(solution, unrouted, 98 dueTime, serviceTime, readyTime, demand, capacity, 99 distMatrix, allowInfeasible, 100 out route, out place)) { 101 solution.Tours[route].Cities.Insert(place, unrouted); 102 } else { 103 success = false; 104 } 105 106 index++; 107 } 108 109 for (int i = 0; i < index; i++) 110 solution.Unrouted.RemoveAt(0); 111 112 return success; 113 } 114 115 protected static bool Repair(IRandom random, PotvinEncoding solution, Tour newTour, DistanceMatrix distmatrix, 116 DoubleArray dueTime, DoubleArray readyTime, DoubleArray serviceTime, DoubleArray demand, DoubleValue capacity, 117 bool allowInfeasible) { 71 118 bool success = true; 72 119 … … 104 151 } 105 152 153 if (!allowInfeasible && !newTour.Feasible( 154 dueTime, serviceTime, readyTime, demand, capacity, distmatrix)) 155 return false; 156 106 157 //route unrouted vehicles 107 int index = 0; 108 while (index < solution.Unrouted.Count && success) { 109 int unrouted = solution.Unrouted[index]; 110 111 int route, place; 112 if (FindInsertionPlace(solution, unrouted, out route, out place)) { 113 solution.Tours[route].Cities.Insert(place, unrouted); 114 } else { 115 success = false; 116 } 117 118 index++; 119 } 120 121 for (int i = 0; i < index; i++) 122 solution.Unrouted.RemoveAt(0); 158 success = RouteUnrouted(solution, distmatrix, dueTime, readyTime, serviceTime, demand, capacity, allowInfeasible); 123 159 124 160 return success; -
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 } -
branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/PotvinSequenceBasedCrossover.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 { … … 41 42 42 43 protected override PotvinEncoding Crossover(IRandom random, PotvinEncoding parent1, PotvinEncoding parent2) { 44 BoolValue useDistanceMatrix = UseDistanceMatrixParameter.ActualValue; 45 DoubleMatrix coordinates = CoordinatesParameter.ActualValue; 46 DistanceMatrix distMatrix = VRPUtilities.GetDistanceMatrix(coordinates, DistanceMatrixParameter, useDistanceMatrix); 47 DoubleArray dueTime = DueTimeParameter.ActualValue; 48 DoubleArray readyTime = ReadyTimeParameter.ActualValue; 49 DoubleArray serviceTime = ServiceTimeParameter.ActualValue; 50 DoubleArray demand = DemandParameter.ActualValue; 51 DoubleValue capacity = CapacityParameter.ActualValue; 52 53 bool allowInfeasible = AllowInfeasibleSolutions.Value.Value; 54 43 55 PotvinEncoding child = parent1.Clone() as PotvinEncoding; 44 56 Tour newTour = new Tour(); … … 69 81 child.Unrouted.Add(city); 70 82 71 if (Feasible(newTour) && 72 Repair(random, child, newTour)) { 83 if (Repair(random, child, newTour, distMatrix, dueTime, readyTime, serviceTime, demand, capacity, allowInfeasible) || allowInfeasible) { 73 84 return child; 74 85 } else { 75 if (random.NextDouble() < 0.5)86 if (random.NextDouble() < 0.5) 76 87 return parent1.Clone() as PotvinEncoding; 77 88 else 78 return parent2.Clone() as PotvinEncoding; 89 return parent2.Clone() as PotvinEncoding; 79 90 } 80 91 } -
branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinLocalSearchManipulator.cs
r5445 r6569 49 49 50 50 private bool FindBetterInsertionPlace( 51 PotvinEncoding individual, int tour, int city, int length, 51 PotvinEncoding individual, 52 DoubleArray dueTime, DoubleArray readyTime, DoubleArray serviceTime, DoubleArray demand, 53 DoubleValue capacity, DistanceMatrix distMatrix, 54 int tour, int city, int length, 52 55 out int insertionTour, out int insertionPlace) { 53 56 bool insertionFound = false; … … 56 59 57 60 List<int> toBeDeleted = individual.Tours[tour].Cities.GetRange(city, length); 58 double distance = GetLength(individual.Tours[tour]);61 double distance = individual.Tours[tour].GetLength(distMatrix); 59 62 individual.Tours[tour].Cities.RemoveRange(city, length); 60 double removalBenefit = distance - GetLength(individual.Tours[tour]);63 double removalBenefit = distance - individual.Tours[tour].GetLength(distMatrix); 61 64 62 65 int currentTour = 0; … … 64 67 int currentCity = 0; 65 68 while (currentCity <= individual.Tours[currentTour].Cities.Count && !insertionFound) { 66 distance = GetLength(individual.Tours[currentTour]);69 distance = individual.Tours[currentTour].GetLength(distMatrix); 67 70 individual.Tours[currentTour].Cities.InsertRange(currentCity, toBeDeleted); 68 if ( Feasible(individual.Tours[currentTour])) {71 if (individual.Tours[currentTour].Feasible(dueTime, serviceTime, readyTime, demand, capacity, distMatrix)) { 69 72 double lengthIncrease = 70 GetLength(individual.Tours[currentTour]) - distance;73 individual.Tours[currentTour].GetLength(distMatrix) - distance; 71 74 if (removalBenefit > lengthIncrease) { 72 75 insertionTour = currentTour; … … 83 86 } 84 87 85 individual.Tours[tour].Cities.InsertRange(city, toBeDeleted); 88 individual.Tours[tour].Cities.InsertRange(city, toBeDeleted); 86 89 87 90 return insertionFound; … … 89 92 90 93 protected override void Manipulate(IRandom random, PotvinEncoding individual) { 94 BoolValue useDistanceMatrix = UseDistanceMatrixParameter.ActualValue; 95 DoubleMatrix coordinates = CoordinatesParameter.ActualValue; 96 DistanceMatrix distMatrix = VRPUtilities.GetDistanceMatrix(coordinates, DistanceMatrixParameter, useDistanceMatrix); 97 DoubleArray dueTime = DueTimeParameter.ActualValue; 98 DoubleArray readyTime = ReadyTimeParameter.ActualValue; 99 DoubleArray serviceTime = ServiceTimeParameter.ActualValue; 100 DoubleArray demand = DemandParameter.ActualValue; 101 DoubleValue capacity = CapacityParameter.ActualValue; 102 91 103 //only apply to feasible individuals 92 if (Feasible(individual)) { 104 bool feasible = true; 105 106 foreach (Tour tour in individual.Tours) { 107 if (!tour.Feasible(dueTime, serviceTime, readyTime, demand, capacity, distMatrix)) { 108 feasible = false; 109 break; 110 } 111 } 112 113 if (feasible) { 93 114 bool insertionFound; 94 115 int iterations = 0; … … 103 124 while (city <= individual.Tours[tour].Cities.Count - length && !insertionFound) { 104 125 int insertionTour, insertionPlace; 105 if (FindBetterInsertionPlace(individual, tour, city, length, 126 if (FindBetterInsertionPlace(individual, dueTime, readyTime, serviceTime, demand, capacity, distMatrix, 127 tour, city, length, 106 128 out insertionTour, out insertionPlace)) { 107 129 insertionFound = true; -
branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinManipulator.cs
r5445 r6569 25 25 using HeuristicLab.Parameters; 26 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Data; 27 28 28 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 34 35 } 35 36 37 public IValueParameter<BoolValue> AllowInfeasibleSolutions { 38 get { return (IValueParameter<BoolValue>)Parameters["AllowInfeasibleSolutions"]; } 39 } 40 41 [StorableHook(HookType.AfterDeserialization)] 42 private void AfterDeserialization() { 43 // BackwardsCompatibility3.3 44 #region Backwards compatible code (remove with 3.4) 45 if (!Parameters.ContainsKey("AllowInfeasibleSolutions")) { 46 Parameters.Add(new ValueParameter<BoolValue>("AllowInfeasibleSolutions", "Indicates if infeasible solutions should be allowed.", new BoolValue(false))); 47 } 48 #endregion 49 } 50 36 51 [StorableConstructor] 37 52 protected PotvinManipulator(bool deserializing) : base(deserializing) { } … … 41 56 public PotvinManipulator() { 42 57 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); 58 Parameters.Add(new ValueParameter<BoolValue>("AllowInfeasibleSolutions", "Indicates if infeasible solutions should be allowed.", new BoolValue(false))); 43 59 } 44 60 45 61 protected abstract void Manipulate(IRandom random, PotvinEncoding individual); 46 62 47 protected int SelectRandomTourBiasedByLength(IRandom random, PotvinEncoding individual) {63 protected static int SelectRandomTourBiasedByLength(IRandom random, PotvinEncoding individual) { 48 64 int tourIndex = -1; 49 65 … … 51 67 double[] probabilities = new double[individual.Tours.Count]; 52 68 for (int i = 0; i < individual.Tours.Count; i++) { 53 probabilities[i] = 1.0 / ((double)individual.Tours[i].Cities.Count / (double) Cities);69 probabilities[i] = 1.0 / ((double)individual.Tours[i].Cities.Count / (double)individual.Cities); 54 70 sum += probabilities[i]; 55 71 } … … 72 88 } 73 89 74 protected bool FindInsertionPlace(PotvinEncoding individual, int city, int routeToAvoid, out int route, out int place) { 90 protected static bool FindInsertionPlace(PotvinEncoding individual, int city, int routeToAvoid, 91 DoubleArray dueTime, DoubleArray serviceTime, DoubleArray readyTime, DoubleArray demand, 92 DoubleValue capacity, DistanceMatrix distMatrix, bool allowInfeasible, 93 out int route, out int place) { 75 94 return individual.FindInsertionPlace( 76 DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,77 DemandParameter.ActualValue, CapacityParameter.ActualValue, CoordinatesParameter.ActualValue,78 DistanceMatrixParameter, UseDistanceMatrixParameter.ActualValue,79 city, routeToAvoid,out route, out place);95 dueTime, serviceTime, readyTime, 96 demand, capacity, distMatrix, 97 city, routeToAvoid, allowInfeasible, 98 out route, out place); 80 99 } 100 81 101 82 102 public override IOperation Apply() { -
branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinOneLevelExchangeManipulator.cs
r5445 r6569 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Data; 26 27 27 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 39 40 public PotvinOneLevelExchangeMainpulator() : base() { } 40 41 41 protected override void Manipulate(IRandom random, PotvinEncoding individual) { 42 public static void Apply(IRandom random, PotvinEncoding individual, 43 DoubleArray dueTime, DoubleArray readyTime, DoubleArray serviceTime, DoubleArray demand, 44 DoubleValue capacity, DistanceMatrix distMatrix, bool allowInfeasible) { 42 45 int selectedIndex = SelectRandomTourBiasedByLength(random, individual); 43 46 Tour route1 = … … 48 51 int insertedRoute, insertedPlace; 49 52 50 if (FindInsertionPlace(individual, route1.Cities[i], selectedIndex, out insertedRoute, out insertedPlace)) { 53 if (FindInsertionPlace(individual, route1.Cities[i], selectedIndex, 54 dueTime, serviceTime, readyTime, demand, capacity, 55 distMatrix, allowInfeasible, 56 out insertedRoute, out insertedPlace)) { 51 57 individual.Tours[insertedRoute].Cities.Insert(insertedPlace, route1.Cities[i]); 52 58 replaced.Add(route1.Cities[i]); … … 65 71 individual.Tours.Remove(route1); 66 72 } 73 74 protected override void Manipulate(IRandom random, PotvinEncoding individual) { 75 BoolValue useDistanceMatrix = UseDistanceMatrixParameter.ActualValue; 76 DoubleMatrix coordinates = CoordinatesParameter.ActualValue; 77 DistanceMatrix distMatrix = VRPUtilities.GetDistanceMatrix(coordinates, DistanceMatrixParameter, useDistanceMatrix); 78 DoubleArray dueTime = DueTimeParameter.ActualValue; 79 DoubleArray readyTime = ReadyTimeParameter.ActualValue; 80 DoubleArray serviceTime = ServiceTimeParameter.ActualValue; 81 DoubleArray demand = DemandParameter.ActualValue; 82 DoubleValue capacity = CapacityParameter.ActualValue; 83 84 bool allowInfeasible = AllowInfeasibleSolutions.Value.Value; 85 86 Apply(random, individual, dueTime, readyTime, serviceTime, demand, capacity, distMatrix, allowInfeasible); 87 } 67 88 } 68 89 } -
branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinTwoLevelExchangeManipulator.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 { … … 36 37 public PotvinTwoLevelExchangeManipulator() : base() { } 37 38 38 protected override void Manipulate(IRandom random, PotvinEncoding individual) { 39 public static void Apply(IRandom random, PotvinEncoding individual, 40 DoubleArray dueTime, DoubleArray readyTime, DoubleArray serviceTime, DoubleArray demand, 41 DoubleValue capacity, DistanceMatrix distMatrix, bool allowInfeasible) { 39 42 int selectedIndex = SelectRandomTourBiasedByLength(random, individual); 40 Tour route1 = individual.Tours[selectedIndex]; 43 Tour route1 = individual.Tours[selectedIndex]; 41 44 42 45 bool performed = false; … … 53 56 //customer1 can be feasibly inserted at the location of customer2 54 57 tour.Cities[customer2Position] = customer1; 55 if ( Feasible(tour)) {58 if (tour.Feasible(dueTime, serviceTime, readyTime, demand, capacity, distMatrix)) { 56 59 int routeIdx, place; 57 60 if (FindInsertionPlace(individual, 58 customer2, selectedIndex, out routeIdx, out place)) { 59 individual.Tours[routeIdx].Cities.Insert(place, customer2); 60 route1.Cities.RemoveAt(customer1Position); 61 customer2, selectedIndex, 62 dueTime, serviceTime, readyTime, demand, capacity, 63 distMatrix, allowInfeasible, 64 out routeIdx, out place)) { 65 individual.Tours[routeIdx].Cities.Insert(place, customer2); 66 route1.Cities.RemoveAt(customer1Position); 61 67 62 68 if (route1.Cities.Count == 0) 63 69 individual.Tours.Remove(route1); 64 70 … … 83 89 } 84 90 } 91 92 protected override void Manipulate(IRandom random, PotvinEncoding individual) { 93 BoolValue useDistanceMatrix = UseDistanceMatrixParameter.ActualValue; 94 DoubleMatrix coordinates = CoordinatesParameter.ActualValue; 95 DistanceMatrix distMatrix = VRPUtilities.GetDistanceMatrix(coordinates, DistanceMatrixParameter, useDistanceMatrix); 96 DoubleArray dueTime = DueTimeParameter.ActualValue; 97 DoubleArray readyTime = ReadyTimeParameter.ActualValue; 98 DoubleArray serviceTime = ServiceTimeParameter.ActualValue; 99 DoubleArray demand = DemandParameter.ActualValue; 100 DoubleValue capacity = CapacityParameter.ActualValue; 101 102 bool allowInfeasible = AllowInfeasibleSolutions.Value.Value; 103 104 Apply(random, individual, dueTime, readyTime, serviceTime, demand, capacity, distMatrix, allowInfeasible); 105 } 85 106 } 86 107 } -
branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/PotvinEncoding.cs
r5445 r6569 69 69 DoubleArray dueTimeArray, 70 70 DoubleArray serviceTimeArray, DoubleArray readyTimeArray, DoubleArray demandArray, DoubleValue capacity, 71 DoubleMatrix coordinates, ILookupParameter<DoubleMatrix> distanceMatrix, BoolValue useDistanceMatrix, 72 int city, int routeToAvoid, out int route, out int place) { 71 DistanceMatrix distMatrix, 72 int city, int routeToAvoid, bool allowInfeasible, 73 out int route, out int place) { 73 74 route = -1; 74 75 place = -1; 76 bool bestFeasible = false; 75 77 double minDetour = 0; 76 78 … … 78 80 if (tour != routeToAvoid) { 79 81 for (int i = 0; i <= Tours[tour].Cities.Count; i++) { 80 double length = Tours[tour].GetLength( coordinates, distanceMatrix, useDistanceMatrix);82 double length = Tours[tour].GetLength(distMatrix); 81 83 82 84 Tours[tour].Cities.Insert(i, city); 83 85 84 if (Tours[tour].Feasible(dueTimeArray, serviceTimeArray, readyTimeArray, demandArray, 85 capacity, coordinates, distanceMatrix, useDistanceMatrix)) { 86 double newLength = Tours[tour].GetLength(coordinates, distanceMatrix, useDistanceMatrix); 86 bool feasible = Tours[tour].Feasible(dueTimeArray, serviceTimeArray, readyTimeArray, demandArray, 87 capacity, distMatrix); 87 88 89 if ((!allowInfeasible && feasible) || (allowInfeasible && (!bestFeasible || feasible))) { 90 double newLength = Tours[tour].GetLength(distMatrix); 88 91 double detour = newLength - length; 89 92 90 if (route <= 0 || detour < minDetour) { 93 if (route <= 0 || detour < minDetour || 94 (allowInfeasible && ((!(bestFeasible && !feasible)) && detour < minDetour || (feasible && !bestFeasible)))) { 91 95 route = tour; 92 96 place = i; 93 97 minDetour = detour; 98 99 if (feasible) 100 bestFeasible = true; 94 101 } 95 102 }
Note: See TracChangeset
for help on using the changeset viewer.