- Timestamp:
- 09/29/11 15:51:56 (13 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/GVR
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/GVR/Crossovers/GVRCrossover.cs
r4752 r6851 82 82 for (int i = 1; i <= ProblemInstance.Cities.Value; i++) { 83 83 if (!subroute.Contains(i)) { 84 double distance = ProblemInstance.GetDistance(subroute[0], i );84 double distance = ProblemInstance.GetDistance(subroute[0], i, child); 85 85 86 86 if (customer == -1 || distance < minDistance) { -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/GVR/GVREncoding.cs
r4752 r6851 42 42 double currentDemand = 0; 43 43 44 DoubleArray demand = ProblemInstance.Demand;45 44 DoubleValue capacity = new DoubleValue(double.MaxValue); 46 45 if (ProblemInstance is IHomogenousCapacitatedProblemInstance) { … … 50 49 51 50 foreach (int city in tour.Stops) { 52 currentDemand += demand[city];51 currentDemand += ProblemInstance.GetDemand(city); 53 52 54 53 if (currentDemand > capacity.Value) { … … 58 57 newTour = new Tour(); 59 58 newTour.Stops.Add(city); 60 currentDemand = demand[city];59 currentDemand = ProblemInstance.GetDemand(city); 61 60 } else { 62 61 newTour.Stops.Add(city);
Note: See TracChangeset
for help on using the changeset viewer.