HOW TO

Model global turn penalties using the default turn evaluator

Last Published: April 25, 2020

Summary

To model a turn penalty for all possible turns, it is not necessary to create a turn feature for every pair of adjacent edges in the network dataset. Global turn penalties can be modeled by specifying the Default Turn evaluator on a network attribute to be either the Global Turn Delay evaluator or the VB Script evaluator.

Note:
See the Related Information section below for more information about the Global Turn Delay evaluator. The Global Turn Delay evaluator is only available in version 9.3 or later.

Procedure

Instructions provided demonstrate how to use the VB Script evaluator to add a 15-second turn penalty to all left turns, while not penalizing all other turns. The network attribute in this example is assumed to have its Units set to Minutes.

Warning:
For users of version 9.3 or later, it is strongly recommended to use the Global Turn Delay evaluator instead of the VB Script evaluator. The Global Turn Delay evaluator runs much faster than the VB Script evaluator.

  1. In ArcCatalog, right-click the network dataset and select Properties to open the Network Dataset Properties dialog box.
  2. Select the Attributes tab.
  3. Select the cost attribute to add the turn penalties to, and click the Evaluators button to open the Evaluators dialog box.
  4. Select the Default values tab.
  5. For the Turn evaluator, under the Type column, change the Type from Constant to VB Script.
  6. Click the Evaluator Properties button to open the Script Evaluators dialog box.
  7. In the Pre-Logic VB Script Code box, type in the following code:

    Code:
    turnTime = 0
    a = Turn.Angle
    If a > 210 And a < 330 Then
    turnTime = 0.25
    End If


    Note:
    Turn.Angle is measured in degrees clockwise from straight ahead.

    [O - Image] Turning angles image

    For more information on the usage of Turn.Angle, see the link for INetworkTurn.Angle Property in the Related Information section below.

    Note:
    Since this network attribute has its Units set to Minutes, the attribute value must be specified in minutes (0.25 minutes = 15 seconds).

  8. In the Value box, type in:

    Code:
    turnTime

  9. Click OK on the Script Evaluators dialog box.
  10. Click OK on the Evaluators dialog box.
  11. Click OK on the Network Dataset Properties dialog box.

Article ID:000008033

Software:
  • ArcMap

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options