Changeset 6713
- Timestamp:
- 09/06/11 16:57:00 (13 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/TourEncoding.cs
r5867 r6713 43 43 foreach(Tour tour in Tours) { 44 44 if (tour.Stops.Count > 0) 45 result.Add(tour );45 result.Add(tour.Clone() as Tour); 46 46 } 47 47 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/IterativeInsertionCreator.cs
r6607 r6713 96 96 97 97 Tour currentTour = new Tour(); 98 result.Tours.Add(currentTour); 98 99 99 int j = random.Next(customers.Count); 100 100 for (int i = 0; i < customers.Count; i++) { … … 109 109 currentTour.Stops.RemoveAt(stopIdx); 110 110 111 if(currentTour.Stops.Count > 0) 112 result.Tours.Add(currentTour); 111 113 currentTour = new Tour(); 112 result.Tours.Add(currentTour);114 113 115 currentTour.Stops.Add(customers[index]); 114 116 } 115 117 } 118 119 if (currentTour.Stops.Count > 0) 120 result.Tours.Add(currentTour); 116 121 117 122 return result;
Note: See TracChangeset
for help on using the changeset viewer.