Changeset 4378 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/PotvinEncoding.cs
- Timestamp:
- 09/10/10 13:00:54 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/PotvinEncoding.cs
r4376 r4378 99 99 for (int tour = 0; tour < Tours.Count; tour++) { 100 100 if (tour != routeToAvoid) { 101 double length = GetTourLength(Tours[tour]); 102 101 103 for (int i = 0; i <= Tours[tour].Stops.Count; i++) { 102 double length = GetTourLength(Tours[tour]);103 104 104 Tours[tour].Stops.Insert(i, city); 105 105 106 if (ProblemInstance.Feasible(Tours[tour])) { 107 double newLength = GetTourLength(Tours[tour]); 106 VRPEvaluation eval = ProblemInstance.EvaluatorParameter.Value.Evaluate( 107 ProblemInstance, Tours[tour]); 108 if (ProblemInstance.EvaluatorParameter.Value.Feasible(eval)) { 109 double newLength = eval.Distance; 108 110 109 111 double detour = newLength - length;
Note: See TracChangeset
for help on using the changeset viewer.