Changeset 6569 for branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Tour.cs
- Timestamp:
- 07/17/11 22:51:11 (13 years ago)
- Location:
- branches/QAPAlgorithms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/QAPAlgorithms
- Property svn:ignore
-
old new 12 12 *.psess 13 13 *.vsp 14 *.docstates
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.VehicleRouting merged: 6441,6448-6450,6455,6459,6491,6522-6523,6548
- Property svn:mergeinfo changed
-
branches/QAPAlgorithms/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Tour.cs
r5445 r6569 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.