public override bool IsAllowedMovement(InterMove m) { double delivery = ProblemData.TotalDelivery(m.deRoute) + ProblemData.Clients[m.current[m.orIndex]].Delivery; double pickup = ProblemData.TotalPickup(m.deRoute) + ProblemData.Clients[m.current[m.orIndex]].Pickup; return(Math.Max(delivery, pickup) <= m.deRoute.Vehicle.Capacity); }
public override bool IsAllowedMovement(InterMove m) { double maxDemand = Math.Max(ProblemData.TotalPickup(m.deRoute) + ProblemData.Clients[m.current[m.orIndex]].Pickup, ProblemData.TotalDelivery(m.deRoute) + ProblemData.Clients[m.current[m.orIndex]].Delivery); if (maxDemand <= m.deRoute.Vehicle.Capacity) { return(true); } return((maxDemand - m.deRoute.Vehicle.Capacity) / m.deRoute.Vehicle.Capacity < WeakThreshold); }
public override bool IsAllowedMovement(InterMove m) { return(ProblemData.StrongAddOverload(m.deRoute, m.deIndex, new List <int> { m.current[m.orIndex] }) <= epsilon); }