ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Output from SolveVehicleRoutingProblem

  • out_stops
  • out_routes
  • out_directions
  • out_unassigned_stops
  • solve_succeeded

Upon successful execution, the service returns the solution to the specified vehicle routing problem. The solution is made up of the following output parameters:

out_stops

Use this parameter to access 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 following provides a description of attributes that are returned for each stop:

Field nameDescription

ObjectID

A unique identifier for the stop. This identifier is auto generated by the service.

Name

The name of the stop. The value of this attribute is same as the Name attribute of the depots, orders, or the breaks parameters from the request. You can use the StopType attribute to determine if the Name attribute value refers to a depot, order or a break.

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 the value of this attribute aren't stored. You should interpret the units according to the way in which you specified the Quantities attribute of the routes parameter in the request and the PickupQuantities and DeliveryQuantities attributes of the orders parameters in the request.

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 the value of this attribute aren't stored. You should interpret the units according to the way in which you specified the Quantities attribute of the routes parameter in the request and the PickupQuantities and DeliveryQuantities attributes of the orders parameters in the request.

StopType

Indicates whether the stop represents a depot, order, or break. The attribute value is an integer which can be interpreted in the following way:

  • 0: The stop is an order.
  • 1: The stop is depot.
  • 2: The stop is a break.

RouteName

The name of the route that makes the stop.

Sequence

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

FromPreviousTravelTime

The elapsed travel time from the route's previous stop to the current stop. The value is in the units specified by the time_units parameter.

FromPreviousDistance

The distance along the route from the previous stop to the current stop. The value is in the units specified by the distance_units parameter.

ArriveCurbApproach

Indicates which side of the vehicle the curb is on when arriving at the stop. A value of 1 means the right side of vehicle; 2 indicates the left side.

DepartCurbApproach

Indicates which side of the vehicle the curb is on when departing from the stop. A value of 1 means the right side of vehicle; 2 indicates the left side.

ArriveTime

The time of day when the route arrives at the stop. The time-of-day value for this attribute is in the time zone in which the stop is located.

DepartTime

The time of day when the route departs from the stop. The time-of-day value for this attribute is in the time zone in which the stop is located.

ArriveTimeUTC

The time of day when the route arrives at the stop. This value is given in Coordinated Universal Time (UTC).

DepartTimeUTC

The time of day when the route departs from the stop. This value is given in Coordinated Universal Time (UTC).

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. The value is in the units specified by the time_units parameter.

ViolationTime

The amount of time elapsed from the end of the stop's time window to the arrival of the route vehicle. The value is in the units specified by the time_units parameter.

out_routes

Use this parameter to access the drivers, vehicles, and vehicle route paths of a vehicle routing problem. The populate_route_lines and route_line_simplification_tolerance parameters highly influence the shape of the output routes. The route geometries are returned in the spatial reference specified as the env:outSR parameter.

The following provides a description of fields that are returned for each route:

Field nameDescription

ObjectID

A unique identifier for the route. This identifier is auto generated by the service.

Name

The name of the route.

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 the value of this attribute aren't stored. You should interpret the units according to the way in which you specified the Quantities attribute of the routes parameter in the request and the PickupQuantities and DeliveryQuantities attributes of the orders parameters in the request.

ViolationConstraints

Contains a summary of constraints that are violated when assigning the order to any of the routes. The service assigns a unique integer for each violated constraint. The ViolatedConstraints attribute value is an integer representing the sum of all the constraints that are violated by the route. In order to determine the individual constraints that are violated, you can treat the attribute value as a bit mask and derive the values for the individual bits. For instance, the combination of Capacities exceeded (2) and Hard route zone (128) is coded as 130 (2 +128).

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

  • MaxOrderCount exceeded (1): The preassigned orders can't 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 MaxOrderCount attribute for the routes parameter.
  • Capacities exceeded (2): The preassigned orders can't be assigned to the route since assigning the orders would exceed the total route capacity as specified by the Capacities attribute for the routes parameter.
  • 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 MaxTotalTime attribute for the routes parameter.
  • 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 MaxTotalTravelTime attribute for the routes parameter.
  • 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 MaxTotalDistance attribute for the routes parameter.
  • Hard time window (32): There is a hard time window violation on the start depot, end depot, or break associated with the route.
  • Unmatched speciality (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 MaxTransitTime attribute for the order_pairs parameter.
  • Order pair violation (512): An order belongs to an order pair and can't be assigned to the preassigned route.
  • Unreachable (1024): A preassigned order is located on a street 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 can't be inserted anywhere without introducing other violations.
  • MaxTravelTimeBetweenBreaks exceeded (8192): The solver was unable to insert a break within the time specified by the MaxTravelTimeBetweenBreaks attribute for the breaks parameter. This is often caused by preassigning a sequence to a break such that it can't be reached within the maximum travel time.
  • Break MaxCumulWorkTime exceeded (16384): The service was unable to insert a break within the time specified by the MaxCumulWorkTime attribute for the breaks parameter. This is often caused by preassigning a sequence to a break such that it can't be reached within the maximum work time.

OrderCount

The number of orders assigned to the route.

TotalCost

The total operating cost of the route, which is the sum of the following attribute 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 attribute values.

TotalTime

The total route duration. This includes travel times as well as service and wait times at orders, depots, and breaks. The value is in the units specified by the time_units parameter. The TotalTime value is the sum of the following attribute values:

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

TotalOrderServiceTime

The total service time spent at all orders on the route. The value is in the units specified by the time_units parameter.

TotalBreakServiceTime

The total service time spent at all breaks on the route. The value is in the units specified by the time_units parameter.

TotalTravelTime

The total travel time for the route. The value is in the units specified by the time_units parameter.

TotalDistance

The total travel distance for the route. The value is in the units specified by the distance_units parameter.

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. The time-of-day value for this attribute is in the time zone 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. The time-of-day value for this attribute is in the time zone on which the ending depot is located.

TotalWaitTime

The total wait time at all orders, depots, and breaks on the route. The value is in the units specified by the time_units parameter.

TotalViolationTIme

The total violation time at all orders and breaks on the route. The value is in the units specified by the time_units parameter.

RenewalCount

For a route with renewals, this is equal to the number of visits to 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 value is in the units specified by the time_units parameter.

Shape_Length

The length of the route in the units of the spatial reference specified for the routes. By default the length is reported in decimal degrees if the env:outSR parameter is not specified.

StartTimeUTC

The start time of the route in Coordinated Universal Time (UTC).

EndTimeUTC

The end time of the route in Coordinated Universal Time (UTC).

out_directions

Use this parameter to access the turn-by-turn instructions to help drivers follow their assigned routes. The parameter includes the driving directions as well as the geometry for the directions feature corresponding to the text. The shape for the directions feature is determined from the underlying streets included in the route. The feature geometries are returned in the spatial reference specified as the env:outSR parameter. The features are empty if thepopulate_directions parameter is false. The directions_language, and the directions_style_name parameters highly influence the driving directions.

The following provides a description of fields that are returned for directions features:

Field nameDescription

ObjectID

A unique identifier for the directions feature. This identifier is auto generated by the service.

Name

The name of the route that the driving action applies to. This value is same as the Name attribute from out_routes parameter.

ArriveTime

The time of day to initiate the given driving action. The value is reported as milliseconds since midnight January 1, 1970.

Type

Indicates the type of maneuver that the direction feature represents or the type of the directions text. In order to determine if Type refers to a maneuver type or a directions string type, you need to check the value of SubItemType field.

Type can be used, for example, to assign a different icon for a direction text based on the maneuver type or use a special formatting style based on the directions string type when displaying the driving directions in your applications

The Type value is an integer from the Maneuver Types or the Directions String Types tables.

Maneuver types

ValueDescription

0

Unknown

1

Arrive at Stop

2

Go straight

3

Bear left

4

Bear right

5

Turn left

6

Turn right

7

Make sharp left

8

Make sharp right

9

Make U-turn

10

Take ferry

11

Take roundabout

12

Merge to highway

13

Exit highway

14

Go on another highway

15

At fork keep center

16

At fork keep left

17

At fork keep right

18

Depart stop

19

Trip planning item

20

End of ferry

21

Ramp right

22

Ramp left

23

Turn left and immediately turn right

24

Turn right and immediately turn left

25

Turn right and immediately turn right

26

Turn left and immediately turn left

Directions string types

ValueDescription

0

General directions string type

1

Depart directions string type

2

Arrive directions string type

3

Length directions string type

4

Time directions string type

5

Time summary directions string type

6

Time Window directions string type

7

Violation Time directions string type

8

Wait Time directions string type

9

Service Time directions string type

10

Estimated Arrival Time directions string type

11

Cumulative Length directions string type

12

Street name directions string type

13

Alternate street name directions string type

14

Sign branch information directions string type

15

Sign toward information directions string type

16

Cross street name directions string type

17

Sign exit number directions string type

SubItemType

Specifies whether the Type field refers to an integer from the Directions String Types table or the Maneuver Types table.

  • If the SubItemType value is 1, the Type refers to the values from the Maneuver Types table.
  • If the SubItemType value is 2, the Type refers to the values from the Directions String Types table.

Text

A text description of the driving direction.

ElaspsedTime

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. The value is in the units specified by the time_units parameter.

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. The value is in the units specified by the distance_units parameter.

This value is zero for driving directions that occur at the same location where the next one begins. For example, the DriveDistance is 0 for the directions text at the start of the route.

Shape_Length

The length of the directions feature in the units of the spatial reference specified for the routes. By default the length is reported in decimal degrees if the env:outSR parameter is not specified.

out_unassigned_stops

Use this parameter to access the orders that couldn't be visited by any routes. You can also determine why the stop couldn't be visited and can make the necessary changes to fix the problem.

The following provides a description of attributes that are returned for each unassigned stop:

Field nameDescription

ObjectID

A unique identifier for the stop. This identifier is auto generated by the service.

StopType

Indicates whether the stop represents a depot, order, or break. The attribute value is an integer which can be interpreted in the following way:

  • 0: The stop is an order.
  • 1: The stop is depot.
  • 2: The stop is a break.

Name

The name of the stop. The value of this attribute is same as the Name attribute of the depots, orders, or the breaks parameters from the request. You can use the StopType attribute to determine if the Name attribute value refers to a depot, order or a break.

ViolationConstraints

Contains a summary of constraints that are violated when assigning the order to any of the routes. The service assigns a unique integer for each violated constraint. The ViolatedConstraints attribute value is an integer representing the sum of all the constraints that are violated by the route. In order to determine the individual constraints that are violated, you can treat the attribute value as a bit mask and derive the values for the individual bits. For instance, the combination of Capacities exceeded (2) and Hard route zone (128) is coded as 130 (2 +128).

If an order causes a constraint to be violated, a combination of one or more of the violations listed below could be assigned to the ViolatedConstraints attribute.

  • MaxOrderCount exceeded (1): The preassigned orders can't 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 MaxOrderCount attribute for the routes parameter.
  • Capacities exceeded (2): The preassigned orders can't be assigned to the route since assigning the orders would exceed the total route capacity as specified by the Capacities attribute for the routes parameter.
  • 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 MaxTotalTime attribute for the routes parameter.
  • 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 MaxTotalTravelTime attribute for the routes parameter.
  • 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 MaxTotalDistance attribute for the routes parameter.
  • Hard time window (32): There is a hard time window violation on the start depot, end depot, or break associated with the route.
  • Unmatched speciality (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 MaxTransitTime attribute for the order_pairs parameter.
  • Order pair violation (512): An order belongs to an order pair and can't be assigned to the preassigned route.
  • Unreachable (1024): A preassigned order is located on a street 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 can't be inserted anywhere without introducing other violations.
  • MaxTravelTimeBetweenBreaks exceeded (8192): The solver was unable to insert a break within the time specified by the MaxTravelTimeBetweenBreaks attribute for the breaks parameter. This is often caused by preassigning a sequence to a break such that it can't be reached within the maximum travel time.
  • Break MaxCumulWorkTime exceeded (16384): The service was unable to insert a break within the time specified by the MaxCumulWorkTime attribute for the breaks parameter. This is often caused by preassigning a sequence to a break such that it can't be reached within the maximum work time.
Dive-in:

The ViolatedConstraints value of an unrouted order may or may not describe all its violations. If the violation is severe enough to immediately exclude the order from further consideration, the service does so, which prevents any other violations from being discovered for that order. If a violation is encountered that doesn't automatically stop a solution from being generated, the violation is noted in ViolatedConstraints, and the solver continues to consider the order. Any further violations like these are added to the ViolatedConstraints field until either (a) the service finds a violation that prematurely stops the solve process for that particular order or (b) the service finds an overall solution to the problem.

Status

Indicates the status of the stop in the solution returned by the service. The attribute value is an integer which can be interpreted in the following way.

  • 0: The stop was successfully evaluated.
  • 3: The street on which the stop is located not traversable. This can occur is the street is restricted by a restriction specifed by the restrictions parameter.
  • 4: The attribute values of the stop fall outside the coded value or range domains expected by the service. For example, a negative number may exist where positive numbers are required
  • 5: The stop can't be arrived at by the service.

Tip:

The out_unassigned_stops parameter does not contain the geometry of the stops. In order to visualize the unaasigned stops on a map, you can do the following

  • Use the StopType attribute to determine if the stop feature corresponds to a feature in the orders or depots parameters .
  • Use the Name attribute to find the feature with the same name in the orders or depots parameters.

solve_succeeded

Use this parameter to determine if the service was able to successfully find the solution for the input vehicle routing problem. The error messages for the failure can be obtained by making a request to get the status of the job.

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2019 Esri. | Privacy | Legal