Select to view content in your preferred language

VRP - Solving a problem for stores in predefined Territories for a sales rep

296
2
01-17-2024 10:11 AM
ZeminDhanani
New Contributor II

I am using VRP to plan out routes that will help sales reps cover each store in their territory

Context:

  • We have preidentified territories for reps (shown below) that range 13 to 18 stores and the rep location (larger point). 
  • ZeminDhanani_0-1705514210967.png

     

  • Each rep needs to cover stores in their territory and spend 60 mins (service time) at a store 
  • As all stores cannot be covered in a day, the solution needs to be achieved over a few days
  • The reps cannot work more than 8 hours which means a MaxTotalTime of 480 per day
  • They then need to take a break of 16 hours (960 mins) before they can start proceeding on the route

Orders:

  • I have loaded Orders and assigned a set RouteName. This is based on the territory they fall in.
  • I have set a AssignmentRule of Preserve Route and assigned random sequence (as it is required)

Depots:

  • I then loaded the depot, which is the starting location of the rep

Routes:

  • I added 6 routes for the 6 territories and the 6 reps and specified the starting and ending depot to be the same (needs to return to home location)
  • I specified a MaxOrderCount of 18
  • I intentionally left MaxTotalTime as Null. The reason being I am not sure how many breaks will be required and how much time is needed to complete the whole route. There is also no hard requirement for MaxTotalTime

Breaks:

  • As the rep can work a maximum of 480 mins and then must take a break, I am using Maximum-work time break 
  • As there may be more than one break needed, I have to specify multiple breaks for the same route and set precedence. For example, for Route1 the first break will have a Maximum-work time of 480 and a break duration of 960, the second one will be Maximum-work time of 1920 (480 mins day 1 work + 960 day1 break + 480 day 2 work) and break duration of 960

Question:

  1. Is my approach correct? I know this method does not have the rep return home after a days of work. Is there a way to make this possible?
  2. Am I using the break times in the right way, especially the second break on the same route?
2 Replies
ZeminDhanani
New Contributor II

Update: As you can see in the screenshot below, breaks are currently being taken at random locations on the route. Is there a way for me to have the route go back to home location when it is almost the end of 480 mins of work. Then start the next day from the home location?

ZeminDhanani_0-1705594643417.png

I guess I can do this by using sequence under the order and breaks feature class, but the issue is this becomes very manual driven. 

I think it would be a good enhancement to have an option to return to home location when solving VRP. @MelindaMorang @HeatherMoe 

0 Kudos
HeatherMoe
Esri Contributor

Since you are wanting the drivers to return home each day, I would suggest a different set up using multiple routes for each driver instead of breaks. 

To designate the territories you have two options, you can use specialties or Route Zones. Either will allow you to keep the drivers to going only to the appropriate locations. (Of course since there is no overlap between orders being serviced by different drivers you could also separate them into different solves all together. 

For each drive you would create multiple routes for the different days they would drive starting and ending at their home location for each route. These could be designated as Zemin_Monday and Zemin_Tuesday for example. They would have the MaxTotalTime constraint of 480 minutes. This will allow the orders to be separated into different day's worth of work an make loops back to the home location instead of a long string of orders leaving the driver at some random location. 

0 Kudos