VRP order priority with arcgis pro 2.6

494
2
Jump to solution
08-17-2020 03:20 AM
RimaRabinovich
Esri Contributor

Hi,

We have a potential client who wants to move to vrp solution (right now they are using some other, non Esri, technology).

The only functionality they can't seem to find is the option to prioritize some of the stops.

I was looking for a solution and found a few discussions :

VRP With Priority Stops (orders) 

Order Priority/sequence 

In one of them it was mentioned to use the Revenue field (didn't work for me),

another solution was solving the problem with 2 steps:

1. use AssignmentRule of "override"(3) to the prioritized stops,
and an AssignmentRule of "exclude"(0) to all the other stops,
then solve (this step makes a route only to the prioritized stops).

2. change the AssignmentRule of the prioritized stops to "Preserve route and relative sequence"(1)/"Preserve route"(2),

and an AssignmentRule of "override"(3) to all the other stops,
then solve.

The 2 step solution didn't work either -

if i'm assigning "Preserve route and relative sequence"(1) to the prioritized stops - solve returns an error.

if i'm assigning "Preserve route"(2) to the prioritized stops - the route is created but the stops are not prioritized - they are ordered one after another - but not in the beginning of the route.

another potential solution i found - was to assign to all the prioritized stops the AssignmentRule of "Anchor first" (4) 

but this option only takes one stop.

 

In a scenario where there are (for example) 40 stops , while 6 of them are in high priority and need to be reached first - what is the right way to generate a route?

* we would want the route between the 6 prioritized stops to be optimized as well.

I'm adding a shapefile layer that i used while trying to reach a solution.

Heather Moe

0 Kudos
1 Solution

Accepted Solutions
HeatherMoe
Esri Contributor

Hello Rima,

Interesting question, I would like to make sure I understand it correctly. By priority you are wanting to designate the set of orders that are visited before any other order on the route that it is assigned, there might be more than one of these high priority orders on a route, and it doesn't matter which route is servicing them just that they are first up in the day. Is that correct?

Assuming I have that correct, lets first recap the options you have looked into to give some explanation on each.

1. Revenue - The workflow that you mentioned for revenue is using a slightly different definition for priority. It is for when there are more orders in the problem then can be serviced by the routes available, then the high priority orders will be assigned to routes over lower priority ones. It however does not give preference to the timing of when those orders are visited, just that they are visited.

2. Preserve Route and Relative Sequence - This method would keep the orders towards the beginning of the route but it does allow for orders to be inserted in front of the first order or in between other orders, so it would not guarantee keeping the high priority orders at the very beginning of the route. I am concerned about you getting an error message for this assignment rule but not Preserve Route. If you do not think you should be getting the error message or it is not descriptive enough, we can try to work through that also or you can open a support ticket and we can dig into it more. 

3. Preserve Route - This again will just keep the orders on a specific route but does not give any preference to keeping them at the beginning.

4. Anchor First - This does keep the orders at the first of the route but as you have pointed out it only allows for one order per route so it doesn't quite fit what you are looking for with needing a few orders serviced at the very beginning.

An option I think will work for you is to put tight time windows on the orders that need to be visited before other orders on the routes. In your example if the four routes were to start at 8:00 am sharp then for the six orders that need to be serviced first, give them a time window between 8:00 and 8:10 am. As long as the max violation time is not set to 0, then the solver can visit these late but will try to meet the time windows as close as possible. Setting the Time Window Violation Importance parameter to High will make the "penalty" for the algorithm to visit these orders late even higher further incentivising visiting them first on the route. Based on your specific problem set up, such as service time and how far away orders are from the depot, you may need to adjust the time windows.

Hope this helps,

Heather

View solution in original post

2 Replies
HeatherMoe
Esri Contributor

Hello Rima,

Interesting question, I would like to make sure I understand it correctly. By priority you are wanting to designate the set of orders that are visited before any other order on the route that it is assigned, there might be more than one of these high priority orders on a route, and it doesn't matter which route is servicing them just that they are first up in the day. Is that correct?

Assuming I have that correct, lets first recap the options you have looked into to give some explanation on each.

1. Revenue - The workflow that you mentioned for revenue is using a slightly different definition for priority. It is for when there are more orders in the problem then can be serviced by the routes available, then the high priority orders will be assigned to routes over lower priority ones. It however does not give preference to the timing of when those orders are visited, just that they are visited.

2. Preserve Route and Relative Sequence - This method would keep the orders towards the beginning of the route but it does allow for orders to be inserted in front of the first order or in between other orders, so it would not guarantee keeping the high priority orders at the very beginning of the route. I am concerned about you getting an error message for this assignment rule but not Preserve Route. If you do not think you should be getting the error message or it is not descriptive enough, we can try to work through that also or you can open a support ticket and we can dig into it more. 

3. Preserve Route - This again will just keep the orders on a specific route but does not give any preference to keeping them at the beginning.

4. Anchor First - This does keep the orders at the first of the route but as you have pointed out it only allows for one order per route so it doesn't quite fit what you are looking for with needing a few orders serviced at the very beginning.

An option I think will work for you is to put tight time windows on the orders that need to be visited before other orders on the routes. In your example if the four routes were to start at 8:00 am sharp then for the six orders that need to be serviced first, give them a time window between 8:00 and 8:10 am. As long as the max violation time is not set to 0, then the solver can visit these late but will try to meet the time windows as close as possible. Setting the Time Window Violation Importance parameter to High will make the "penalty" for the algorithm to visit these orders late even higher further incentivising visiting them first on the route. Based on your specific problem set up, such as service time and how far away orders are from the depot, you may need to adjust the time windows.

Hope this helps,

Heather

RimaRabinovich
Esri Contributor

Thank you Heather,

The workaround you suggested seems to work.

We will offer that to our potential client.

Thank you,

Rima.

0 Kudos