- Timestamp:
- 10/11/12 10:55:42 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DynamicVehicleRouting/HeuristicLab.PDPSimulation/3.3/Optimizers/LocalUpdate/PriorityDispatching.cs
r8782 r8787 90 90 AppendAction(deliveryAction); 91 91 } 92 waitingOrders.Remove(pickedupOrder); 92 93 } 93 94 } … … 134 135 if (!IsPickup(o, instance)) target = new XY(o.DeliveryXCoord, o.DeliveryYCoord); 135 136 136 var destinationDifference = destinations.Select(x => scenario.DistanceMeasure.GetDistance( o.DeliveryXCoord, o.DeliveryYCoord, x.X, x.Y)).ToArray();137 var destinationDifference = destinations.Select(x => scenario.DistanceMeasure.GetDistance(target.X, target.Y, x.X, x.Y)).ToArray(); 137 138 var courierDifference = GetVehicles().Where(x => x != vehicle).Select(x => new XY(x.TargetPositionX, x.TargetPositionY)) 138 139 .Select(x => scenario.DistanceMeasure.GetDistance(target.X, target.Y, x.X, x.Y)).ToArray(); … … 159 160 variables.Add("MaximumDistanceToOtherCouriers", courierDifference.Any() ? courierDifference.Max() : 0); 160 161 variables.Add("DemandSize", o.Demand); 161 variables.Add(" Slack", o.DeliveryDueTime - GetSimulationTime()162 - (vehicle.ReadyTime + variables["Distance"] +163 (IsPickup(o, instance) ? (o.PickupServiceTime + scenario.DistanceMeasure.GetDistance(o.PickupXCoord, o.PickupYCoord, o.DeliveryXCoord, o.DeliveryYCoord)) : 0)));164 variables.Add(" EDD", commonDestinations.Any() ? commonDestinations.Min(d => d.DeliveryDueTime - GetSimulationTime()) : 0);162 variables.Add("EDD", commonDestinations.Any() ? commonDestinations.Min(d => d.DeliveryDueTime 163 - scenario.DistanceMeasure.GetDistance(vehicle.TargetPositionX, vehicle.TargetPositionY, d.DeliveryXCoord, d.DeliveryYCoord) 164 - GetSimulationTime()) : 0); 165 variables.Add("LeadTime", o.PickupReadyTime - GetSimulationTime()); 165 166 166 167 prio = … … 181 182 + weights[14] * variables["MaximumDistanceToOtherCouriers"] 182 183 + weights[15] * variables["DemandSize"] 183 + weights[16] * variables[" Slack"]184 + weights[17] * variables[" EDD"];184 + weights[16] * variables["EDD"] 185 + weights[17] * variables["LeadTime"]; 185 186 } 186 187
Note: See TracChangeset
for help on using the changeset viewer.