Available with Network Analyst license.
Network elements are created from source features; network attributes—such as cost and hierarchy attributes—hold values for the network elements; and an evaluator calculates the values of attributes for elements created from a particular source feature class. This means that a single network element has several evaluators; for example, a single cost attribute on a multimodal network could have an evaluator for each of the source feature classes, such as streets, railroads, walkways, turns, and junctions.
This topic describes how to set up evaluators.
- Open the Network Dataset Properties dialog box.
- Click the Attributes tab.
The network dataset in the graphic below has four network attributes: Meters, Minutes, Oneway, and RoadClass.
- Choose the attribute that needs to have its evaluators modified and click Evaluators.
The Evaluators dialog box opens.
- Follow these substeps to assign a field evaluator to a source, or skip to the next step for directions on how to add an expression to a field evaluator:
- Under the Type column, click the source row and click Field.
- Under the Value column, click the source row and click the correct field from the list.
The following graphic shows a field evaluator for a Streets feature class in the to-from digitized direction of the source features:
- Follow these substeps to assign a field expression evaluator to a source, or skip to the next step for directions regarding another evaluator:
- Under the Type column, click the source row and click Field.
- Click the Evaluator Properties button .
- On the Field Evaluators dialog box, choose whether your expression will be written in VBScript or Python. VBScript is recommended for faster performance; however, you will need to use Python if you plan to build the network dataset with ArcGIS Server (Linux).
- Type the expression.
- Click OK.
- Follow these substeps to assign a constant evaluator to a source, or skip to the next step for directions regarding another evaluator:
- Under the Type column, click the source row and choose Constant from the drop-down list.
- Under the Value column, click the source row and choose Ignore Restriction or Use Restriction for restriction attributes, or enter a numeric value for cost, descriptor, and hierarchy attributes.
The following graphic shows a constant evaluator for a restriction attribute on a Turns source feature class:
- Follow these substeps to assign a script evaluator to a source, or skip to the next step for directions regarding another evaluator:
- Under the Type column, click the source row and click Script.
- Click the Evaluator Properties button .
- On the Script Evaluators dialog box, choose whether your script will be written in VBScript or Python. VBScript is recommended for faster performance; however, you will need to use Python if you plan to solve a network analysis with ArcGIS Server (Linux).
- Type a script.
- Click OK.
In this example, a restriction network attribute uses a VBScript evaluator to block routes and other network analyses from crossing bridges.
Below is a screen capture of a similar script written in Python. Note that a function is defined in Pre-Logic Script Code, and it starts with the def keyword. The function is called from Value =.
- Follow these substeps to assign a function evaluator to a source, or skip to the next step for directions regarding another evaluator:
- Under the Type column, click the source row and click Function.
- Click the Evaluator Properties button .
- On the Function Evaluators dialog box, enter a function.
- Click OK.
In this example, a restriction attribute (HeightRestriction) references a descriptor attribute (MaxHeight) and a parameter (Vehicle Height) to prohibit roads that have a minimum clearance that is lower than a vehicle's height.
- To assign a global turn delay evaluator, see the following topic: Establishing global turns.
- To assign an edge traffic evaluator, see the following topic: What is traffic data?
Edge traffic evaluators are created automatically after you set up the properties for traffic on the network dataset.
- Click OK.
The Network Dataset Properties dialog box closes.
- In the Catalog window, right-click the network dataset and click Build.
After setting up the evaluators for your network attribute, you can close the remaining dialog boxes and build the network if necessary.