Multiple Routes Output

350
4
09-25-2011 03:28 PM
Highlighted
New Contributor
Hello,

I am using Network Analyst to determine to create a route from Point A (the source) to destination Points B, and C.

I would like to find out how many destination points each line segment is approaching. So for example, if you picture a Y with Point A at the bottom, Point B at the top left and Point C at the top right, I would like to return the bottom segment of the Y (or the stem of the Y) with an attribute of 2 and each of the top parts of the Y (the "\" and "/") would be attributed with a 1. Does anyone know of a good way to do this?

Thanks for any help.

Jared
Tags (2)
Reply
0 Kudos
4 Replies
Highlighted
Esri Regular Contributor
You can create a route layer and load it with pairs of stop, A to B and A to C using the ROUTENAME property so that you will have two routes solved in one route layer (you can load more stop sets).
Now when you solve, you will get two routes, A to B and A to C.  You can then run this addin
http://resources.arcgis.com/gallery/file/ArcObjects-.NET-API-Code-Gallery/details?entryID=C8A2186E-1...
to create a line feature class from the "traversal" which is kept in memory. That is, it will add a Lines feature class that has every edge traversed per route. Now you can open the Line attribute table and the EID column contains the ID of the Edge traversed. Right-click on this field and choose "Summerize" and it will create a dbf file with each edge and how many times it was traversed by the routes.

Jay Sandhu
Reply
0 Kudos
Highlighted
New Contributor
Jay,

Thanks for your help. I played around with this and it looks like I was able to get the add in to work. I am having a little trouble with the route name. I am not totally sure how to use this for the application. If I understand correctly, where the routename attribute is the same, ESRI creates a new route. The problem I am having is that the first point is going to be used as the start for every route, so Point A would be the start for the route going to Point B and for the route going to Point C. Is there a way to assign Point A to both the route that goes to Point B and the route that goes to Point C? Also, I am looking at using a traveling salesman approach to a more complicated form of this example. Is this going to keep other stops in mind when creating the route to each point?

Thanks again for your help.

Jared
Reply
0 Kudos
Highlighted
Esri Regular Contributor
You will have to have Stop A repeate as many times as your application requires. So either Load it in multiple times,
or load it once (first stop) and copy/paste it in many times and then set the Routename field (calc) to the ObjectID.
Now you can load your stops B, C, etc with routename 1, 2, 3, etc and things will all match up.

If you need to use traveling salesman, where you will have multiple sets of stops per route, each starting with A, then load as above and on the Route properties, Analysis Settings tab, check on "Reorder Stops To Find Optimal Route" and un-check the "Preserve Last Stop". This way, the first Stop A for each unique Routename will be the starting stop and the rest of the stops in that route will be re-ordered for optimal sequence.

Jay Sandhu
Reply
0 Kudos
Highlighted
New Contributor
Jay,

Great. That helps a lot. Thank you very much.

Jared
Reply
0 Kudos