Restrictions can be configured on a network data source such that, during an analysis, traversing roads with certain characteristics is prohibited entirely, avoided, or even preferred. For example, restrictions can be used to prevent pedestrians from walking on highways or to prevent tall trucks from traveling on roads with insufficient overhead clearance.
Restrictions can be turned on or off at solve time so that they are either obeyed or ignored for your particular analysis. The preferred method for controlling the restrictions that are used for a particular analysis is through travel modes. You can configure a travel mode with various analysis properties, including restrictions, to appropriately model the vehicle you are routing. At solve time, selecting a predefined travel mode allows you to efficiently and consistently set the restrictions and other properties that are appropriate for the mode of travel you intend to model.
A restriction attribute can be configured to have parameters with default values that can be overridden by a travel mode that uses that restriction. For example, you could add a Vehicle Height parameter to a restriction attribute. The parameter value indicates the height of the vehicle modeled in the analysis.
In all cases, a restriction attribute is configured to return a Boolean (true or false) value for each network element of the network data source. For a given network element, if the restriction returns true, it means the usage type is applied to that element during analysis for travel modes that include the restriction; false means the restriction has no impact on the particular network element being evaluated. Restrictions also have a Usage Type property that can be used to alter how the restriction affects routing.
Restriction usage
The value assigned to the Usage Type property determines whether the restriction attribute prohibits, avoids, or prefers the network elements associated with it. Furthermore, the degree to which network elements are avoided or preferred can be defined by degrees of High, Medium, or Low. The three sections below introduce the general restriction usages.
Prohibit network elements
The most common use of a restriction is to prohibit traversal. For example, one-way streets can be modeled with a restriction attribute so they can only be traversed from one end to another, but not in the reverse direction. Similarly, a restriction attribute on walkways can completely prohibit traversal so that the network elements identified as walkways are excluded from any route that is generated for a motorized vehicle.
Avoid network elements
Instead of prohibiting traversal on certain network elements, you may want to lessen a prohibit restriction whereby the solver avoids traversing the elements, unless it is impossible or too costly to do so. For instance, if you are routing commercial delivery vehicles and want them to avoid driving on private roads, you can use a restriction attribute and set its Usage Type property to Avoid. This way, private roads are avoided in most cases, but if a delivery happens to be on a private road, the route can still reach the destination. Also, if avoiding a private road while en route to a stop is too costly (that is, the detour around the private road is too long), the solver allows the exception and sends the vehicle through the private road.
Prefer network elements
The third type of restriction attribute usage type is a prefer restriction. Restriction attributes can be configured with a prefer usage type. Consider a truck carrying hazardous materials (hazmat). There are some roads where transporting hazmat is illegal, some where it is allowed, and some where it is preferred because an accident occurring along those roads would be easiest for emergency responders to reach and contain. You can model these rules by configuring a restriction attribute with a Usage Type value of Prohibited on roads where it is illegal to transport hazmat and configuring another restriction attribute with a Usage Type value of Prefer on roads where hazmat transport is favored. The result is that your vehicles will never be routed on prohibited roads and will tend to be routed along preferred roads.
Usage Type values
The degree to which network elements are avoided or preferred can be defined by assigning a value to the Usage Type. Specifically, the following values are used by default for a High, Medium, and Low value of avoidance or preference and for prohibition:
- -1: Prohibited
- 5: Avoid (high)
- 2: Avoid
- 1.3: Avoid (low)
- 0.8: Prefer (low)
- 0.5: Prefer
- 0.2: Prefer (high)
Dive-in:
Each of these seven text values is internally represented by a fixed numeric value, which is shown before the text label in the list above. The provided text choices, and their underlying numeric values, are sufficient for almost all users. Still, if you need to fine-tune the degree to which elements are avoided or preferred, you can do so by providing your own numeric values. To help you understand whether to provide a custom value, you need to know how they influence the solver.
For elements with a cost greater than zero (most commonly with edge elements), the cost of elements with restrictions is multiplied by these numeric values to increase or decrease the cost, which in turn makes the elements less or more attractive during the analysis. Preferred elements, for instance, are multiplied by a parameter value greater than 0 and less than 1 to reduce their cost and make the solver more likely to include those elements in the results. The value Prefer: High has a value closer to 0, and Prefer: Low has a value closer to 1. (Note that entering a value of 0 isn't allowed; it causes an error at solve time.) For elements you want to avoid, the Restriction Usage numeric values are set to numbers greater than 1 since multiplying by these values increases costs.
For elements with a cost of zero (for example, junction elements typically have zero cost in most network datasets), if the Restriction Usage numeric value is greater than one (signifying elements you want to avoid), the cost of elements with restrictions is increased to this Restriction Usage numeric value for each element, which in turn makes the elements less attractive during the analysis. If the Restriction Usage numeric value is less than one (signifying elements you want to prefer), the cost of elements with restrictions remains at zero. Note that this will not make the restricted elements any more preferable, since the cost of the elements is already at zero.
To prohibit elements, the Restriction Usage value is internally set to -1. For simplicity, you can think that Network Analyst interprets negative cost values as nontraversable, but the internal process is more involved than this.
Understand that the solver only uses these modified costs temporarily; they are never included in the output of an analysis or in turn-by-turn directions.
To enter a custom value, replace the provided number; the label will update with the appropriate text.
Properties
The Restrictions tab displays the restriction attributes that are available with the network data source in the upper section, and in the lower section, properties associated with the selected restriction are displayed.
The Properties section displays how the selected restriction is configured. It lists the metadata associated with the restriction attribute and the details on how the parameters and evaluators are configured.
The following are the restriction attribute properties:
- Name—The name of the restriction attribute.
- Usage Type—The usage type of the restriction attribute. This specifies whether the restriction attribute prohibits, avoids, or prefers the network elements if the evaluator value is True.
- Parameters—These are placeholders for values that you can change for a particular analysis. They each have a meaningful default value that can be overridden when necessary.
- Evaluators—Each attribute defined in the network must provide values for each source and direction (along and against for edges) participating in the network. An evaluator assigns values for the attribute of each source and travel direction, and a default evaluator for each element is used for those sources and directions that do not have an assigned evaluator for an attribute.
Note:
The best practice for editing network attributes in a network dataset is to edit them in a project that does not include layers that use the network dataset. Some editing may be blocked on the network dataset properties dialog box if there are layers in the project that use this network dataset. It is recommended that you create a blank project, add a connection to the geodatabase that contains the network dataset, and make edits in this project. When the layers using this network dataset are opened in an ArcGIS AllSource session, you won't be able to add, delete, or rename a cost or a restriction attribute. This is to ensure that the network dataset schema updates succeed and that the layers using it are initialized properly when opened.
Note:
When you change any network attributes, you must build the network dataset to reestablish the connectivity, recalculate affected attributes, and update the network elements.
Create a restriction attribute
You can configure a restriction attribute to use with a travel mode. Complete the following steps to create a restriction attribute:
- Access network attributes on the Network Dataset Properties dialog box.
- Click the Restrictions tab.
- Click the Options button in the upper right corner of the dialog box.
- Click the New button from the menu, or press Ctrl+N.
A new row is added to the Restriction section.
- In the Properties section, type the name for the new restriction attribute in the Name field.
- Choose the usage type from the Usage Type drop-down list.
- Expand the Parameters section, if necessary, to add a new parameter.
- In the Evaluators section, assign an evaluator to the source features.
- Click the Travel Modes tab.
- Expand the Restrictions section if necessary.
The new restriction attribute is added to the list.
- Click OK.
The restriction attribute is saved to the network dataset.
Copy a restriction attribute
Complete the following steps to make a copy of the selected restriction attribute:
- Access network attributes on the Network Dataset Properties dialog box.
- Click the Restrictions tab.
- Choose a restriction attribute to copy.
- Click the Options button in the upper right corner of the dialog box.
- Click the Copy button , or press Ctrl+Shift+N.
A copy of the selected restriction attribute is created and a new row with the similar restriction name is added (For example, if you copy a restriction attribute named Oneway, a new restriction attribute with the name Oneway 2 will be added). All the properties for this new restriction attribute are inherited from the one you copied.
- Click OK to save the changes to the network dataset.
Delete a restriction attribute
Complete the following steps to delete a restriction attribute:
- Access network attributes on the Network Dataset Properties dialog box.
- On the Restrictions tab, select the restriction attribute to delete.
- Click the Options button in the upper right corner of the dialog box.
- Click the Delete button , or press Ctrl+D.
The selected restriction attribute is deleted.
Note:
If the restriction attribute is used by other travel modes or attributes, the Delete option is unavailable. To access the Delete button, remove the selected restriction attribute from all travel modes and attributes.Edit a restriction attribute
Restriction attributes can be edited to change the properties or other attributes related to the restriction. Complete the following steps to edit a restriction attribute:
- Access network attributes on the Network Dataset Properties dialog box.
- Click the Restrictions tab.
- Choose a restriction attribute to edit.
- In the Properties section, make necessary edits to the Name and Usage Type properties.
- Edit the parameters associated with the restriction attribute if necessary.
- Edit the evaluators of the restriction attribute if necessary.
- Click the Travel Modes tab.
The changes made to the restriction attribute are reflected in the Restrictions section.