Assigning evaluators

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.

Steps:
  1. Open the Network Dataset Properties dialog box.
  2. Click the Attributes tab.

    The network dataset in the graphic below has four network attributes: Meters, Minutes, Oneway, and RoadClass.

    The Attributes tab of the Network Dataset Properties dialog box

  3. Choose the attribute that needs to have its evaluators modified and click Evaluators.

    The Evaluators dialog box opens.

    The Evaluators dialog box

  4. The most common way to assign values for network attributes is through a field evaluator, which is detailed in step 4. However, you can look at steps 5 through 9 for directions on setting up other kinds of evaluators.
  5. 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:
    1. Under the Type column, click the source row and click Field.
    2. 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:

    The field evaluator for Streets in the to-from digitized direction of the source features
    TipTip:

    You can assign values for the Type and Value columns at the same time. To assign Type values, press the CTRL or SHIFT key while you click the rows in the Attribute Values table. Right-click one of the selected rows, click Type, then choose the desired evaluator type.

    Similarly, you can assign the same value to the Value column for multiple rows. To do this, select two or more rows; right-click one of the selected rows, pointing to Value; then click Properties. The settings you specify on the dialog box that opens are assigned to all the selected rows in the Attribute Values table of the Evaluators dialog box.

  6. Follow these substeps to assign a field expression evaluator to a source, or skip to the next step for directions regarding another evaluator:
    1. Under the Type column, click the source row and click Field.
    2. Click the Evaluator Properties button Evaluator Properties button.
    3. 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 for Server (Linux).
    4. Type the expression.
    5. Click OK.

    Steps to set a field expression evaluator

  7. Follow these substeps to assign a constant evaluator to a source, or skip to the next step for directions regarding another evaluator:
    1. Under the Type column, click the source row and choose Constant from the drop-down list.
    2. 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:

      A constant evaluator for turns

  8. Follow these substeps to assign a script evaluator to a source, or skip to the next step for directions regarding another evaluator:
    1. Under the Type column, click the source row and click Script.
    2. Click the Evaluator Properties button Evaluator Properties button.
    3. 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 for Server (Linux).
    4. Type a script.
    5. Click OK.

    In this example, a restriction network attribute uses a VBScript evaluator to block routes and other network analyses from crossing bridges.

    Example script evaluator used on a restriction attribute to restrict 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 =.

    Example script in Python for restricting bridges

  9. Follow these substeps to assign a function evaluator to a source, or skip to the next step for directions regarding another evaluator:
    1. Under the Type column, click the source row and click Function.
    2. Click the Evaluator Properties button Evaluator Properties button.
    3. On the Function Evaluators dialog box, enter a function.
    4. 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.

    Example function evaluator restricting roads with minimum clearances lower than a vehicle's height

  10. To assign a global turn delay evaluator, see the following topic: Establishing global turns.
  11. 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.

  12. After setting up the evaluators for your network attribute, you can close the remaining dialog boxes and build the network if necessary.

    NoteNote:

    It is only necessary to rebuild network datasets if the changes you make require the network dataset to access its source feature classes. For instance, creating a field evaluator that pulls time costs from a source feature class requires the network to be rebuilt. Changing the geometry of source features requires the network dataset to be rebuilt. However, the network doesn't need to be rebuilt when a function, script, or global turn delay evaluator is created since these evaluators don't draw information directly from the source feature classes.

  13. Click OK.

    The Network Dataset Properties dialog box closes.

  14. In the Catalog window, right-click the network dataset and click Build.

Related Topics

3/25/2015