I want to know a way where the Hierarchy in my network analyst doesn't influence that much.

What happens is that when making shortest route it makes a 25-mile route, with the hierarchy it chooses to make a 40-mile route, choosing a principal road that goes a lot further than I need.

How can I make my Hierarchy more customizable, so it picks the better roads but without making so larger routes?

  • 1
    What are your hierarchy values, and what are they on those two roads? – Midavalo Nov 20 '17 at 3:09

Cost in Network Analysis is a way to set costs for each hierarchy level of segments. If you want to learn how to use cost in a network practically, follow the Network Analyst Tutorial. Download tutorial data. An example of what you want can be found in "Workflow" folder,"OfficeBuilding" geodatabase. In this geodatabase:

  • Open Transportation dataset.

  • Double click to the Transportation_ND. Go to the Attribute tab.

enter image description here

  • In the Attribute tab double click "WalkTime" (Walk time is a sample of cost in Network).

  • In the "Evaluators" window double click to the "FloorTransitions".

enter image description here

Ok.You need to use script to cost each of levels. Suppose your Hierarchy field name is "Type" and "1" means "Highways".

If [Type] = 1 Then
    N = 1 
If .... Then 
   N = ...

   result = N+5

Simple solution of using cost:

  1. Create a new Field in the network, named HiCost (Feel free to name this field).
  2. Calculate the costs of each hierarchy level in the field. ex: set 5 for all highways. 3 for all mainstreets and ... .
  3. Create a Cost with Integer data type then set this field for it.

This video can be help you for the simple solution.

Note: Be sure your network one-way and directions are correct. They are very important.

| improve this answer | |
  • wouldnt it be if [type] == 1 then.... – NULL.Dude Nov 30 '17 at 13:39

For some reason the Hierarchy doesnt work out the way is expected. So, a way I found it was just create restrictions. Where the Primary roads where "prefer High" restriction, Secondary Roads where "Prefer Medium" and son on. It worked really well.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.