You can perform network analysis using the hierarchy of the network. The hierarchy classifies network edges into a given number of levels. Typically, there are three to five levels. A three-level hierarchy, for example, can be divided into the following categories represented by integers:
- Primary roads (freeways and limited-access highways)
- Secondary roads (major and arterial roads)
- Local roads (collectors and local streets)
Performing network analysis using a hierarchy uses a heuristic that reduces the computation time by limiting the search mostly to the higher levels of the hierarchy. For example, with a three-level hierarchy, only the local roads are considered in the immediate vicinity of the start and end of the route, and only the secondary roads are considered in the greater vicinity of the start and end of the route. Because most of the route only considers roads in the higher levels of the hierarchy, this may result in a solution with a slightly higher cost than if you were to solve the same problem without using the hierarchy.
Benefits of hierarchical network analysis
The following are advantages to using a hierarchical network analysis:
- It typically takes less time to compute a solution using a hierarchy. This time difference is especially noticeable when the network is large, your primary and secondary roads are thoroughly interconnected, and your stops are not clustered together on local roads.
- Driving directions for primary and secondary roads are often easier to follow, since street signs are more visible and there are fewer intersections.
- The results from a network analysis using a hierarchy can emulate the preference of drivers on the road. For example, truck drivers typically prefer routes on primary roads, since traveling on local roads increases the likelihood of difficult turning maneuvers and stopping, which consequently lowers their fuel efficiency and increases their emissions. Note that while a road in a higher level of hierarchy is more likely to be in the result of a hierarchical analysis, the road is not necessarily more favored by the solver than roads in the lower levels of the hierarchy.
Even when you have the option of performing a hierarchical analysis, you can choose to ignore hierarchies. You should base your decision on your data and your particular network problem. If you aren't sure, run the analysis with and without the hierarchy, compare the results, and decide which results are the best fit for you.
How hierarchy works
Hierarchical network analysis works by progressively reducing the number of roads to search to those in the higher levels of the hierarchy. The route solver begins by simultaneously traveling forward from the origin stop and backward from the destination stop. Local roads are searched until the best transitions to secondary roads are found, from which point only secondary and primary roads are searched. The solver continues on secondary roads until the best transitions to primary roads are found. The solver then only searches primary roads, ignoring roads in the lower hierarchical classes, until the path from the origin meets the path going backward from the destination, thereby connecting the origin and destination and finding a route.
The objective of the solver is to minimize impedance while favoring a higher order of hierarchy. The following graphic demonstrates how the hierarchical solver functions:
If you place a barrier on a route that uses hierarchy, the solver tries to find an alternate course by either temporarily descending the hierarchy and proceeding around the barrier or finding a different path—depending on which is shorter.
If the highway is disconnected, the route solver does not descend to the local street and connect. Instead, an error is returned. ArcGIS assumes that the highest order of hierarchy is connected.
All other network analysis layers, except service area, employ the hierarchical search method described above.
Use hierarchy in network analysis
You can enable hierarchies for each network analysis layer that you add by following these steps:
- Right-click the analysis layer and click Properties to open the layer properties page.
- Choose Travel Mode and expand the Advanced section.
- Check Use Hierarchy.
The solver uses the hierarchy ranges that are set at solve time. If you need to adjust the ranges that define the hierarchy attribute, see Hierarchy attribute to learn how to edit the ranges. Keep in mind that if your network dataset is read-only, you won't be able to change the hierarchy ranges.