Changeset 6838 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/IterativeInsertionCreator.cs
- Timestamp:
- 09/27/11 13:29:56 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/IterativeInsertionCreator.cs
r6788 r6838 101 101 102 102 Tour currentTour = new Tour(); 103 result.Tours.Add(currentTour); 103 104 104 105 int j = random.Next(customers.Count); … … 114 115 } 115 116 116 CVRPEvaluation evaluation = instance.Evaluate (currentTour) as CVRPEvaluation;117 CVRPEvaluation evaluation = instance.EvaluateTour(currentTour, result) as CVRPEvaluation; 117 118 if (result.Tours.Count < instance.Vehicles.Value && 118 119 ((adhereTimeWindows && !instance.Feasible(evaluation)) || ((!adhereTimeWindows) && evaluation.Overload > double.Epsilon))) { … … 132 133 } 133 134 134 if (currentTour.Stops.Count >0)135 result.Tours. Add(currentTour);135 if (currentTour.Stops.Count == 0) 136 result.Tours.Remove(currentTour); 136 137 137 138 return result;
Note: See TracChangeset
for help on using the changeset viewer.