Second shortest path

1915
4
03-22-2011 07:58 AM
Highlighted
New Contributor
Is any option in Network Analyst to create not only the shortest path between points, but also second and third shortest path?
Tags (2)
Reply
0 Kudos
4 Replies
Highlighted
Esri Regular Contributor
Can you describe what would be an acceptable second or third shortest path for your application?

Jay Sandhu
Reply
0 Kudos
Highlighted
New Contributor
As a second/third shortest path I mean a route between my points, which is a little longer than the standard shortest path. I would like to be able to prepare 3 possible routes connecting my points, where I can say something like: you can go from point A to point B by route 1 and this will take 5 minutes, by route 2 and this will take 6 minutes or by a route 3 and this will take 7 minutes.
Reply
0 Kudos
Highlighted
Esri Regular Contributor
You can do this by a simple process:
First solve the shortest path between the two locations.
Save/export the results.
Now in the NA Window, right click on the Line Barriers and select Load Locations
In the "Load From:", pick the existing route layer's Routes sub layer and click OK.
The current shortest path will now be loaded in as restriction!
Double-click on the newly added line restriction to open it's properties.
Change the "BarrierType" from Restriction to Scaled Cost and in the next column,
some thing like Attr_Time (or what ever your impedance attribute was), change the value to be 1.2
Solve. You should get a new path. Save/export this.
Now repeate the above process to load the new path as a scaled cost restriction and solve again.

The 1.2 means you are penalizing the current path by 20 percent. So it may find another path.
You can change the penalty factor as needed for your area. e.g., 1.1 may work better.

So what we did was to use the existing shortest path to penalize the underlying roads a little bit and force the solver to find an alternate solution.

Regards,
Jay Sandhu
Reply
0 Kudos
Highlighted
New Contributor
Thank you. I hoped for some out of the box solution, but this will also work for me.
Reply
0 Kudos