Changeset 6855 for branches/VRP
- Timestamp:
- 09/30/11 12:55:55 (13 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPTW/MDCVRPTWEvaluator.cs
r6854 r6855 86 86 double spareCapacity = capacity - delivered; 87 87 88 double tourStartTime = vrptw.ReadyTime[depot]; 89 time = tourStartTime; 90 88 91 //simulate a tour, start and end at depot 89 92 for (int i = 0; i <= tour.Stops.Count; i++) { … … 131 134 time += currentServiceTime; 132 135 133 CVRPTWInsertionInfo stopInfo = new CVRPTWInsertionInfo(start, end, spareCapacity, arrivalTime, time, spareTime, waitTime);136 CVRPTWInsertionInfo stopInfo = new CVRPTWInsertionInfo(start, end, spareCapacity, tourStartTime, arrivalTime, time, spareTime, waitTime); 134 137 tourInfo.AddStopInsertionInfo(stopInfo); 135 138 } … … 199 202 if (index > 0) 200 203 time = (tourInsertionInfo.GetStopInsertionInfo(index - 1) as CVRPTWInsertionInfo).LeaveTime; 204 else 205 time = insertionInfo.TourStartTime; 206 201 207 time += startDistance; 202 208 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPPDTW/CVRPPDTWEvaluation.cs
r6752 r6855 41 41 } 42 42 43 public CVRPPDTWInsertionInfo(int start, int end, double spareCapacity, double arrivalTime, double leaveTime, double spareTime, double waitingTime, List<int> visited, double arrivalSpareCapacity) 44 : base(start, end, spareCapacity, arrivalTime, leaveTime, spareTime, waitingTime) { 43 public CVRPPDTWInsertionInfo(int start, int end, double spareCapacity, double tourStartTime, 44 double arrivalTime, double leaveTime, double spareTime, double waitingTime, List<int> visited, double arrivalSpareCapacity) 45 : base(start, end, spareCapacity, tourStartTime, arrivalTime, leaveTime, spareTime, waitingTime) { 45 46 this.visited = visited; 46 47 this.arrivalSpareCapacity = arrivalSpareCapacity; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPPDTW/CVRPPDTWEvaluator.cs
r6851 r6855 75 75 int pickupViolations = 0; 76 76 77 double tourStartTime = readyTime[0]; 78 time = tourStartTime; 79 77 80 //simulate a tour, start and end at depot 78 81 for (int i = 0; i <= tour.Stops.Count; i++) { … … 130 133 131 134 double spareCapacity = capacity - currentLoad; 132 CVRPPDTWInsertionInfo stopInfo = new CVRPPDTWInsertionInfo(start, end, spareCapacity, arrivalTime, time, spareTime, waitTime, new List<int>(stops.Keys), arrivalSpareCapacity); 135 CVRPPDTWInsertionInfo stopInfo = new CVRPPDTWInsertionInfo(start, end, spareCapacity, tourStartTime, 136 arrivalTime, time, spareTime, waitTime, new List<int>(stops.Keys), arrivalSpareCapacity); 133 137 tourInfo.AddStopInsertionInfo(stopInfo); 134 138 … … 215 219 if (index > 0) 216 220 time = (tourInsertionInfo.GetStopInsertionInfo(index - 1) as CVRPTWInsertionInfo).LeaveTime; 221 else 222 time = insertionInfo.TourStartTime; 223 217 224 time += instance.GetDistance(insertionInfo.Start, customer, solution); 218 225 if (time > dueTime[customer]) { -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWEvaluation.cs
r6752 r6855 29 29 namespace HeuristicLab.Problems.VehicleRouting.ProblemInstances { 30 30 public class CVRPTWInsertionInfo : CVRPInsertionInfo { 31 private double tourStartTime; 32 33 public double TourStartTime { 34 get { return tourStartTime; } 35 } 36 31 37 private double arrivalTime; 32 38 … … 53 59 } 54 60 55 public CVRPTWInsertionInfo(int start, int end, double spareCapacity, double arrivalTime, double leaveTime, double spareTime, double waitingTime)61 public CVRPTWInsertionInfo(int start, int end, double spareCapacity, double tourStartTime, double arrivalTime, double leaveTime, double spareTime, double waitingTime) 56 62 : base(start, end, spareCapacity) { 63 this.tourStartTime = tourStartTime; 57 64 this.arrivalTime = arrivalTime; 58 65 this.leaveTime = leaveTime; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWEvaluator.cs
r6851 r6855 82 82 double spareCapacity = capacity - delivered; 83 83 84 double tourStartTime = readyTime[0]; 85 time = tourStartTime; 86 84 87 //simulate a tour, start and end at depot 85 88 for (int i = 0; i <= tour.Stops.Count; i++) { … … 119 122 time += currentServiceTime; 120 123 121 CVRPTWInsertionInfo stopInfo = new CVRPTWInsertionInfo(start, end, spareCapacity, arrivalTime, time, spareTime, waitTime);124 CVRPTWInsertionInfo stopInfo = new CVRPTWInsertionInfo(start, end, spareCapacity, tourStartTime, arrivalTime, time, spareTime, waitTime); 122 125 tourInfo.AddStopInsertionInfo(stopInfo); 123 126 } … … 186 189 if (index > 0) 187 190 time = (tourInsertionInfo.GetStopInsertionInfo(index - 1) as CVRPTWInsertionInfo).LeaveTime; 191 else 192 time = insertionInfo.TourStartTime; 193 188 194 time += instance.GetDistance(insertionInfo.Start, customer, solution); 189 195 if (time > dueTime[customer]) {
Note: See TracChangeset
for help on using the changeset viewer.