Types of evaluators used by a network

Each attribute defined in the network must have values for each source participating in the network. An evaluator assigns values for the attribute of each source. In the precursors of ArcGIS (ArcView GIS and ARC/INFO), values for attributes were assigned from a field in the shapefile or coverage. In ArcGIS, the field evaluator assigns values to a network attribute from a field for each network source. In addition, ArcGIS offers other types of evaluators that can be used, for instance, constants, field expressions, functions, or VBScript.

The evaluators are described below.

Evaluator

Description

Field evaluator

The most common way to assign values for a network attribute is by identifying a single field that will be used to evaluate the network attribute when the network dataset is built. For example, a field evaluator can be used in cases where the value describes a measurement, such as meters.

Field expression evaluator

The field evaluator can be modified to take a field expression as the value instead of a single field. In this case, you'll build an expression on the Field Evaluator dialog box. For example, if the units of the network attribute are in meters but the units of source data are in feet, you can create an expression to translate the feet into meters when the network dataset is built.

Constant evaluator

Attributes can be assigned a constant value. The value can be numeric (0, 1, 2) for cost, descriptor, and hierarchy attributes, or a Boolean expression (Traversable or Restricted) for a restriction attribute.

Function evaluator

The function evaluator calculates attribute values by performing a multiplicative or logical function on another attribute value or parameter value. For numeric attribute types, the values are derived from an expression that multiplies the value of another attribute by some value. For example: DriveTime * 1.25. For Boolean attribute types, the values are derived from an expression that compares another attribute value to a parameter value, for example, MaxHeight < VehicleHeight.

LegacyLegacy:

Since the function evaluator was new in ArcGIS 9.3, using it will make your network dataset unusable in ArcGIS releases previous to 9.3.

Global turn delay evaluator

The global turn delay evaluator assigns a default cost value for transitioning between two edge elements. The cost is based on the deflection angle between the two edges and the road class (primary, secondary, or local) of the edges that are traversed. You specify the road class using the Hierarchy Ranges dialog box along with a hierarchy attribute. For example, you can use the global turn delay evaluator to make all left turns, which are determined by deflection angles, from local roads onto secondary roads take longer than left turns from local roads onto other local roads. You can also specify added costs for other transitions, such as adding 10-second delays when continuing straight at the intersection of two secondary roads.

Learn more about establishing global turns

LegacyLegacy:

Since the global turn delay evaluator was new in ArcGIS 9.3, using it will make your network dataset unusable in ArcGIS releases previous to 9.3.

VBScript evaluator

Attributes can be assigned from the result of the execution of VBScript. This provides a way to model complex attributes. Unlike other evaluators, the VBScript evaluator does not assign values when a network is built. Instead, it assigns values when a particular network analysis requires the use of that attribute. If the values of an attribute change constantly, the use of a VBScript evaluator can ensure the use of updated attributes for network analysis.

NoteNote:

Since the VBScript evaluator calculates its values at the time of analysis, this evaluator tends to negatively affect analysis performance.

Edge traffic evaluator

Edge traffic evaluators are designed for historical traffic data. They can provide travel times for a given time of day and day of the week. They have fallback cost attributes that provide weekday and weekend travel times when specific time-of-day travel times are not available. It also has time-neutral cost attributes that Network Analyst references when sequencing stops or solving network analysis layers that don't support historical traffic data.

Learn more about historical traffic data

Every junction source and every turn source can have one evaluator. Every edge source can have two—one for each direction of the edge.

A default evaluator can be assigned for edges, junctions, and turns. If an explicit evaluator is not specified for a particular source, the values for that source are assigned by the default evaluator.

The following is the general workflow for assigning an evaluator:

  1. Select the source for which the evaluator must be assigned.
  2. Choose an evaluator type, such as Field, Constant, Function, or VBScript.
  3. Specify the value to be assigned to the network attribute.

    If the values are derived from a field, the field will be selected from a drop-down menu. If the values are to be calculated based on a field expression, set evaluator type as Field and press F12 on your keyboard to bring up the Field Evaluators dialog box. Alternatively, you can right-click the source on the Evaluators dialog box and choose Properties from the Value menu to open the Field Evaluators dialog box.

Evaluator examples

Assigning values to cost attributes

For the network attribute DriveTime, the evaluator for the streets network source is a field type. The field FT_Minutes contains values for the network attribute in the from–to direction for the streets source. Similarly, values for the to–from direction of the streets source are assigned from the field TF_Minutes.

In this example, the other edge sources in this network are transit edges and do not have a drive time. Hence, they can be assigned a constant value of -1.

Assigning values to cost attributes

Alternatively, cost attributes can be derived from another cost attribute by using the function evaluator. For example, an attribute that models the travel times of slow vehicles can use the function evaluator to reference an attribute that models normal travel times and multiply it by a slowdown factor.

Function evaluator modeling a longer travel time

Assigning values to restrictions

Restriction attributes have a Boolean data type. Since a source element can be either restricted or traversable, it can be assigned a constant (restricted or traversable).

assigning values to restrictions

Alternatively, restriction attributes can be derived using the function evaluator to compare another attribute to a parameter value. For example, an attribute that models vehicle height restrictions can use the function evaluator to compare the height limit of a road to the vehicle's actual height stored in an attribute parameter. When the expression evaluates to true, the road is restricted; when the expression evaluates to false, the road is traversable. The exception to this rule is that any time either of the operands (MaxHeight or Vehicle Height) have a value of zero, the expression always evaluates to false.

Function evaluator modeling a height restriction

Learn more about using parameters with network attributes

Finally, restriction attributes can also be assigned from a field in the source feature class. For example, you can use a field expression evaluator to generate Boolean results—if the expression is true, the element is restricted; if not, it is traversable.

When a network dataset is created, Network Analyst searches through all sources for commonly used fields, such as Oneway. If it finds a Oneway field in any source, it creates a Oneway network attribute, and assigns values for the relevant source based on field expressions.

Below is the expression used for a one-way restriction attribute in the from–to direction:

Oneway restriction evaluator for From-To direction

Below is the expression used for a one-way restriction attribute in the to–from direction:

Oneway restriction evaluator for To-From direction

These expressions determine the permitted direction(s) of travel based on the text value in the Oneway field:

  • FT or F = Travel is only permitted in the digitized direction of the line feature (the from–to direction).
  • TF or T = Travel is only permitted against the digitized direction of the line feature (the to–from direction).
  • N = Travel is not permitted in either direction.
  • Any other value = Travel is permitted in both directions.

Assigning hierarchies

By assigning hierarchies on your network dataset, you can categorize edges into different hierarchal levels and thus reduce solve times. However, keep in mind that results of hierarchical solves may be less optimal than non-hierarchical solves. It is recommended that you also read About network analysis with hierarchy to gain a better understanding of what hierarchies are and why they might be used.

Hierarchy levels are defined by consecutive integers, starting from one. The lowest integer—that is, one—represents the highest level of the hierarchy. Higher integer values represent lower hierarchy levels. For instance, if you are breaking a network down into three hierarchy levels, you would assign the primary roads a value of 1, secondary roads a value of 2, and tertiary roads a value of 3. The primary roads might include interstate highways while tertiary roads might include residential streets.

Hierarchy in a network dataset is often assigned via a field or field expression evaluator. If the Streets feature class has a road class attribute (Hierarchy) with values 1, 2, and 3—representing interstates, major roads, and minor roads respectively—the hierarchy attribute can be set by simply using field evaluators.

assigning hierarchy

Typically three, four, or five levels of hierarchy are assigned to a hierarchy attribute, but you can assign as many as you want, as long as each level is represented by a consecutive integer starting from one. You should avoid assigning too many levels of hierarchy, however, as this could leave some edges disconnected with respect to the rest of the hierarchy, which would cause failures when solving network analysis layers.

If the source feature class has an attribute that categorizes roads into more groups than you want as levels in your hierarchy, you can further categorize the groups using a field expression evaluator so that you achieve the number of hierarchy levels you want. For example, assume a Streets feature class has an integer field named Func_Class that has the following six road classes:

Func_Class

Street type

1

Interstate

2

Interstate toll road

3

State highway

4

Major road

5

Local street

6

Freeway ramp

Furthermore, assume that you want to group the Func_Class values as shown in the following table so that three hierarchy levels are created.

Hierarchy level

Func_Class values

1

1 (interstates)

2 (interstate toll roads)

6 (freeway ramps)

2

3 (state highways)

4 (major roads)

3

5 (local streets)

To model this scenario, change the evaluator for the Hierarchy attribute to a field expression evaluator. This allows you to enter a small, prelogic VBScript code that uses a variable. For this example, the variable level is created and set to 3 (the lowest hierarchy level in this example). Set the following condition: if Func_Class is 1, 2, or 6, assign level a value of 1. If Func_Class is 3 or 4, assign level a value of 2. For all other cases, the value remains 3. In the Value textbox of the field expression evaluator, enter level.

Setting hierarchy levels using a prelogic VBScript

This ensures that all elements with Func_Class 1, 2, or 6 are assigned a hierarchy value of 1; all elements with Func_Class 3 or 4 are assigned a hierarchy value of 2; and all others (namely, elements with Func_Class values of 5) are assigned a hierarchy value of 3.

LegacyLegacy:

Prior to ArcGIS 10, the Hierarchy Ranges dialog box was used to convert multiple field values into exactly three hierarchy levels. Now, however, it's only purpose is to define primary, secondary, and local roads when working with a global turn delay evaluator. This means that the Hierarchy Ranges dialog box has no effect on the hierarchy attribute of the network dataset, rather, it only affects the global turn delay evaluator.

The Hierarchy Ranges dialog box
Click Ranges on the Attributes panel to see the Hierarchy Ranges dialog box.

When a global turn delay evaluator is used with a hierarchy attribute, edges must be categorized into three classes: local, secondary, and primary roads. Since a hierarchy attribute could specify any number of hierarchy levels, the Hierarchy Ranges dialog box allows you to group those levels into exactly three road classes. This allows you to specify costs that are added by default to turning maneuvers based on road class. For example, you can add a 10-second delay to all left turns from secondary roads onto local roads and a three-second delay to all left turns from local roads onto other local roads. Many other turn combinations are possible when using road classes with the global turn delay evaluator.

Learn more about establishing global turns

Related Topics


2/2/2012