Network Analyst Vehicle Routing Problem Route Returned Results Order Distance ?

899
9
05-15-2018 03:44 PM
DevinUnderwood2
Occasional Contributor

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

Tags (1)
0 Kudos
9 Replies
JaySandhu
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

0 Kudos
DevinUnderwood2
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.

0 Kudos
JaySandhu
Esri Regular Contributor

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

Jay Sandhu

0 Kudos
DevinUnderwood2
Occasional Contributor

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

0 Kudos
JaySandhu
Esri Regular Contributor

What are you looking for? 

Jay Sandhu

0 Kudos
DevinUnderwood2
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.

0 Kudos
JaySandhu
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

DevinUnderwood2
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.

0 Kudos
DevinUnderwood2
Occasional Contributor

This will not work.

0 Kudos