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);
        }
示例#2
0
        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);
        }
示例#3
0
 public override bool IsAllowedMovement(InterMove m)
 {
     return(ProblemData.StrongAddOverload(m.deRoute, m.deIndex, new List <int> {
         m.current[m.orIndex]
     }) <= epsilon);
 }