Vehicle Routing Problem using coordinates

1016
2
Jump to solution
07-30-2018 12:17 PM
GrahamMelville1
New Contributor

Hey guys,

So I'm attempting to do a VRP to calculate travel time using patients and clinics as ordered pairs. By this I mean I have an excel document where each row contains two pairs of coordinates: the coordinates of the location of the patient (origin) as well as the coordinates of the clinic (destination)

In Arcgis's tutorial for a very similar problem, they use geocoded addresses, which are located in a singular field in the excel table. However for my problem I have two fields for both the origin and destination; latitude and longitude. I've tried to fiddle around with the location analysis properties but I can't seem to figure it out. I know that my network dataset is functional because I've used it to solve an OD cost matrix. 

Any tips would be greatly appreciated!

0 Kudos
1 Solution

Accepted Solutions
JaySandhu
Esri Regular Contributor

You can use the Make XY Event Layer tool to convert the location fields into a feature layer. See this for more information: Make XY Event Layer—Help | ArcGIS Desktop 

If you have two sets of x,y fields, then use the tool twice to convert into two feature layers. Now you can load them one by one into a network analysis layer with the Add Locations tool.

If your goal is to find the path between these two pairs, then you are not really solving the Vehicle Routing Problem ( VRP). What you should use is the Route solver. Load the two sets as Stops with a common ID as the ROUTENAME property. Now when you solve the route layer, it will solve all the route pairs as single paths. You can read more on routename property on the Route solver help: 

Make Route Layer—Help | ArcGIS Desktop 

and 

Route analysis—Help | ArcGIS Desktop 

Jay Sandhu

View solution in original post

2 Replies
JaySandhu
Esri Regular Contributor

You can use the Make XY Event Layer tool to convert the location fields into a feature layer. See this for more information: Make XY Event Layer—Help | ArcGIS Desktop 

If you have two sets of x,y fields, then use the tool twice to convert into two feature layers. Now you can load them one by one into a network analysis layer with the Add Locations tool.

If your goal is to find the path between these two pairs, then you are not really solving the Vehicle Routing Problem ( VRP). What you should use is the Route solver. Load the two sets as Stops with a common ID as the ROUTENAME property. Now when you solve the route layer, it will solve all the route pairs as single paths. You can read more on routename property on the Route solver help: 

Make Route Layer—Help | ArcGIS Desktop 

and 

Route analysis—Help | ArcGIS Desktop 

Jay Sandhu

GrahamMelville1
New Contributor

Hello Jay,

This is exactly what I needed, the routename guidance was the trick. Thanks so much for a easy to read and quick guide! much appreciated