Summary
The instructions provided describe how to set up a restriction attribute for vehicle height in Network Analyst. Restrictions can be identified for particular elements such that, during an analysis, traversing restricted elements is prohibited entirely, avoided, or even preferred.
It is possible to turn restrictions on and off at solve time using check boxes. Furthermore, a restriction can be checked but only truly restrict the element if a value entered at solve time fits certain criteria. For example, if a vehicle currently being routed is over a given weight, the weight restriction can be checked, vehicle's weight entered, a solve is run and Network Analyst finds the best route that excludes roads where the weight limit would be exceeded.
In all cases, a restriction attribute is defined using a Boolean data type such that each network element either has the restriction (the Boolean value evaluates to true) or doesn't have the restriction (the Boolean value evaluates to false).
Procedure
Follow the steps below to setup a restriction attribute specific to vehicle height. A network has certain attributes that may not allow for travel on certain segments of road, for example, vehicle height, weight, length, and so forth.
- Add a field to the streets.
- Populate each field, via an edit session or the Field Calculator, with the value that is the maximum height for roads with a low overpass. The maximum height is 10.
- Once all the fields are populated, right-click the Network Dataset in ArcCatalog and select Build.
- Right-click Network Dataset again and select > Properties > Attributes.
- Add a new attribute and name it MaxHeight. Change the Usage Type to Descriptor. Click the Units drop-down arrow and select the correct units.
- Double-click the new attribute and select both the street edge elements.
- Right-click and select Type > Field.
- Right-click again and select Value > MAXHEIGHT.
- Add a new attribute. Name it HeightRestriction. Set the Usage Type to Restriction.
- Right-click the newly added attribute, select Parameters > Add. Name the parameter Vehicle Height. This parameter is in the solver when the height of the vehicle is input.
- Right-click the HeightRestriction attribute again and select Evaluators.
- Select both the street edge elements, right-click and select Type > Function.
- Select both the street elements again, right-click and select Value > Properties.
- This brings up a dialog box. In the dialog, set MaxHeight for the Attribute or Constant field (the attribute on the road) and set Vehicle Height for the Parameter or Constant field (the manually input parameter). Click the Operator drop-down arrow and select the 'less than' symbol (<). This restricts the segment of road where the vehicle height is higher than the MaxHeight value for that street segment.
- Click Apply > OK. This rebuilds the network dataset.
When solving, make sure to check the HeightRestriction attribute and input the vehicle height under the Attribute Parameters tab.
Note:
If the vehicle height is greater than the value input in Step 2 for a road segment, the route cannot solve for that road.
The maximum height attribute for the roads is 10. It does not solve along the shortest path because it violates the vehicle height restriction.
Note:
If the value of the vehicle height is below the maximum height specified for the road, it solves along that road segment.
This is because the value does not violate the vehicle height restriction.