- Timestamp:
- 09/30/11 13:51:01 (13 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinCustomerRelocationManipulator.cs
r6854 r6856 68 68 int stop = route1.Stops[i]; 69 69 if (ProblemInstance.GetDemand(stop) < 0) { 70 int source = pdp. PickupDeliveryLocation[stop];70 int source = pdp.GetPickupDeliveryLocation(stop); 71 71 72 72 if (!visited.ContainsKey(source)) … … 81 81 deliveryViolations[random.Next(deliveryViolations.Count)]; 82 82 83 int source = pdp. PickupDeliveryLocation[selected];83 int source = pdp.GetPickupDeliveryLocation(selected); 84 84 85 85 //find route of source -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeExhaustiveMoveGenerator.cs
r6851 r6856 67 67 if (pdp == null || pdp.GetDemand(city2) >= 0) { 68 68 bool valid = pdp == null || 69 (pdp. PickupDeliveryLocation[city2] != pdp.PickupDeliveryLocation[city1]&&70 pdp. PickupDeliveryLocation[city2]!= city1 &&71 pdp. PickupDeliveryLocation[city1]!= city2);69 (pdp.GetPickupDeliveryLocation(city2) != pdp.GetPickupDeliveryLocation(city1) && 70 pdp.GetPickupDeliveryLocation(city2) != city1 && 71 pdp.GetPickupDeliveryLocation(city1) != city2); 72 72 73 73 if (valid) { -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveMaker.cs
r6773 r6856 68 68 69 69 if (problemInstance is IPickupAndDeliveryProblemInstance) { 70 IntArray pickupLocation = 71 (problemInstance as IPickupAndDeliveryProblemInstance).PickupDeliveryLocation; 70 IPickupAndDeliveryProblemInstance pdp = problemInstance as IPickupAndDeliveryProblemInstance; 72 71 73 int location = p ickupLocation[move.City];72 int location = pdp.GetPickupDeliveryLocation(move.City); 74 73 Tour oldTour2 = solution.Tours.Find(t => t.Stops.Contains(location)); 75 74 oldTour2.Stops.Remove(location); 76 75 77 location = p ickupLocation[move.Replaced];76 location = pdp.GetPickupDeliveryLocation(move.Replaced); 78 77 oldTour2 = solution.Tours.Find(t => t.Stops.Contains(location)); 79 78 … … 81 80 tour.Stops.Remove(move.Replaced); 82 81 83 PotvinPDRearrangeMoveMaker.InsertPair(solution, tour, move.City, p ickupLocation[move.City], problemInstance);84 PotvinPDRearrangeMoveMaker.InsertPair(solution, oldTour, move.Replaced, p ickupLocation[move.Replaced], problemInstance);82 PotvinPDRearrangeMoveMaker.InsertPair(solution, tour, move.City, pdp.GetPickupDeliveryLocation(move.City), problemInstance); 83 PotvinPDRearrangeMoveMaker.InsertPair(solution, oldTour, move.Replaced, pdp.GetPickupDeliveryLocation(move.Replaced), problemInstance); 85 84 } else { 86 85 tour.Stops.Remove(move.Replaced); -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeSingleMoveGenerator.cs
r6851 r6856 85 85 if (pdp == null || 86 86 (pdp.GetDemand(stop) >= 0 && 87 pdp.PickupDeliveryLocation[stop] != pdp.PickupDeliveryLocation[city]&&88 pdp.PickupDeliveryLocation[stop]!= city &&89 pdp.PickupDeliveryLocation[city]!= stop))87 pdp.GetPickupDeliveryLocation(stop) != pdp.GetPickupDeliveryLocation(city) && 88 pdp.GetPickupDeliveryLocation(stop) != city && 89 pdp.GetPickupDeliveryLocation(city) != stop)) 90 90 tourCities.Add(stop); 91 91 } -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveMaker.cs
r6851 r6856 97 97 IPickupAndDeliveryProblemInstance pdp = problemInstance as IPickupAndDeliveryProblemInstance; 98 98 if (pdp != null) { 99 int location = pdp. PickupDeliveryLocation[move.City];99 int location = pdp.GetPickupDeliveryLocation(move.City); 100 100 Tour tour2 = solution.Tours.Find(t => t.Stops.Contains(location)); 101 101 int position2 = tour2.Stops.IndexOf(location); -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveMaker.cs
r6773 r6856 68 68 69 69 if (problemInstance is IPickupAndDeliveryProblemInstance) { 70 IntArray pickupLocation = 71 (problemInstance as IPickupAndDeliveryProblemInstance).PickupDeliveryLocation; 72 73 int location = pickupLocation[move.City]; 70 IPickupAndDeliveryProblemInstance pdp = problemInstance as IPickupAndDeliveryProblemInstance; 71 72 int location = pdp.GetPickupDeliveryLocation(move.City); 74 73 Tour oldTour2 = solution.Tours.Find(t => t.Stops.Contains(location)); 75 74 oldTour2.Stops.Remove(location); 76 75 77 PotvinPDRearrangeMoveMaker.InsertPair(solution, tour, move.City, pickupLocation[move.City], problemInstance);76 PotvinPDRearrangeMoveMaker.InsertPair(solution, tour, move.City, location, problemInstance); 78 77 } else { 79 78 int place = solution.FindBestInsertionPlace(tour, move.City);
Note: See TracChangeset
for help on using the changeset viewer.