Exercise 11: Performing network analysis using traffic data

Complexity: Beginner Data Requirement: ArcGIS Tutorial Data for Desktop Data Path: C:\ArcGIS\ArcTutor\Network Analyst\Tutorial Goal: Learn how to configure a network analysis so that it uses traffic data.

You can solve any network analysis layer using traffic data. In this exercise, you will solve a service area analysis for different times of the day using historical and, optionally, live traffic data. The service area polygons will change based on how much traffic there is.

To complete the section in this exercise that solves a service area given live-traffic conditions, you need to have a San Diego network dataset configured with live traffic. See Exercise 10 for instructions on how to create a network dataset that is enabled with live traffic.

NoteNote:

The data for this exercise and the other exercises in the Network Analyst tutorial is available on ArcGIS.com. After downloading the data, you can extract it wherever you like. It may be helpful, however, to extract it to C:\arcgis\ArcTutor since the tutorial refers to this path as the default location for the data.

Adding Network Analyst controls to ArcMap

Steps:
  1. If you have Exercise11.mxd open in ArcMap, skip to step 6.
  2. Start ArcMap by clicking Start > All Programs > ArcGIS > ArcMap 10.1.
  3. On the ArcMap - Getting Started dialog box, click Existing Maps > Browse for more.

    The Open ArcMap Document dialog box appears.

  4. Browse to C:\ArcGIS\ArcTutor\Network Analyst\Tutorial.

    This is the default installation location for the tutorial data.

  5. Double-click Exercise11.mxd.

    The map document opens in ArcMap.

  6. Enable the ArcGIS Network Analyst extension.
    1. Click Customize > Extensions.

      The Extensions dialog box opens.

    2. Check Network Analyst.
    3. Click Close.
  7. If the Network Analyst toolbar is not displayed, you need to add it.

  8. Click Customize > Toolbars > Network Analyst.

    The Network Analyst toolbar is added to ArcMap.

    The Network Analyst toolbar

  9. If the Network Analyst window is not displayed, you need to add it.

  10. On the Network Analyst toolbar, click the Network Analyst window button Network Analyst window.

Configuring a 9:00 a.m. service area layer

Steps:
  1. In the Table Of Contents window, check Service Area.

    A preexisting service area analysis layer is displayed. It was created for you so that you wouldn't have to configure the symbology of a new analysis layer.

  2. Click the Analysis Layer Properties button on the Network Analyst window.

    Clicking the Analysis Layer Properties button

    The Layer Properties dialog box opens.

  3. Click the Analysis Settings tab.
  4. Make sure that Impedance is set to use TravelTime (Minutes).

    The TravelTime cost attribute uses edge traffic evaluators, which reference historical and live traffic data. By choosing this cost attribute and specifying a time of day and day of the week (or date), you can solve a traffic-based network analysis.

  5. Type 10 in the Default Breaks text box.
  6. Check Use Time.
  7. Enter 9 AM in the Time of Day text box.
  8. Choose Monday from the Day of Week drop-down list.
  9. For Direction, click Away From Facility.

    The time and day specified in the Use Time property can indicate either the start time from the facility or the arrival time at the facility. In this example, the time and day indicate the start time because Away From Facility is chosen. If you chose Towards Facility instead, this meaning would change to indicate arrival time at the facility.

  10. Choose Not Allowed from the U-Turns at Junctions drop-down list.
  11. Uncheck Use Hierarchy.
  12. Leave Ignore Invalid Locations checked.
  13. Click OK.

Solving the 9:00 a.m. service area layer

Steps:
  1. Click the Solve button Solve on the Network Analyst toolbar.

    The Network Analyst Messages window appears to inform you that some restrictions had their Restriction Usage parameter set to Avoid so they were treated as prohibit-restrictions. The service area solver doesn't prefer or avoid edges based on restrictions; it simply treats all avoid-restrictions as prohibit-restrictions and ignores all prefer-restrictions. If you don't want this warning message to appear, either uncheck all avoid and prefer restrictions on the Attribute Parameters tab of the Layer Properties dialog box or check Do not show this dialog again, which is at the bottom of the Network Analyst Messages dialog box.

  2. Click Close.

    Network Analyst Messages closes.

    The service area polygons appear on the map and on the Network Analyst window. If they don't appear, click the Refresh button Refresh on the horizontal scroll bar of the map.

    This service area was generated using historical traffic data.

Configuring a 10:00 p.m. service area layer

Next, you will configure and solve a service area layer based on traffic at 10:00 p.m. on Monday.

Steps:
  1. Rename the service area layer Service Area 9 AM.
    1. Click Service Area in the Table Of Contents window.
    2. Press F2.
    3. Type Service Area 9 AM and press ENTER.
  2. Make a duplicate of the service area layer and rename it Service Area 10 PM.
    1. In the Table Of Contents window, right-click Service Area 9 AM and choose Copy.
    2. In the Table Of Contents window, right-click Layers and choose Paste Layer(s).
    3. Press F2.
    4. Type Service Area 10 PM and press ENTER.
  3. From the drop-down list on the Network Analyst window, choose Service Area 10 PM.
  4. Click the Analysis Layer Properties button on the Network Analyst window.

    The Layer Properties dialog box opens.

  5. Click the Analysis Settings tab.
  6. Type 10 PM in the Time of Day text box.
  7. Click OK.

Solving the 10:00 p.m. service area layer

Steps:
  1. Click the Solve button Solve on the Network Analyst toolbar.

    The Network Analyst Messages window may appear, depending on whether you previously checked Do not show this dialog again. If it appears, click Close.

    The updated service area polygon appears on the map and on the Network Analyst window. If it doesn't appear, click the Refresh button Refresh on the horizontal scroll bar of the map.

Comparing the 9:00 a.m and 10:00 p.m. service areas

Despite the color schemes for the two layers being the same, the transparency settings highlight the service areas' differences. Notice that the service area generated for 10:00 p.m. covers a larger area than the one for 9:00 a.m., when traffic is slower. Clearly, the time of day and date can be important factors in the results of the analysis. You might want to gain a better understanding of how the service area of a facility changes over a period of time. You could do this by solving the same analysis repeatedly, but with various start-time values.

Solving analyses using current traffic conditions may be especially important in some cases. For instance, if the facilities of a service area analysis represent patrolling emergency vehicles, you might want to know what areas can't be reached within 10 minutes from now for possible repositioning.

Configuring an analysis to solve using live traffic (optional)

When solving an analysis using a traffic-enabled network attribute, Network Analyst first queries edges for live-traffic cost data. If live data isn't available, it references historical traffic. Finally, if historical traffic is unavailable, Network Analyst retrieves cost data from static cost attributes, which can be specified for weekends or weekdays. This process happens on an edge-by-edge basis so that your solutions are generated from the most accurate data available.

So as long as your network dataset supports live traffic and has access to current DTF files, solving an analysis using live traffic is a matter of setting the network analysis layer's time properties to the current time and date and its impedance attribute to a traffic enabled cost attribute. These properties are in the Layer Properties dialog box, on the Analysis Settings tab.

NoteNote:

To properly complete the rest of this exercise, you need to have completed Exercise 10, which shows how to create a network dataset of the San Deigo area and configure it with live traffic.

The next steps show you how to solve network analysis layers using live traffic data.

Steps:
  1. Make a duplicate of one of the service area layers and rename it Live Service Area.
    1. In the Table Of Contents window, right-click Service Area 10 PM and choose Copy.
    2. In the Table Of Contents window, right-click Layers and choose Paste Layer(s).
    3. Press F2.
    4. Type Live Service Area and press ENTER.
  2. In the Table Of Contents window, uncheck Service Area 9 AM and Service Area 10 PM.
  3. The service area layer was created on a network dataset that isn't configured with live traffic. Follow the substeps below to point the service area layer to the live-traffic-enabled network dataset you created in Exercise 10.
    1. In the Table Of Contents window, right-click Live Service Area and choose Properties.
    2. In the Layer Properties window, click the Source tab, then click Set Network Dataset.
    3. In the Network Dataset window, browse to the network dataset you created in Exercise 10 and double-click it. If you installed the tutorial data in the default location, the network dataset would be at C:\ArcGIS\ArcTutor\Network Analyst\Tutorial\Exercise10\SanDiego.gdb\Transportation\SanDiego_ND.
    4. Click OK to close the Layer Properties dialog box.
    5. To be sure the facility's network location fields reference the right place, right-click Facilities in the Network Analyst window and click Recalculate Location Fields > All.

    This service area layer is now associated with the network dataset you just specified, which is live-traffic enabled if you completed Exercise 10.

  4. If you are outside the Pacific time zone of the United States and Canada, you will need to know the time offset from your time zone to Pacific time. If you don't know the time offset, follow the steps below to determine it.
    NoteNote:

    Realize that you normally wouldn't have to determine a time offset because Network Analyst chooses the best available data to reference based on the time and date you need to solve for. You are finding the time offset here to ensure live traffic is used in the analysis.

    1. Click the Time Slider button Time Slider.

      The Time Slider dialog box opens.

    2. If the controls on the slider are unavailable, click the Enable Time On Map button Disable time on map to enable them.
    3. Click the Options button.

      The Time Slider Options dialog box opens.

    4. Click the Time Display tab.
    5. Choose the time zone you are in from the Time zone drop-down list.
    6. Check Adjust for daylight saving time if you honor daylight saving time.
    7. Click OK.
    8. Click the Live Mode button Live mode, which sets the time slider to the current time and date within the slider's time step interval.
    9. Note the date and time displayed on the Time Slider dialog box.
    10. Click the Options button.
    11. From the Time zone drop-down list, choose (UTC-08:00) Pacific Time (US & Canada) and check Adjust for daylight saving time.
    12. Click OK.
    13. Click the Live Mode button Live mode.
    14. Again, note the date and time displayed on the Time Slider dialog box.
    15. Calculate the time offset from the two times you noted.
    16. Click the Disable Time On Map button and close the Time Slider dialog box.
    CautionCaution:

    Understand that the time slider doesn't play any role whatsoever in how network analysis layers are solved. The main purpose of the time slider in regard to the ArcGIS Network Analyst extension is to specify a time and date for visualizing traffic on the map display.

  5. From the drop-down list on the Network Analyst window, choose Live Service Area.
  6. Click the Analysis Layer Properties button on the Network Analyst window.

    The Layer Properties dialog box opens.

  7. Click the Analysis Settings tab.
  8. Using Pacific time (U.S.), type the current time into the Time of Day text box.
  9. Choose Today from the Day of Week drop-down list.
  10. When you set a start (or end) time for a network analysis layer, the time refers to the local time zone. Each edge in a network dataset is associated with a time zone through a time-zone network attribute. A network location, such as a facility in a service area analysis, automatically detects the time zone from the time-zone network attribute of the edge that it is located on. If you have two facilities in different time zones that are offset by one hour, and you specify 8:00 a.m. as the start time for the analysis, the facilities' individual service areas are calculated for 8:00 a.m. local time. This means the start times are one hour apart in actuality. (Note that certain analysis settings can cause an analysis that spans multiple time zones to fail. These limitations are outlined in each solver's help topic.)

  11. Click OK.
  12. Click the Solve button Solve on the Network Analyst toolbar.

The updated service area polygon appears on the map and on the Network Analyst window. The results are based on live traffic data fed through a service to which you subscribe.

You can use similar steps to perform a time-dependent network analysis for any of the Network Analyst solvers.

7/2/2014