Output from Solve Vehicle Routing Problem

The Solve Vehicle Routing Problem geoprocessing tool produces the following table and feature classes as output: Stops, UnassignedStops, Routes, and Directions. Descriptions of the output tables and feature classes and their corresponding field attributes are described in the subsections below.

Routes feature class

The Routes line feature class represents the drivers, vehicles, and vehicle route paths of a vehicle routing problem. The default name of this output feature class is Routes, but you can give it a different name by changing the Output Routes Name parameter (output_routes_name in Python) prior to solving.

ArcGIS assigns the same coordinate system that the underlying network dataset uses for the Routes feature class. This can be controlled by specifying a value for the Output Coordinate System geoprocessing environment.

The field names of the Routes feature class are listed and described below.

Field nameDescription

ObjectID

The system-managed ID field.

Name

The name of the route.

Shape

The geometry field indicating the shape of the route.

Use the Populate Route Lines parameter (populate_route_lines in Python) to choose whether to populate this field.

The Routes feature class is always created and populated with data during the execution of Solve Vehicle Routing Problem. However, the Populate Route Lines parameter (populate_route_lines in Python) allows you to choose whether to generate and store Shape field values for the line features. Not populating Shape field values makes the solve operation faster and reduces the size of server-client data exchanges; but people often want to visualize routes on a map, so populating the Shape field may be required.

ViolatedConstraints

This field contains a summary of violated constraints and is set after a solve operation. If a route causes a constraint to be violated, a combination of one or more of the violations listed below could be assigned to the field.

Dive-in:

The coded value that represents the text description is shown in the list below in parentheses. Notice that the coded values are part of a geometric sequence that increases by doubling the last value. This allows various combinations of violations to be coded. For instance, the combination of Capacities exceeded (2) and Hard route zone (128) is coded as 130 (2 +128).

  • MaxOrderCount exceeded (1)—The preassigned orders cannot be assigned to the route since assigning the orders would exceed the maximum number of orders that can be assigned to the route as specified by the route's MaxOrderCount field value.
  • Capacities exceeded (2)—The preassigned orders cannot be assigned to the route since assigning the orders would exceed the total route capacity as specified by the route's Capacities field value.
  • MaxTotalTime exceeded (4)—The travel time from the start depot to the end depot plus the service and wait times at both depots and any break exceeds the total time for the route as specified by the route's MaxTotalTime field value.
  • MaxTotalTravelTime exceeded (8)—The travel time from the start depot to the end depot exceeds the total travel time for the route as specified by the route's MaxTotalTravelTime field value.
  • MaxTotalDistance exceeded (16)—The travel distance from the start depot to the end depot exceeds the total travel distance for the route as specified by the route's MaxTotalDistance field value.
  • Hard time window (32)—There is a hard time window violation on the start depot, end depot, or break associated with the route.
  • Unmatched specialty (64)—The specialties required by an order are not found on the target route.
  • Hard route zone (128)—An order that was preassigned to the route does not fall within a hard route zone.
  • Order pair MaxTransitTime exceeded (256)—There is an order pair preassigned to the route, and assigning the orders in the order pair would exceed the maximum transit time for the order pair as specified by the order pair's MaxTransitTime field value.
  • Order pair violation (512)—An order belongs to an order pair and cannot be assigned to the preassigned route.
  • Unreachable (1024)—A preassigned order is located on a network element that cannot be reached by the route.
  • Cannot insert required break (2048)—A break for the route has a null sequence value in the presence of preassigned orders, and the break cannot be inserted anywhere without introducing other violations.
  • Cannot insert required renewal (4096)—A route exceeds its capacity and needs to visit a route renewal; however, the associated route renewal has a null sequence value in the presence of preassigned orders and cannot be inserted anywhere without introducing other violations.
  • MaxTravelTimeBetweenBreaks exceeded (8192)—The solver was unable to insert a break within the time specified by the break's MaxTravelTimeBetweenBreaks field. This is often caused by preassigning a sequence to a break such that it cannot be reached within the maximum travel time.

  • Break MaxCumulWorkTime exceeded (16384)—The solver was unable to insert a break within the time specified by the break's MaxCumulWorkTime field. This is often caused by preassigning a sequence to a break such that it cannot be reached within the maximum work time.
  • InboundArriveTime or OutboundDepartTime order violation (32768)—The order couldn't be serviced within the inbound arrive time or output depart time constraints. This violation occurs when all the routes' LatestStartTime field values precede the InboundArriveTime values or none of the routes can reach a depot before the order's OutboundDepartTime value.
  • Cannot anchor first/last (65536)—The order has an Anchor first or Anchor last assignment rule, but the solver was not able to honor this constraint. This violation occurs when the number of Anchor first orders or the number of Anchor last orders is greater than the number of available routes.

  • ViolatedConstraint_1
  • ViolatedConstraint_2
  • ViolatedConstraint_3
  • ViolatedConstraint_4

Shows a single violated constraint per field. The descriptions of the violations can be seen in ViolationConstraints.

  • MaxOrderCount exceeded (0)—The preassigned orders cannot be assigned to the route since assigning the orders would exceed the maximum number of orders that can be assigned to the route as specified by the route's MaxOrderCount field value.
  • Capacities exceeded (1)—The preassigned orders cannot be assigned to the route since assigning the orders would exceed the total route capacity as specified by the route's Capacities field value.
  • MaxTotalTime exceeded (2)—The travel time from the start depot to the end depot plus the service and wait times at both depots and any break exceeds the total time for the route as specified by the route's MaxTotalTime field value.
  • MaxTotalTravelTime exceeded (3)—The travel time from the start depot to the end depot exceeds the total travel time for the route as specified by the route's MaxTotalTravelTime field value.
  • MaxTotalDistance exceeded (4)—The travel distance from the start depot to the end depot exceeds the total travel distance for the route as specified by the route's MaxTotalDistance field value.
  • Hard time window (5)—There is a hard time window violation on the start depot, end depot, or break associated with the route.
  • Unmatched specialty (6)—The specialties required by an order are not found on the target route.
  • Hard route zone (7)—An order that was preassigned to the route does not fall within a hard route zone.
  • Order pair MaxTransitTime exceeded (8)—There is an order pair preassigned to the route, and assigning the orders in the order pair would exceed the maximum transit time for the order pair as specified by the order pair's MaxTransitTime field value.
  • Order pair violation (9)—An order belongs to an order pair and cannot be assigned to the preassigned route.
  • Unreachable (10)—A preassigned order is located on a network element that cannot be reached by the route.
  • Cannot insert required break (11)—A break for the route has a null sequence value in the presence of preassigned orders, and the break cannot be inserted anywhere without introducing other violations.
  • Cannot insert required renewal (12)—A route exceeds its capacity and needs to visit a route renewal; however, the associated route renewal has a null sequence value in the presence of preassigned orders and cannot be inserted anywhere without introducing other violations.
  • MaxTravelTimeBetweenBreaks exceeded (13)—The solver was unable to insert a break within the time specified by the break's MaxTravelTimeBetweenBreaks field. This is often caused by preassigning a sequence to a break such that it cannot be reached within the maximum travel time.

  • Break MaxCumulWorkTime exceeded (14)—The solver was unable to insert a break within the time specified by the break's MaxCumulWorkTime field. This is often caused by preassigning a sequence to a break such that it cannot be reached within the maximum work time.
  • InboundArriveTime or OutboundDepartTime order violation (15)—The order couldn't be serviced within the inbound arrive time or output depart time constraints. This violation occurs when all the routes' LatestStartTime field values precede the InboundArriveTime values or none of the routes can reach a depot before the order's OutboundDepartTime value.
  • Cannot anchor first/last (16)—The order has an Anchor first or Anchor last assignment rule, but the solver was not able to honor this constraint. This violation occurs when the number of Anchor first orders or the number of Anchor last orders is greater than the number of available routes.

OrderCount

The number of orders assigned to the route.

TotalCost

The total operating cost of the route, which is the sum of the following field values:

  • FixedCost
  • RegularTimeCost
  • OvertimeCost
  • DistanceCost

RegularTimeCost

The cost of regular work time, excluding any unpaid breaks.

OvertimeCost

The cost of overtime work, excluding any unpaid breaks.

DistanceCost

The distance cost component obtained by multiplying the TotalDistance and CostPerUnitDistance field values. This field value is set to zero if a distance attribute is not specified prior to solving.

TotalTime

The total route duration. This includes travel times as well as service and wait times at orders, depots, and breaks. The TotalTime value is the sum of the following field values:

  • StartDepotServiceTime
  • EndDepotServiceTime
  • TotalOrderServiceTime
  • TotalBreakServiceTime
  • TotalRenewalServiceTime
  • TotalWaitTime
  • TotalTravelTime

The unit for this field value is specified by the Time Field Units parameter (time_units in Python).

TotalOrderServiceTime

The total service time spent at all orders on the route.

The unit for this field value is specified by the Time Field Units parameter (time_units in Python).

TotalBreakServiceTime

The total service time spent at all breaks on the route.

The unit for this field value is specified by the Time Field Units parameter (time_units in Python).

TotalTravelTime

The total travel time for the route.

The unit for this field value is specified by the Time Field Units parameter (time_units in Python).

TotalDistance

The total travel distance for the route.

The unit for this field value is specified by the Distance Field Units parameter (distance_units for Python).

This field value is set to zero if a distance attribute is not specified prior to solving.

StartTime

The starting time of the route. The route may start before the beginning of its start depot's time window, in which case there is a wait time at the starting depot.

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

EndTime

The ending time of the route. The route ends upon completion of service at the ending depot.

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

TotalWaitTime

The total wait time at all orders, depots, and breaks on the route.

The unit for this field value is specified by the Time Field Units parameter (time_units in Python).

TotalViolationTime

The total violation time at all orders and breaks on the route.

The unit for this field value is specified by the Time Field Units parameter (time_units in Python).

RenewalCount

For a route with renewals, this is equal to the number of stops at depots for the purpose of renewing a vehicle, that is, loading or unloading a vehicle.

TotalRenewalServiceTime

For a route with renewals, the total service time spent at all renewal visits on the route.

The unit for this field value is specified by the Time Field Units parameter (time_units in Python).

Directions feature class

Directions is a line feature class representing turn-by-turn instructions to help drivers follow their assigned routes. The default name of this output feature class is Directions, but you can give it a different name by changing the Output Directions Name parameter (output_directions_name in Python) prior to solving. Also, the Solve Vehicle Routing Problem tool always creates the Directions feature class; however, you can use the Populate Directions parameter (populate_directions in Python) to choose whether to populate the feature class with features during solve. By default, it is not populated. If you do not need directions, you can significantly reduce solve times and the amount of data that is transferred from servers to clients.

ArcGIS assigns the same coordinate system that the underlying network dataset uses to the Directions feature class. This can be controlled by specifying a value for the Output Coordinate System geoprocessing environment.

The field names of the Directions feature class are listed and described below.

Field nameDescription

ObjectID

The system-managed ID field.

Shape

The geometry field indicating the shape of the lines.

RouteName

The name of the route to which the driving action applies.

ArriveTime

The time of day to initiate the given driving action. If the route spans multiple days, the date and time of day are displayed.

Type

This field is for advanced users who want to customize the driving-directions text. Most users can meet their requirements by ignoring this field and referring to the Text field instead.

Type refers to a constant in one of two enumerations: esriDirectionsManueverType or esriDirectionsStringType. (See the SubItemType field description to learn the enumerations to which the Type value refers.)

SubItemType

This field is for advanced users who want to customize the driving-directions text. Most users can meet their requirements by ignoring this field and referring to the Text field instead.

SubItemType works in combination with Type to create the driving direction shown in the Text field. The SubItemType field specifies whether the Type field refers to a constant value in the esriDirectionsManueverType enumeration or the esriDirectionsStringType enumeration.

  • If the SubItemType value is 1, the Type value refers to esriDirectionsManeuverType.
  • If the SubItemType value is 2, the Type value refers to esriDirectionsStringType.

Text

A text description of the driving direction.

ElapsedTime

The time elapsed from when the current driving direction starts until the next one starts, or until the route ends for the last driving direction.

Some driving directions include extra records for service time, violation time, and so on. In these cases, the elapsed time is replicated for each record. To sum the total elapsed time, select those records with a Type value of 1 and sum those records.

The unit for this field value is specified by the Time Field Units parameter (time_units in Python).

DriveDistance

The distance from where the current driving direction occurs to where the next one occurs, or to where the route ends for the last driving direction.

This value is zero for driving directions that occur at the same location where the next one begins.

Stops table

The Stops table provides information about stops made at depots, orders, and breaks. The information includes which routes make the stops, the arrival and departure times, and the stop sequence.

The default name of this output table is Stops, but you can give it a different name by changing the Output Stops Name parameter (output_stops_name in Python) prior to solving.

The field names of the Stops table are listed and described below.

Field nameDescription

ObjectID

The system-managed ID field.

Name

The name of the stop. This is a foreign key to the name of the depot, order, or break in the input feature sets and record set. The input feature or record set is specified by the StopType field.

PickupQuantities

The amount of cargo or number of people to be picked up from a stop. If multiple dimensions are delivered to a stop, each quantity is separated by a space.

The units for this field are not stored. You should interpret the units according to the way in which you entered the Quantities field of the input routes and the PickupQuantities and DeliveryQuantities fields of the input orders. (All of these fields should have been entered using the same units and number of dimensions.)

DeliveryQuantities

The amount of cargo or number of people to be delivered to a stop. If multiple dimensions are delivered to a stop, each quantity is separated by a space.

The units for this field are not stored. You should interpret the units according to the way in which you entered the Quantities field of the input routes and the PickupQuantities and DeliveryQuantities fields of the input orders. (All of these fields should have been entered using the same units and number of dimensions.)

StopType

Indicates whether the stop represents a depot, an order, or a break.

The field stores a coded value that can be interpreted in the following way:

  • Order (0)
  • Depot (1)
  • Break (2)

RouteName

The name of the route that makes the stop.

Sequence

The relative sequence in which the assigned route visits the stop.

Sorting by the RouteName and Sequence fields creates an ordered lists of stops for each route.

FromPreviousTravelTime

The elapsed travel time from the route's previous stop to the current stop.

The unit for this field value is specified by the Time Field Units parameter (time_units in Python).

FromPreviousDistance

The distance along the route from the previous stop to the current stop.

The unit for this field value is specified by the Distance Field Units parameter (distance_units for Python).

ArriveCurbApproach

Indicates which side of the vehicle the curb is on when arriving at the stop.

DepartCurbApproach

Indicates which side of the vehicle the curb is on when departing from the stop.

ArriveTime

The time of day when the route arrives at the stop.

When the network dataset is configured with time zones, the time-of-day value corresponds with the time zone in which the stop is located; otherwise, it corresponds with the time zone that is configured on the computer used to solve the analysis.

DepartTime

The time of day when the route departs from the stop.

When the network dataset is configured with time zones, the time-of-day value corresponds with the time zone in which the stop is located; otherwise, it corresponds with the time zone that is configured on the computer used to solve the analysis.

ArriveTimeUTC

The time of day when the route arrives at the stop. This value is given in coordinated universal time (UTC).

This field is null if time zones are not configured on the network dataset.

DepartTimeUTC

The time of day when the route departs from the stop. This value is given in coordinated universal time (UTC).

This field is null if time zones are not configured on the network dataset.

WaitTime

The wait time or layover at the stop. For example, a wait time is incurred when a route must wait at an order for a time window to open.

ViolationTime

The amount of time elapsed from the end of the stop's time window to the arrival of the route vehicle.

Visualizing stops

The Stops table is not a feature class, which means you cannot simply add the table to a map to see where the stops occur. Instead, you need to take extra steps to visualize stops on a map. (Guidance on how to accomplish this is provided below.) This design may seem unnecessarily difficult if you need to display the stops of a route on a map; however, keep in mind this tool is meant to create VRP web services. As such, the output is engineered to be as concise as possible to minimize server processing and data transferring. Nonetheless, the output is not too concise; it still provides you with the essential information needed to visualize stops as point features.

For example, to see where stops occur at orders, link the Stops table to the original Orders feature set that was used as input. You can select and join these datasets through the StopType and Name fields on the Stops table and the Name field on the Orders feature set. You can use a similar approach for viewing where stops occur at depots.

Tip:

Solve Vehicle Routing Problem creates several input feature sets, including the Orders and Depots feature sets. As the tool solves, these in-memory feature sets are removed from ArcMap. You can add them back, however. To do so, follow these steps:

  1. Open the Results window from the Geoprocessing menu.
  2. In the Results window, go to the results of the operation you want a feature set from.
  3. Expand the appropriate Solve Vehicle Routing Problem result.
  4. Expand Inputs.
  5. Right-click the feature set you want to view and choose Add to Display. The feature set appears in the map and table of contents.
  6. Optionally click the List By Source button on the Table Of Contents window to see where the data is stored.

Unlike orders and depots, breaks are not associated with an input feature set. You need to use a different method to visualize them. You can generate directions in the analysis, select the lines that represent features, and use the Feature Vertices To Points tool to convert them to points.

UnassignedStops table

The UnassignedStops table lists the orders that could not be visited by any routes. It also states why the stop could not be visited so that you can fix the problem.

The default name of this output table is Stops, but you can give it a different name by changing the Output Unassigned Stops Name parameter (output_unassigned_stops_name) prior to solving.

The field names of the Stops table are listed and described below.

Field nameDescription

ObjectID

The system-managed ID field.

StopType

Indicates whether the stop represents a depot, an order, or a break. The field stores a coded value that can be interpreted in the following way:

  • Order (0)
  • Depot (1)
  • Break (2)

Name

The name of the stop.

This is a foreign key to the name of the depot, order, or break in the input feature sets and record set. The input feature or record set is specified by the StopType field.

ViolatedConstraints

This field contains a summary of violated constraints and is set after a solve operation. If a constraint is violated, a combination of one or more of the violations listed below could be assigned to the field.

Dive-in:

The coded value that represents the text description is shown in the list below in parentheses. Notice that the coded values are part of a geometric sequence that increases by doubling the last value. This allows various combinations of violations to be coded. For instance, the combination of Capacities exceeded (2) and Hard route zone (128) is coded as 130 (2 +128).

  • MaxOrderCount exceeded (1)—The preassigned orders cannot be assigned to the route since assigning the orders would exceed the maximum number of orders that can be assigned to the route as specified by the route's MaxOrderCount field value.
  • Capacities exceeded (2)—The preassigned orders cannot be assigned to the route since assigning the orders would exceed the total route capacity as specified by the route's Capacities field value.
  • MaxTotalTime exceeded (4)—The travel time from the start depot to the end depot plus the service and wait times at both depots and any break exceeds the total time for the route as specified by the route's MaxTotalTime field value.
  • MaxTotalTravelTime exceeded (8)—The travel time from the start depot to the end depot exceeds the total travel time for the route as specified by the route's MaxTotalTravelTime field value.
  • MaxTotalDistance exceeded (16)—The travel distance from the start depot to the end depot exceeds the total travel distance for the route as specified by the route's MaxTotalDistance field value.
  • Hard time window (32)—There is a hard time window violation on the start depot, end depot, or break associated with the route.
  • Unmatched specialty (64)—The specialties required by an order are not found on the target route.
  • Hard route zone (128)—An order that was preassigned to the route does not fall within a hard route zone.
  • Order pair MaxTransitTime exceeded (256)—There is an order pair preassigned to the route, and assigning the orders in the order pair would exceed the maximum transit time for the order pair as specified by the order pair's MaxTransitTime field value.
  • Order pair violation (512)—An order belongs to an order pair and cannot be assigned to the preassigned route.
  • Unreachable (1024)—A preassigned order is located on a network element that cannot be reached by the route.
  • Cannot insert required break (2048)—A break for the route has a null sequence value in the presence of preassigned orders, and the break cannot be inserted anywhere without introducing other violations.
  • Cannot insert required renewal (4096)—A route exceeds its capacity and needs to visit a route renewal; however, the associated route renewal has a null sequence value in the presence of preassigned orders and cannot be inserted anywhere without introducing other violations.
  • MaxTravelTimeBetweenBreaks exceeded (8192)—The solver was unable to insert a break within the time specified by the break's MaxTravelTimeBetweenBreaks field. This is often caused by preassigning a sequence to a break such that it cannot be reached within the maximum travel time.

  • Break MaxCumulWorkTime exceeded (16384)—The solver was unable to insert a break within the time specified by the break's MaxCumulWorkTime field. This is often caused by preassigning a sequence to a break such that it cannot be reached within the maximum work time.
  • InboundArriveTime or OutboundDepartTime order violation (32768)—The order couldn't be serviced within the inbound arrive time or output depart time constraints. This violation occurs when all the routes' LatestStartTime field values precede the InboundArriveTime values or none of the routes can reach a depot before the order's OutboundDepartTime value.
  • Cannot anchor first/last (65536)—The order has an Anchor first or Anchor last assignment rule, but the solver was not able to honor this constraint. This violation occurs when the number of Anchor first orders or the number of Anchor last orders is greater than the number of available routes.

  • ViolatedConstraint_1
  • ViolatedConstraint_2
  • ViolatedConstraint_3
  • ViolatedConstraint_4

Shows a single violated constraint per field. The descriptions of the violations can be seen in ViolationConstraints.

  • MaxOrderCount exceeded (0)—The preassigned orders cannot be assigned to the route since assigning the orders would exceed the maximum number of orders that can be assigned to the route as specified by the route's MaxOrderCount field value.
  • Capacities exceeded (1)—The preassigned orders cannot be assigned to the route since assigning the orders would exceed the total route capacity as specified by the route's Capacities field value.
  • MaxTotalTime exceeded (2)—The travel time from the start depot to the end depot plus the service and wait times at both depots and any break exceeds the total time for the route as specified by the route's MaxTotalTime field value.
  • MaxTotalTravelTime exceeded (3)—The travel time from the start depot to the end depot exceeds the total travel time for the route as specified by the route's MaxTotalTravelTime field value.
  • MaxTotalDistance exceeded (4)—The travel distance from the start depot to the end depot exceeds the total travel distance for the route as specified by the route's MaxTotalDistance field value.
  • Hard time window (5)—There is a hard time window violation on the start depot, end depot, or break associated with the route.
  • Unmatched specialty (6)—The specialties required by an order are not found on the target route.
  • Hard route zone (7)—An order that was preassigned to the route does not fall within a hard route zone.
  • Order pair MaxTransitTime exceeded (8)—There is an order pair preassigned to the route, and assigning the orders in the order pair would exceed the maximum transit time for the order pair as specified by the order pair's MaxTransitTime field value.
  • Order pair violation (9)—An order belongs to an order pair and cannot be assigned to the preassigned route.
  • Unreachable (10)—A preassigned order is located on a network element that cannot be reached by the route.
  • Cannot insert required break (11)—A break for the route has a null sequence value in the presence of preassigned orders, and the break cannot be inserted anywhere without introducing other violations.
  • Cannot insert required renewal (12)—A route exceeds its capacity and needs to visit a route renewal; however, the associated route renewal has a null sequence value in the presence of preassigned orders and cannot be inserted anywhere without introducing other violations.
  • MaxTravelTimeBetweenBreaks exceeded (13)—The solver was unable to insert a break within the time specified by the break's MaxTravelTimeBetweenBreaks field. This is often caused by preassigning a sequence to a break such that it cannot be reached within the maximum travel time.

  • Break MaxCumulWorkTime exceeded (14)—The solver was unable to insert a break within the time specified by the break's MaxCumulWorkTime field. This is often caused by preassigning a sequence to a break such that it cannot be reached within the maximum work time.
  • InboundArriveTime or OutboundDepartTime order violation (15)—The order couldn't be serviced within the inbound arrive time or output depart time constraints. This violation occurs when all the routes' LatestStartTime field values precede the InboundArriveTime values or none of the routes can reach a depot before the order's OutboundDepartTime value.
  • Cannot anchor first/last (16)—The order has an Anchor first or Anchor last assignment rule, but the solver was not able to honor this constraint. This violation occurs when the number of Anchor first orders or the number of Anchor last orders is greater than the number of available routes.

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 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.

Related topics