Network Analyst Vehicle Routing Problem Route Returned Results Order Distance ?

118
9
05-15-2018 03:44 PM
Highlighted
Occasional Contributor

After my analysis, I can obtain the routes' total distance traveled but I want to retrieve the actual order distance.

Tags (1)
Reply
0 Kudos
9 Replies
Highlighted
Esri Regular Contributor

"actual order distance"

Do you mean the distance between one order to the next? If yes, it is available in the Orders attribute table of the VRP analysis group layer.

Jay Sandhu

Reply
0 Kudos
Highlighted
Occasional Contributor

Yes, distance from one order to another, but only the actual serviced road segment.

I see the Orders cumulative distance  but not the  individual orders distance.

Reply
0 Kudos
Highlighted
Esri Regular Contributor

There are also FromPrevTravelTime and FromPrevDistance columns on the orders table besides the Cumulative ones.

Jay Sandhu

Reply
0 Kudos
Highlighted
Occasional Contributor

I have looked at those also and they will not produce what I am looking for.

Reply
0 Kudos
Highlighted
Esri Regular Contributor

What are you looking for? 

Jay Sandhu

Reply
0 Kudos
Highlighted
Occasional Contributor

Distance traveled for only on road segments that have orders.

Not counting the road segment again if need to traverse it again as part the route to get to next order.

Reply
0 Kudos
Highlighted
Esri Regular Contributor

Take a look at the GP tool Copy traversed Source Features.

You run this after you solve the VRP and it will write out all the edges that were traversed by all the routes. You can select only the ones that have orders on them. You can do this either by spatial select or perhaps using the FromPosition and ToPosition are not 0 or 1 (unless the order snapped to an end point). Once you have that edge, you can get the distance from a field like Attr_Meters.

Jay Sandhu

Highlighted
Occasional Contributor

I have generated edge and used that tool.

I will look into your suggestions.  Spatial select will not work for me since it may select the to and from route road segment. Essentially doubling the distance.  I will try the 0 and 1 approach. Fortunately, I don't have any orders on an endpoint.

Reply
0 Kudos
Highlighted
Occasional Contributor

This will not work.

Reply
0 Kudos