public override bool IsAllowedMovement(TwoOneInterSwap m) { return(ProblemData.StrongReplaceOverload(m.current, m.orIndex, 2, new List <int> { m.deRoute[m.deIndex] }) <= epsilon && ProblemData.StrongReplaceOverload(m.deRoute, m.deIndex, 1, m.current.GetRange(m.orIndex, 2)) <= epsilon); }
public override bool IsAllowedMovement(InterSwap m) { if (m.deRoute.IsEmpty) { return(Math.Max(ProblemData.Clients[m.current[m.orIndex]].Delivery, ProblemData.Clients[m.current[m.orIndex]].Pickup) <= m.deRoute.Vehicle.Capacity); } return(ProblemData.StrongReplaceOverload(m.deRoute, m.deIndex, 1, new List <int> { m.current[m.orIndex] }) <= epsilon); }