# All possible routes from point A to point B - how to generate?

1440
3
11-28-2012 09:39 AM
Occasional Contributor
Hello guys,

I need to generate all possible routes (means not only the shortest one) between to given points (A, B) within a given network dataset and produce an instruction for each a each of these routes.  Is it any way to do it with Network Analyst?

Anton
Tags (2)
3 Replies
New Contributor III
I'm not sure if there's a way to do all the possible routes.  But I do know that you can do the shortest distance and the shortest time.  It'll also produce a step-by-step turn/directions.
Regular Contributor III
Hi,

Why would you need to generate such a list of possible routes? Is there any particular application of the results you keep in mind? Are there any restrictions you have regarding the traversing road links (like if there is already one route traversing a certain link the next one cannot use it anymore and similar)? If not, the possible combination of routes will be extreme (think of a network dataset with n traversable edges - you can think that you will get something close to n! (e.g., n=10, n!=3628800 routes possible - just to give you a feeling) of possible routes particularly when the solver can go through the traversed edges either in the current solution or previous ones).

But if you have (or plan to implement) some logic regarding the solving, then you might actually get some relevant results.
Esri Regular Contributor
There can be an infinite number of paths between two locations on any reasonable size of network data. So you have to define what you really mean my ALL possible routes.

One way to generate different paths is to use the scaled line barrier concept. So you solve the route once to get the shortest path. Then use load locations to load the resulting route as a Line Barrier and set it as scaled cost with a scale of 1.1 (ten percent more) and re-solve. This will most likley give you a second path. You can repeate this process by changing the scaled cost to 1.2, then 1.3, etc. Once you are done with this, you can add on the second best path as an additional scaled cost and iterate over that. It can all be done in a model builder.

Jay Sandhu