Select to view content in your preferred language

Do VRP service AssignmentRule parameter values 1 and 2 differs?

670
1
04-24-2017 01:37 PM
GERKUSLLC
Deactivated User

   Hi, 

   By testing VRP service API, I've stumbled upon a small problem.

   To submit a optimization job to VRP service you need to provide some order parameters and among those parameters there's parameter named 'AssignmentRule'. 

   As per API description after mentioned parameter:

  • 1 (Preserve route and relative sequence) - The service must always assign the order to the preassigned route and at the preassigned relative sequence when finding the solution. If this assignment rule can't be followed, it results in an order violation.

    With this setting, only the relative sequence is maintained, not the absolute sequence. To illustrate what this means, imagine there are two orders: A and B. They have sequence values of 2 and 3, respectively. If you set their AssignmentRule attribute value to 1, A and B's actual sequence values may change in the solution because other orders, breaks, and depot visits could still be sequenced before, between, or after A and B. However, B cannot be sequenced before A.

  • 2 (Preserve route) - The service must always assign the order to the preassigned route when finding the solution. A valid sequence must also be set even though the sequence may or may not be preserved. If the order can't be assigned to the specified route, it results in an order violation.

   So as example, we have two orders in same route:

      Order 1 - has delivery times from 10:00 to 12:00 and it's sequence no.: 3

      Order 2 - has delivery times from 06:00 to 08:00 and it's sequence no.:10

   (All route and depot parameters are correct in this case)

   So by logic, if we supply for both of these orders with AssigmentRule parameter, which equals 1 (Preserve route and relative sequence) - VRP service in return will fail as Order 2 cannot be delivered after Order 1, because it's delivery interval is less than Order 1 delivery interval. VRP service will optimize route only when we swap sequence numbers of orders or otherwise make Order 2 sequence number lesser than Order 1 (in example - 2).

   And there's problem I've stumbled upon. We can use same example as before, but let's change AssigmentRule parameter to '2'. As I can understand by description in API, VRP service should return result in which, Order 2 should be delivered before Order 1. It does't matter by what sequence orders were supplied, service will take and rearrange them by how it deems necessary, without paying attention to supplied sequence numbers as with AssigmentRule parameter '2'. But the problem is - VRP service optimization fails and orders are optimized only when Order 2 has lower sequence number than Order 1. 

   Is it bug, can someone check? Or is it something that I just don't understand ?

 Help would be appreciated.

0 Kudos
1 Reply
AnuranjanaNand
Deactivated User

Hi,

With the refrence to your question, when you created the model builder what did you do in the route box.

I am working with vrp currently, facing numerous problems.

0 Kudos