Select to view content in your preferred language

Network Analyst Sequencing Question

2949
7
08-16-2010 01:16 PM
PageWeil
Emerging Contributor
I have a series of collection routes that I am analyzing both in their current state and in a modified state.  The locations of the new points is governed by other factors not related to the network itself.  These locations are calculated within a model and I want to update and test the drive times required for each new case.  I have a few questions about how to analyze this network:

1.  I have a sheet that documents the order that stations are currently visited by the collectors.  How do I assign a specific sequence to a route?  The sequence is stored as a field in the point file.

2.  How can I use modelbuilder to automatically output statistics (like overall travel times per route) to a table? 

Thanks

Page
Tags (2)
0 Kudos
7 Replies
DeeleshMandloi
Esri Contributor


1.  I have a sheet that documents the order that stations are currently visited by the collectors.  How do I assign a specific sequence to a route?  The sequence is stored as a field in the point file.


When you load your stations as stops in route analysis layer, make sure that you use the Sort Field as the field containing the sequence from your point file. This will ensure that the stations are loaded in the sequence that you have specified from your field. You should also make sure that the route analysis layer is NOT set to reorder stops.


2.  How can I use modelbuilder to automatically output statistics (like overall travel times per route) to a table? 

In Model builder once you solve the route layer using the Solve Tool, make sure to use the Select Data tool to get the Routes sub-layer from the route analysis layer. The output of select data tool is a feature layer so it can be used with any other geoprocessing tools that take feature layers as input such as Summary Statistics tool that you may want to use.

Hope this helps
Deelesh
0 Kudos
PageWeil
Emerging Contributor
Deelesh

I got the station ordering problem to work but the solution to the table select problem eluded me for a while.

No matter what combination of functions I used in tandem with the "Select Data" tool, I could not get the Routes shape from the Network to output.  I ended up using "Select Layer by Attribute" followed by "Select" to get the proper output.  The directions in the ESRI helpfile on how to do this properly did not work.  I repeatedly got the error that the dataset I was trying to copy was not a feature class and could not be copied.

Anyway, I got it working and thank you for your help.

Page
0 Kudos
DeeleshMandloi
Esri Contributor
Page,

I could not get the Routes shape from the Network to output

Are you trying to output the individual streets that make up a route? Or you just want to export the entire route to a different feature class?

If you trying to export the the routes to a different feature class, see the attached model. This runs fine on my machine.

Can you post a screenshot of your model?

Deelesh
0 Kudos
PageWeil
Emerging Contributor
How do you get the Network Analyst to use the sequence you specify in a Vehicle Routing Problem layer?  I can get the routes to show up in the Route Analysis layer, but I can't get them to start and finish at a single depot like I can in the VRP.

I need to use a specified route sequence from a regularly relocated depot and need to know which tool to use short of hard-coding the depot's location into the Stops sublayer within the Route Analysis layer.

Thanks again for your help

Page
0 Kudos
DeeleshMandloi
Esri Contributor
How do you get the Network Analyst to use the sequence you specify in a Vehicle Routing Problem layer? I can get the routes to show up in the Route Analysis layer, but I can't get them to start and finish at a single depot like I can in the VRP.


I am curious why you need to load the sequence from the VRP layer into a route layer? In your VRP layer properties, on the Analysis tab, if you specify the output shape type to True Shape or True Shape with Measures, the VRP solver will produce the route shapes that follow the underlying streets. This result is identical to what you will get if you load all the orders and depots from the VRP layer to a Route layer and solve.


I need to use a specified route sequence from a regularly relocated depot and need to know which tool to use short of hard-coding the depot's location into the Stops sublayer within the Route Analysis layer.


I am not clear what you wish to achieve here. I apologize, but if you can provide me with some more details, I may be able to provide you with a correct answer.

Deelesh
0 Kudos
PageWeil
Emerging Contributor
What I am trying to do is evaluate the difference between one currently-used set of data collection routes (that all originate at a single depot) and a new set of data collection routes that are optimized using Network Analyst.  I need to output the total accumulated minutes per collection route for both the current routes and the optimized network so I can show a time savings.

The problem I am running into is that I can't find a way to calculate the baseline road network. 
1.  If I use a "Routes" layer, that will give me the total time traveling between the data collection points, but I can't specify a single depot as the origin of all these routes.
2.  If I use a "Vehicle Routing Problem" layer, I can select a single Depot as the origin of every route but I can't specify the order I want gauges visited.
0 Kudos
DeeleshMandloi
Esri Contributor
Page,

   Thanks for providing more information about your workflow. You can use the VRP solver to determine the costs for both sets of routes (existing and optimized). Each order in the VRP layer has an Assignment Rule property which has the default value of Override. This means the solver will determine which route and at what sequence this order will be placed. However You can change this assignment rule to "Preserver Route and Relative sequence". This will ensure that the VRP solver will not change the sequence and the routes of your orders as long as the sequence does not violate some fundamental constraint.
     For your case, to get the total cost for existing  and optimized routes,

  1. Create a VRP layer.

  2. Load your depot and create the necessary routes. Make sure to set the Start Depot and End Depot property for each of your routes.

  3. Now load all the orders using your sequence field as Sort Field and If all orders belong to a single route, make sure to specify the RouteName property for orders.

  4. Since your routes start at a depot, your first order will have a sequence of 2 and so on. If your existing sequence field does not account for this shift in order sequence by 1, Open the attribute table for orders, right-click the Sequence field and use the expression [Sequence] + 1.

  5. Next you should set the Assignment rule for your Orders to "Preserve Route and Relative Sequence". This can be done by calculating the Assignment Rule field to value 1.

  6. Now if you solve the VRP layer should get the total cost with the specified sequence.

  7. To get the optimized routes, make a new copy of the exiting VRP layer (you can Copy/Paste the layer in ArcMap) and just change the AssignmentRule on your orders to Override (value = 3) and solve.


Let me know if this works.
Deelesh
0 Kudos