Changeset 6618 for branches/GP.Grammar.Editor/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Tour.cs
- Timestamp:
- 08/01/11 17:48:53 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GP.Grammar.Editor/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Tour.cs
r5445 r6618 48 48 public bool Feasible(DoubleArray dueTimeArray, 49 49 DoubleArray serviceTimeArray, DoubleArray readyTimeArray, DoubleArray demandArray, DoubleValue capacity, 50 D oubleMatrix coordinates, ILookupParameter<DoubleMatrix> distanceMatrix, BoolValue useDistanceMatrix) {50 DistanceMatrix distMatrix) { 51 51 TourEvaluation eval = VRPEvaluator.EvaluateTour(this, 52 52 dueTimeArray, … … 60 60 new DoubleValue(1), 61 61 new DoubleValue(1), 62 coordinates, 63 distanceMatrix, 64 useDistanceMatrix); 62 distMatrix); 65 63 66 64 return eval.Overload < double.Epsilon && eval.Tardiness < double.Epsilon; 67 65 } 68 66 69 public double GetLength(DoubleMatrix coordinates, 70 ILookupParameter<DoubleMatrix> distanceMatrix, 71 BoolValue useDistanceMatrix) { 67 public double GetLength(DistanceMatrix distMatrix) { 72 68 double length = 0; 73 69 … … 82 78 for (int i = 1; i < cities.Count; i++) { 83 79 length += VRPUtilities.GetDistance( 84 cities[i - 1], cities[i], coordinates, distanceMatrix, useDistanceMatrix);80 cities[i - 1], cities[i], distMatrix); 85 81 } 86 82 }
Note: See TracChangeset
for help on using the changeset viewer.