Model Builder of VRP Network Analyst

1889
8
08-23-2016 07:21 PM
ArturKochanczyk
New Contributor

I have developed a model builder calculating an efficient routes for all my 20 units.

Each truck is visiting/watering approx. 80-85 trees every day.

I have 45 fill up stations located throughout the entire city.

The system is preventing me from assigning all those 45 sites (is crashing after reaching 770-790 records in the table) to each truck and what I have done is to manually assign 7-8 random sites to each truck. This results with routes where the start point (fill up station) is located far away from the first tree that has been assigned to the route and in the meantime there is another at least one fill up station that is located closer although this fill up station has not been assigned to this route therefore the system is ignoring it.

The idea would be to calculate all the routes, then run some sort of analysis and assign start point to each truck based on the closest location and then re-run again. I/m not even sure whether this is doable and if it is how to approach this.

If someone would have any feedback/comments that would be greatly appreciated.

Thank you,

Artur

Tags (1)
0 Kudos
8 Replies
HeatherMoe
Esri Contributor

Interesting problem... I have a few questions for you.  What are you doing for the starting depot of the routes? Are they starting at each drivers home location? Or some central spot to pick up the trucks?  

Have you gotten the problem to work outside of Model Builder?

Heather

0 Kudos
ArturKochanczyk
New Contributor

Hi Heather,

Thank you for your reply. Now I'll try to answer your question.

Technically all trucks start from one central location (contractor's head office) but none of them gets paid until they arrive at the assigned specific fill up site/start depot where they fill up their tank with water and then follow the route and start watering trees assigned to the route.

So from the VRP perspective the starting point for each truck has a different location.

I'm not sure how to even try to overcome this problem outside the model builder

Thank you,

Artur

0 Kudos
HeatherMoe
Esri Contributor

Hi Artur,

Thanks for the information.  I'll split my comments into two sections.  The first a little about how to set it up outside of model builder and the second a way to separate the problem to help you with the original question of how to work around the model builder issue.  I don't have a good reason for model builder to crash with 45 renewal locations for 20 vehicles, it should be able to handle this and so I'll look into it and see if I can reproduce it here.

For running outside of model builder, you can create a VRP layer in ArcMap.  To do this drag your network data set into the map and then from the network analyst tool bar you can click on the network analyst drop down and select New Vehicle Routing Problem.  This will create the VRP layer for you.  If the network analyst window doesn't open up for you their is a little button on the tool bar to open it.  From here you right click on the different feature classes that you add though the model builder in that list is something called "Load Locations."  This opens up a dialog for you to interact with and you can point to the same table that you use for model builder here.  Once you have all of the different fields inputs (I'm guessing Orders, Depots, Routes, and Route Renewals) then you can hit the solve button on the network analyst toolbar.  Let me know if once things are set up if it still will not handle all 45 renewal locations.

Here is a link to the VRP ArcMap tutorial: Exercise 7: Servicing a set of orders with a fleet of vehicles—Help | ArcGIS for Desktop    It doesn't have route renewals but it could help you get started.

Now on to a Model Builder work around idea...  You mention in the original question that you manually assign 7 or 8 renewal locations to the routes  but that it doesn't produce good results.  Instead of randomly assigning them I would suggestion looking at the renewal locations and trying to assign them in groups.  So if you divided your service area up into a 3 x 3 grid and assigned the renewal locations that are within each block to a vehicle.  You could then create some areas that overlap between "blocks" and assign those renewal locations to vehicles.  If an area has a dense set of order locations assign more vehicles to renewal locations that match the block of town.  The VRP solver should do a pretty good job of clustering the orders assigned to a vehicle so that it is in the same rough geographic region so if you cluster the renewal locations to vehicles it should then assign those vehicles to the right grouping of orders to not have a long drive to a renewal.  

A second thought is that if you are able to load 700 records within model builder that would come out to 35 renewal locations per vehicle (assuming 20 routes).  You could then partition the service area again similarly leaving off a few in the periphery and different ones for different vehicles and have more freedom of choice for the solver on renewal locations for each route.

Hope that helps some and let me know if you have more questions.

Heather 

0 Kudos
ArturKochanczyk
New Contributor

Hi Heather,

Thank you for your answer. Yes, you are right saying that the there is no good reason for a model builder to crash with 45 renewals and 20 vehicles, I guess I did not explain my challenge properly and I'll try again:)

I have 20 vehicles and they all need to be in service for 4 days a week, that gives us the following:

20 water trucks running 4 days a week x (multiplying by) 45 renewal sites x (multiplying by) 4 days a week = 3600 records.  Technically I should have said that I don't have 20 trucks, I have 80 trucks from the VRP perspective.

I have one more question: I have tried multiple different scenarios and I know that at this point having only 20 water trucks and approx. 7000 trees requiring watering every week I just don't have sufficient resources to meet that requirement.  What I have been doing is using overtime on their last day of work and letting every truck to work max 1500 mins. Sometimes my final results are interesting, quite often I would have empty schedules (truck does not work on that day) for some of the trucks during the first three days and then on the last of the work most or all would be on over time. I'm not sure if there is a way that I could prioritize and tell the system to run all the trucks for the first three days and then any remaining trees assign on their last fourth day.

Sometime this week I'll send you my model builder and more detailed info.

I just want to say thank you again for your support, I really appreciate it.

Artur 

0 Kudos
HeatherMoe
Esri Contributor

Hi Artur,

For the routes that are designated for the last day along with changing the max total time try adding in a OvertimeStartTime that corresponds with the time your day usually ends and make the OvertimeCost double or triple your CostPerUnitTime.  This will give a higher penalty for running late on the last day which will make the solver favor not using overtime but will still allow it when necessary.

If you are wanting to front load those first three days a bit more then you could increase the CostPerUnitTime a little for the routes on that last day along with the overtime change.

Heather Moe

0 Kudos
ArturKochanczyk
New Contributor

Hello again,

It's been a while since I posted last time. I have a question.

Is there a way to prioritize the orders, in my specific scenario I have trees that have been planted in 2014, 2015, and 2016.

MY highest priority are recently planted trees 2016, lower priority trees planted in 2015, and the lowest trees planted in 2014.

How can I force the VRP to assign/visist first 2016 trees, then 2015, and finally 2014trees ?

I would appreciate any comment/feedback.

Thank you,

Artur

0 Kudos
HeatherMoe
Esri Contributor

Hello Artur,

You can use revenue to give the trees priority.  So for your 2016 trees (High priority) give them a revenue of 10, your 2015 trees (middle priority) a revenue of 5 and your 2014 trees (low priority) a revenue of 1.  Try this out and see how the results look for you.  Depending on how you have the rest of it modeled you might need to changed things a little so play around with the number some.  Priority works best when you have a max of three levels modeled so don't get too carried away with different revenue values.

What version of the software are you using?  We made some updates in 10.5 to better support this.

Thanks,

Heather 

ArturKochanczyk
New Contributor

Hi Heather.

It's 10.3. Thank you for your advice, I'll play with this and let you know result.

Thank you,

Artur

0 Kudos