Changeset 6854 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP
- Timestamp:
- 09/30/11 11:36:05 (13 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MDCVRP/MDCVRPEvaluator.cs
r6851 r6854 111 111 double overloadPenalty = cvrp.OverloadPenalty.Value; 112 112 113 costs += instance.GetInsertionDistance(insertionInfo.Start, customer, insertionInfo.End, solution); 113 double startDistance, endDistance; 114 costs += instance.GetInsertionDistance(insertionInfo.Start, customer, insertionInfo.End, solution, out startDistance, out endDistance); 114 115 115 116 double demand = instance.GetDemand(customer); -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MultiDepotVRPEvaluator.cs
r6851 r6854 81 81 double costs = 0; 82 82 feasible = true; 83 double startDistance, endDistance; 83 84 84 costs += instance.GetInsertionDistance(insertionInfo.Start, customer, insertionInfo.End, solution );85 costs += instance.GetInsertionDistance(insertionInfo.Start, customer, insertionInfo.End, solution, out startDistance, out endDistance); 85 86 86 87 return costs; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/MultiDepotVRP/MultiDepotVRPProblemInstance.cs
r6851 r6854 150 150 } 151 151 152 public override double GetInsertionDistance(int start, int customer, int end, IVRPEncoding solution) { 152 public override double GetInsertionDistance(int start, int customer, int end, IVRPEncoding solution, 153 out double startDistance, out double endDistance) { 153 154 if (start == 0) { 154 155 start = GetDepot(end, solution); … … 164 165 165 166 double distance = base.GetDistance(start, end, solution); 166 double newDistance = 167 base.GetDistance(start, customer, solution) + 168 base.GetDistance(customer, end, solution); 167 168 startDistance = base.GetDistance(start, customer, solution); 169 endDistance = base.GetDistance(customer, end, solution); 170 171 double newDistance = startDistance + endDistance; 169 172 170 173 return newDistance - distance;
Note: See TracChangeset
for help on using the changeset viewer.