Route analysis

Solving a route analysis can mean finding the quickest, shortest, or even the most scenic route, depending on the impedance you choose to solve for. If the impedance is time, then the best route is the quickest route. Hence, the best route can be defined as the route that has the lowest impedance, or least cost, where the impedance is chosen by you. Any cost attribute can be used as the impedance when determining the best route.

This shows the route of the quickest path for someone to drive from point A to point B.

Accumulated attributes play no role when computing the solution. For example, if you choose a time cost attribute as the impedance attribute and want to accumulate a distance cost attribute, only the time cost attribute is used to optimize the solution.

Finding the best route through a series of stops follows the same workflow as other network analyses.

Learn more about the network analysis workflow

Route analysis layer

The route analysis layer stores all the inputs, parameters, and results of a route analysis.

Creating a route analysis layer

You can create a route analysis layer from the Network Analyst toolbar by clicking Network Analyst > New Route.

Choosing New Route on the Network Analyst toolbar

When you create a new route analysis layer, it shows up in the Network Analyst window along with its five network analysis classes—Stops, Routes, Point Barriers, Line Barriers, and Polygon Barriers.

The route analysis layer also appears in the Table Of Contents as a composite layer, which is named Route (or, if a route with the same name already exists in the map document, Route 1, Route 2, and so on). There are five feature layers—Stops, Routes, Point Barriers, Line Barriers, and Polygon Barriers. Each of the five feature layers has default symbology that can be modified on its Layer Properties dialog box.

Route analysis classes

The route analysis layer is composed of five network analysis classes.

Learn more about network analysis classes

An overview of each class and descriptions of their properties are provided in the following sections.

Stops class

This network analysis class stores the network locations that are used as stops in a route analysis. The Stops layer has four default symbols: located stops, unlocated stops, stops with errors, and stops with time violations. You can modify the symbology for the Stops layer in the Layer Properties dialog box, where there is a custom symbology category for stops, Network Analyst > Sequenced Points.

Stops Layer Properties dialog box

When a new route analysis layer is created, the Stops class is empty. It is populated only when network locations are added to it. A minimum of two stops is necessary to create a route.

Stop properties

Some of the stop properties are only available when a start time is defined or time windows are enabled, both of which are parameters on the Analysis Settings tab of the Route analysis layer's Layer Properties dialog box.

Input fields of stops

Input field

Description

ObjectID

The system-managed ID field.

Shape

The geometry field indicating the geographic location of the network analysis object.

Name

The name of the network analysis object.

A name, which you can edit, is assigned automatically when the stop is added to the map.

RouteName

This represents the name of the route to which the stop belongs. By using this property, stops within one route analysis layer can be assigned to multiple routes.

  • If some stops have route names, they are grouped into a route with the same name. In this case, if some stops do not have a route name assigned, they are listed as unassigned and are left out of the solution.
  • If no name is present, then all the stops belong to the same route.

TimeWindowStart

This property stores the earliest time the network location can be visited.

If TimeWindowStart is set to 10:00 AM and the route arrives at the stop at 9:50 AM, there is a wait time of 10 minutes that is added to the total time.

If you are using traffic data, the time-of-day fields refer to the same time zone as the edge that the stop is located on.

This property is only available when time windows are enabled on the network analysis layer.

TimeWindowEnd

This property stores the latest time the network location can be visited.

Together, the TimeWindowStart and TimeWindowEnd properties make up the time window within which a route can visit the network location.

If a location has a TimeWindowEnd value of 11:00 AM, and the earliest a route can reach the stop is 11:25 AM, a violation of 25 minutes is noted. Additionally, the stop is symbolized to display that it has a time window violation.

If you are using traffic data, the time-of-day fields refer to the same time zone as the edge that the stop is located on.

This property is only available when time windows are enabled on the network analysis layer.

Attr_[Impedance]

(for instance, Attr_Minutes, where Minutes is the impedance for the network)

This property specifies how much time will be spent at the network location when the route visits it. That is, it stores the impedance value for the network location. If this field value is zero or null, the network location requires no service time.

For example, if you are finding the best route through three stops using Drivetime as impedance, the property Attr_Drivetime can be used to store the amount of time spent at each stop. If you start from Stop 1, reach Stop 2 in 10 minutes, spend 10 minutes at Stop 2, and reach Stop 3 in another 10 minutes, then the total time to reach Stop 3 will be displayed as 30 minutes (10 + 10 + 10), even though it only takes 20 minutes of traveling to reach Stop 3.

Network location fields

  • SourceID
  • SourceOID
  • PosAlong
  • SideOfEdge

Together, these four properties describe the point on the network where the object is located.

Learn more about network location fields

CurbApproach

The CurbApproach property specifies the direction a vehicle may arrive at and depart from the network location. There are four choices (their coded values are shown in parentheses):

  • Either side of vehicle (0)—The vehicle can approach and depart the network location in either direction. U-turns are allowed. You should choose this setting if your vehicle can make a U-turn at the stop or if it can pull into a driveway or parking lot and turn around.
  • Right side of vehicle (1)—When the vehicle approaches and departs the network location, the curb must be on the right side of the vehicle. A U-turn is prohibited.
  • Left side of vehicle (2)—When the vehicle approaches and departs the network location, the curb must be on the left side of the vehicle. A U-turn is prohibited.
  • No U-Turn (3)—When the vehicle approaches the network location, the curb can be on either side of the vehicle; however, the vehicle must depart without turning around.

Learn more about U-turn policies

Input/output fields of stops

Input/Output field

Description

Sequence

As an input field, this number represents the order in which the stops should be visited. Within a route, the sequence number should be greater than 0 but not greater than the maximum number of stops. Also, the sequence number should not be duplicated. If the analysis layer parameter Reorder Stops To Find Optimal Route is not checked, the resulting route visits the stops in the sequence specified.

If the stops are allowed to be reordered by the solver, the optimal sequence is discovered, and this field is updated during the solve process.

One way to change the sequence value is by dragging stops above or below other stops in the Network Analyst window.

Status

This field is constrained by a domain of values, which are listed below (their coded values are shown in parentheses).

  • OK (0)—The network location is valid.
  • Not located (1)—The location on the network can't be determined.
  • Network element not located (2)—The network element that the network location is supposed to be on can't be found. This can occur when a network edge is deleted and the network location is not recalculated.

After a solve operation, the status can be modified using one of the following status values:

  • OK (0)—The network location was successfully evaluated.
  • Element not traversable (3)—The network element that the network location is on is not traversable. This can occur when the network element is restricted by a restriction attribute.
  • Invalid field values (4)—The field values of the network location fall outside the analysis layer's coded or range domains. For example, a negative number may exist where positive numbers are required.
  • Not reached (5)—The network location can't be arrived at by the solver.

If time windows are used and the route arrives early or late, the value changes to Time window violation (6).

Output fields of stops

Output field

Description

ArriveCurbApproach

Indicates which side of the vehicle the curb is on when the vehicle approaches the network location. If the network location's CurbApproach value is set to Right side of vehicle, the ArriveCurbApproach after solving is Right side of vehicle. However, if the CurbApproach value is set to Either side of vehicle or No U-Turn, the ArriveCurbApproach could be on the right or left side depending on which produces the overall shortest path.

DepartCurbApproach

Indicates which side of the vehicle the curb is on when the vehicle departs the network location. If the network location's CurbApproach value is set to Right side of vehicle, the DepartCurbApproach after solving is Right side of vehicle. However, if the CurbApproach value is set to Either side of vehicle or No U-Turn, the DepartCurbApproach could be on the right or left side depending on which produces the overall shortest path.

Cumul_[Impedance]

(for instance, Cumul_Minutes, where Minutes is the impedance for the network)

This property is the total impedance it takes to reach the stop. This includes the impedance incurred in traveling to the stop, the impedance of the stop, and the impedances of all the previous stops.

In the example given for the input attribute, Attr_[Impedance], the Cumul_Drivetime for Stop 2 would be 20 minutes (10 minutes travel time + 10 minutes spent at Stop 2), and the Cumul_Drivetime for Stop 3 would be 30 minutes (20 minutes Cumul_Drivetime for Stop 2, plus 10 minutes travel time from Stop 2 to Stop 3).

Wait_[Impedance]

(for instance, Wait_Minutes, where Minutes is the impedance for the network)

This property stores the time spent waiting for the time window to open (TimeWindowStart) when the route arrives early.

This property is only available when time windows are enabled on the network analysis layer.

CumulWait_[Impedance]

(for instance, CumulWait_Minutes, where Minutes is the impedance for the network)

This property stores a sum of how much time has been spent waiting for time windows to open (TimeWindowStart). It includes the time from the current stop and all previous stops visited by the route.

This property is only available when time windows are enabled on the network analysis layer.

Violation_[Impedance]

This property is a measure of how late the route arrived after the time window closed (TimeWindowEnd). Specifically, it stores the amount of time between the end of the time window and the arrival of the route.

This property is only available when time windows are enabled on the network analysis layer.

CumulViolation_[Impedance]

This property stores the cumulative violation time (Violation_[Impedance]) from the current stop and all previous stops visited by the route.

This property is only available when time windows are enabled on the network analysis layer.

ArriveTime

The date and time value indicating the arrival time at the stop.

When using traffic data that covers multiple time zones, the time zone for this time-of-day value is taken from the network element that the order is located on.

DepartTime

The date and time value indicating the departure time from the stop.

When using traffic data that covers multiple time zones, the time zone for this time-of-day value is taken from the network element that the order is located on.

NoteNote:
  • The time fields in the Stops class can contain either time-only values or date-and-time values. If a time field, such as TimeWindowStart, has a time-only value (for example, 8:00 AM), the date is ignored. Using both date and time (for example, 7/11/2010 8:00 AM) allows you to specify time windows that span multiple days.
  • A time window only states when a vehicle can arrive at a stop, not when the Attr_[Impedance] is completed. To account for service time and leave before the time window is over, subtract Attr_[Impedance] from the TimeWindowEnd field.

Route class

The Route class stores the resulting route, or routes, from the analysis. As with other feature layers, its symbology can be accessed and altered from its Layer Properties dialog box.

The Route class is an output-only class; it is empty until the analysis is complete. Once the best route is found, it is displayed on the Network Analyst window.

Route properties

Output fields of routes

Output field

Description

ObjectID

The system-managed ID field.

Name

The name for the route is assigned automatically when the route layer is solved, either by reading the value from the RouteName property of the Stops class or, if that value is null, by integrating the name of the first stop in the route and the name of the last stop, for example, Graphic Pick 1 – Graphic Pick 8. You are able to rename the route from the Network Analyst window.

FirstStopID

The ObjectID of the route's first stop.

LastStopID

The ObjectID of the route's last stop.

StopCount

The number of stops visited by the route.

Total_[Impedance]

(for instance, Total_Minutes, where Minutes is the impedance for the network)

The total impedance from the beginning of the first stop to the end of the last stop. The total travel impedance and the Attr_[Impedance] of the visited stops are included in this value.

TotalWait_[Impedance]

(for example, TotalWait_Minutes, where Minutes is the impedance of the network)

This property stores the route's overall wait time, which is the time spent at stops waiting for time windows to open.

This property is only available when time windows are enabled on the network analysis layer.

TotalViolation_[Impedance]

(for example, TotalViolation_Minutes, where Minutes is the impedance of the network)

This property stores the route's overall violation time at stops. Violation time is added when the route arrives at a stop after the time window has ended; it is the difference between the ArriveTime and TimeWindowEnd.

This property is only available when time windows are enabled on the network analysis layer.

StartTime

The time the route begins.

This property is only available when time windows are enabled on the network analysis layer.

EndTime

The time the route is complete.

This property is only available when time windows are enabled on the network analysis layer.

Point, line, and polygon barriers

Barriers serve to temporarily restrict, add impedance to, and scale impedance on parts of the network. When a new network analysis layer is created, the barrier classes are empty. They are populated only when you add objects into them—but adding barriers is not required.

Barriers are available in all network analysis layers; therefore, they are described in a separate topic.

Learn more about barriers

Route analysis parameters

Analysis parameters are set on the Layer Properties dialog box for the analysis layer. The dialog box can be accessed different ways:

Learn about opening the network analysis Layer Properties dialog box

The Analysis Settings tab

The following subsections list parameters that you can set on the analysis layer. They are found on the Analysis Settings tab of the analysis layer's Layer Properties dialog box.

The Analysis Settings tab

Impedance

Any cost attribute can be chosen as the impedance, which is minimized while determining the best route. For instance, choosing the Minutes attribute results in the quickest route.

Learn more about cost attributes

Restrictions

You can choose which restriction attributes should be respected while solving the analysis. Restrictions, such as Oneway, should be used when finding solutions for vehicles that must obey one-way streets (for instance, nonemergency vehicles). If your network dataset contains additional restriction attributes, such as weight limit or height limit, those could be used as well.

Learn more about restrictions

Restriction attributes can also be used in conjunction with dynamic attributes. For example, an edge could be restricted if the vehicle is taller than the height of a tunnel.

Learn more about routing with parameterized attributes

Use Start Time

Use Start Time, in conjunction with the Specific Date or Time of Day and Day of Week properties, lets you specify when the route will begin from the first stop. A route can be assigned a start date and time only when a time-based cost attribute has been selected as the Impedance attribute.

If your network dataset includes traffic data, the results of the analysis could change depending on the start date and time that you specify here. For example, during rush hour, the route could take longer than during off-peak hours. Furthermore, the best path could change depending on traffic conditions at that time.

You can choose between entering a floating day (Day of Week) or a calendar day (Specific Date). For a calendar day, you provide the day, month, and year. For a floating date, you can choose Today or any day of the week (Sunday through Saturday). Floating days enable you to configure an analysis layer that can be reused, without having to remember to change the date.

Floating days are especially beneficial when used with traffic data. For example, if you choose the Day of Week and Today settings, the solver will generate results based on the historical traffic for the current day, which is determined from your computer's operating system. If, for example, you return the next day, May 5, and solve the same analysis layer again, the solution will be based on the historical traffic for the day of the week May 5 lands on. Likewise, when you choose Monday for the Day of Week property, then solve, the solution will be based on the historical traffic for the next Monday. However, if today is Monday, the solution uses today's historical traffic data.

If you use traffic data, the start time refers to the time zone of the edge or junction that the first stop is located on. There is one case in which this causes a solve to fail because the time zone can't be determined beforehand. That situation is created when your stops are located across multiple time zones and you check Reorder Stops To Find Optimal Route without preserving the first stop. You can avoid this failure by preassigning the first stop.

The route feature or features that are output by the solver have StartTime and EndTime properties. The StartTime value will match the value that you enter in the Use Start Time settings of the route analysis layer. The EndTime will be calculated from the start time and the duration of the route. These start and end times are also used when directions are generated. By default, the start time is 8:00 AM.

Learn more about historical traffic data

Use Time Windows

If a stop can be visited only during a particular time of day, its time window can be stored in the TimeWindowStart and TimeWindowEnd properties of the network location (stop). This check box enables or disables the usage of those time windows. If time windows are enabled, the route will be modified such that it honors the time windows. If the route is unable to honor some time windows, the affected stops will be symbolized as time-window violations.

Learn about routing with time windows

Reorder Stops To Find Optimal Route

By default, a route traverses stops in the order you define. However, you can possibly shorten the route further by letting Network Analyst find the best order. It will account for a variety of variables, such as time windows. Another option is to preserve the origin and destination while allowing Network Analyst to reorder the intermediary stops.

When you check this property, the route analysis changes from a shortest-path problem to a traveling salesperson problem (TSP).

U-turns at Junctions

ArcGIS Network Analyst can allow U-turns everywhere, nowhere, only at dead ends (or culs-de-sac), or only at intersections and dead ends. Allowing U-turns implies the vehicle can turn around at a junction and double back on the same street.

Learn more about U-turn policies

Output Shape Type

The route features that are output by the analysis can be represented in one of four ways.

NoteNote:

No matter which output shape type you choose, the best route is always determined by the network impedance, never Euclidean distance. This means that only the route shapes are different, not the underlying traversal of the network.

  • True Shape gives the exact shape of the resulting route.

    Route as true shape

  • True Shape with Measures gives the exact shape of the resulting route. Furthermore, the output includes route measurements for linear referencing. The measurements increase from the first stop and record the cumulative impedance.

    Learn more about linear referencing

  • Straight Line results in a single, straight line between the stops.

    Straight line shape for route

  • When the output shape type is set to None, no shape is returned.

Use Hierarchy

If the network dataset has a hierarchy attribute, you can use the hierarchy during the analysis. Using a hierarchy results in the solver preferring higher-order edges to lower-order edges. Hierarchical solves are faster, and they can be used to simulate the driver preference of traveling on freeways instead of local roads—even if that means a longer trip. Not using a hierarchy, however, yields an exact route for the network dataset.

Learn more about routing with hierarchy

Ignore Invalid Locations

This property allows you to ignore invalid network locations and solve the analysis layer from valid network locations only. If this option is not checked and you have unlocated network locations, the solve may fail. In either case, the invalid locations are ignored in the analysis.

Directions

With the Directions properties, you can set the units for displaying distance and, optionally, time (if you have a time attribute). Additionally, you can choose to open directions automatically after the generation of a route. (If you choose not to display directions automatically, you can click the Directions Window button Directions Window on the Network Analyst toolbar to display directions).

The Accumulation tab

Under the Accumulation tab, you can choose cost attributes from the network dataset to be accumulated on the route objects. These accumulation attributes are purely for reference; the solver only uses the cost attribute specified by the analysis layer's Impedance parameter to calculate the route.

For each cost attribute that is accumulated, a Total_[Impedance] property is added to the routes that are output by the solver.

The Network Locations tab

The parameters on the Network Locations tab are used to find network locations and set values for their properties.

Learn more about network locations

Directions

Directions can be displayed in ArcMap after the generation of a route in route analysis.

To display directions, on the Network Analyst toolbar, click the Directions Window button Directions Window.

Related Topics


2/2/2012