コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }