Add Vehicle Routing Problem Breaks (Network Analyst)

Summary

Creates breaks in a Vehicle Routing Problem (VRP) layer.

Usage

  • This tool will append rows to the Breaks sublayer under the VRP layer, and you can add all five breaks to a route at the same time. If the break schedule is the same for all routes, all breaks can be added to all the routes at once.

  • If the Target Route Name parameter value is not specified, breaks are created for each existing route.

  • To delete all existing breaks and create new breaks, check the Append To Existing Routes parameter checkbox(append_to_existing_breaks = "CLEAR" in Python).

  • Only one type of break can be added to a VRP; leave the other types of break values unspecified in the tool parameters.

Parameters

LabelExplanationData Type
Input Vehicle Routing Problem Layer

The vehicle routing problem analysis layer to which the breaks will be added.

Network Analyst Layer
Target Route Name
(Optional)

The route for the break parameters.  If this parameter is not specified, breaks are created for each existing route.

String
Break Type
(Optional)

Specifies the type of breaks for the current VRP layer. All breaks must be of the same type.

  • Time Window Break — Breaks take place during a specific time window. This is the default.
  • Maximum Travel Time Break — Breaks are taken after a certain amount of travel time. These values are given as the amount of time either until the first break or between breaks.
  • Maximum Work Time Break — Breaks are taken after a certain amount of cumulative time. These values are always an amount of elapsed time since the start of the route.
String
Break Properties
(Optional)

Specifies a time range within which the break will begin. To set up a time window break, use two time-of-day values.

The options below are enabled when the Break Type parameter is set to Time Window Break.

  • Is Paid—A Boolean value indicating whether the break is paid.
  • Break Duration—The duration of the break. This field can't contain null values and has a default value of 60.
  • Time Window Start—The start time of the time window.
  • Time Window End—The end time of the time window.
  • Maximum Violation Time—The maximum allowable violation time for a time window break. A time window is considered violated if the arrival time falls outside the time range. A zero value indicates that the time window cannot be violated, that is, the time window is hard. A nonzero value indicates the maximum delay time. For example, the break can begin up to 30 minutes beyond the end of its time window but the delay is penalized pursuant to the Time Window Violation Importance setting, which rates the importance of honoring time windows without causing violations.

Value Table
Break Properties
(Optional)

Specifies how long a person can drive before the break is required.

The properties below are enabled when the Break Type parameter is set to Maximum Travel Time Break.

  • Is Paid—A Boolean value indicating whether the break is paid.
  • Break Duration—The duration of the break. This field can't contain null values and has a default value of 60.
  • Maximum Travel Time Between Breaks—The maximum amount of travel time that can be accumulated before the break is taken. The travel time is accumulated either from the end of the previous break or, if a break has not yet been taken, from the start of the route.

    If this is the route's final break, The MaxTravelTimeBetweenBreaks field also indicates the maximum travel time that can be accumulated from the final break to the end depot.

    This field limits how long a person can drive until a break is required. For example, if the Time Field Units parameter (time_units in Python) of the analysis is set to Minutes, and the MaxTravelTimeBetweenBreaks field has a value of 120, the driver will get a break after two hours of driving. To assign a second break after two additional hours of driving, the second break's MaxTravelTimeBetweenBreaks field value must be 120.

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

Value Table
Break Properties
(Optional)

Specifies how long a person can work before a break is required.

The properties below are enabled when the Break Type parameter is set to Maximum Work Time Break.

  • Is Paid—A Boolean value indicating whether the break is paid.
  • Break Duration—The duration of the break. This field can't contain null values and has a default value of 60.
  • Maximum Cumulative Work Time—The maximum amount of work time that can be accumulated before the break is taken. Work time is always accumulated from the beginning of the route. Work time is the sum of travel time and service times at orders, depots, and breaks. However, this excludes wait time, which is the time a route (or driver) spends waiting at an order or depot for a time window to begin.

    The MaxCumulWorkTime field also indicates the maximum amount of work time that can be accumulated before the break is taken.

    This field limits how long a person can work until a break is required. For example, if the Time Field Units parameter (time_units in Python) is set to Minutes, the MaxCumulWorkTime field has a value of 120, and the ServiceTime field has a value of 15, the driver will get a 15-minute break after 2 hours of work.

    Continuing with this example, assume a second break is needed after 3 additional hours of work. To specify this break, you would enter 315 (5 hours and 15 minutes) as the second break's MaxCumulWorkTime field value. This number includes the MaxCumulWorkTime and ServiceTime field values of the preceding break, along with the 3 additional hours of work time before granting the second break. To avoid taking maximum work time breaks prematurely, remember that work time is accumulated from the beginning of the route and it includes the service time at previously visited depots, orders, and breaks.

Value Table
Append To Existing Breaks
(Optional)

Specifies whether new breaks will be appended to the existing breaks attribute table.

  • Checked—New breaks will be appended to the existing set in the breaks attribute table. This is the default.
  • Unchecked—Existing breaks will be replaced with new breaks.

Boolean

Derived Output

LabelExplanationData Type
Output Vehicle Routing Problem Layer

The updated network analyst layer.

Network Analyst Layer

arcpy.na.AddVehicleRoutingProblemBreaks(in_vrp_layer, {target_route}, {break_type}, {time_window_properties}, {travel_time_properties}, {work_time_properties}, {append_to_existing_breaks})
NameExplanationData Type
in_vrp_layer

The vehicle routing problem analysis layer to which the breaks will be added.

Network Analyst Layer
target_route
(Optional)

The route for the break parameters.  If this parameter is not specified, breaks are created for each existing route.

String
break_type
(Optional)

Specifies the type of breaks for the current VRP layer. All breaks must be of the same type.

  • TIME_WINDOW_BREAK Breaks take place during a specific time window. This is the default.
  • MAXIMUM_TRAVEL_TIME_BREAK Breaks are taken after a certain amount of travel time. These values are given as the amount of time either until the first break or between breaks.
  • MAXIMUM_WORK_TIME_BREAK Breaks are taken after a certain amount of cumulative time. These values are always an amount of elapsed time since the start of the route.
String
time_window_properties
[time_window_properties,...]
(Optional)

Specifies a time range within which the break will begin. To set up a time window break, use two time-of-day values.

The options below are enabled when the Break Type parameter is set to Time Window Break.

  • Is Paid—A Boolean value indicating whether the break is paid.
  • Break Duration—The duration of the break. This field can't contain null values and has a default value of 60.
  • Time Window Start—The start time of the time window.
  • Time Window End—The end time of the time window.
  • Maximum Violation Time—The maximum allowable violation time for a time window break. A time window is considered violated if the arrival time falls outside the time range. A zero value indicates that the time window cannot be violated, that is, the time window is hard. A nonzero value indicates the maximum delay time. For example, the break can begin up to 30 minutes beyond the end of its time window but the delay is penalized pursuant to the Time Window Violation Importance setting, which rates the importance of honoring time windows without causing violations.

Value Table
travel_time_properties
[travel_time_properties,...]
(Optional)

Specifies how long a person can drive before the break is required.

The properties below are enabled when the Break Type parameter is set to Maximum Travel Time Break.

  • Is Paid—A Boolean value indicating whether the break is paid.
  • Break Duration—The duration of the break. This field can't contain null values and has a default value of 60.
  • Maximum Travel Time Between Breaks—The maximum amount of travel time that can be accumulated before the break is taken. The travel time is accumulated either from the end of the previous break or, if a break has not yet been taken, from the start of the route.

    If this is the route's final break, The MaxTravelTimeBetweenBreaks field also indicates the maximum travel time that can be accumulated from the final break to the end depot.

    This field limits how long a person can drive until a break is required. For example, if the Time Field Units parameter (time_units in Python) of the analysis is set to Minutes, and the MaxTravelTimeBetweenBreaks field has a value of 120, the driver will get a break after two hours of driving. To assign a second break after two additional hours of driving, the second break's MaxTravelTimeBetweenBreaks field value must be 120.

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

Value Table
work_time_properties
[work_time_properties,...]
(Optional)

Specifies how long a person can work before a break is required.

The properties below are enabled when the Break Type parameter is set to Maximum Work Time Break.

  • Is Paid—A Boolean value indicating whether the break is paid.
  • Break Duration—The duration of the break. This field can't contain null values and has a default value of 60.
  • Maximum Cumulative Work Time—The maximum amount of work time that can be accumulated before the break is taken. Work time is always accumulated from the beginning of the route. Work time is the sum of travel time and service times at orders, depots, and breaks. However, this excludes wait time, which is the time a route (or driver) spends waiting at an order or depot for a time window to begin.

    The MaxCumulWorkTime field also indicates the maximum amount of work time that can be accumulated before the break is taken.

    This field limits how long a person can work until a break is required. For example, if the Time Field Units parameter (time_units in Python) is set to Minutes, the MaxCumulWorkTime field has a value of 120, and the ServiceTime field has a value of 15, the driver will get a 15-minute break after 2 hours of work.

    Continuing with this example, assume a second break is needed after 3 additional hours of work. To specify this break, you would enter 315 (5 hours and 15 minutes) as the second break's MaxCumulWorkTime field value. This number includes the MaxCumulWorkTime and ServiceTime field values of the preceding break, along with the 3 additional hours of work time before granting the second break. To avoid taking maximum work time breaks prematurely, remember that work time is accumulated from the beginning of the route and it includes the service time at previously visited depots, orders, and breaks.

Value Table
append_to_existing_breaks
(Optional)

Specifies whether new breaks will be appended to the existing breaks attribute table.

  • APPENDNew breaks will be appended to the existing set in the breaks attribute table. This is the default.
  • CLEARExisting breaks will be replaced with new breaks.
Boolean

Derived Output

NameExplanationData Type
out_vrp_layer

The updated network analyst layer.

Network Analyst Layer

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics