The input data types that can be specified when performing a vehicle routing problem (VRP) analysis are described below.
Orders
Specifies one or more locations that the routes of the VRP analysis will visit. An order can represent a delivery (for example, furniture delivery), a pickup (such as an airport shuttle bus picking up a passenger), or some type of service or inspection (a tree trimming job or building inspection, for instance).
The data type supports the following fields:
Field | Description | Data type |
---|---|---|
Name | The name of the order. The name must be unique. If the name is left null, a name is automatically generated at solve time. | String |
Description | The descriptive information about the order. This can contain any textual information for the order and has no restrictions for uniqueness. You may want to store a client's ID number in the Name field and the client's actual name or address in the Description field. | String |
ServiceTime | This property specifies the amount of time that will be spent at the network location when the route visits it; that is, it stores the impedance value for the network location. A zero or null value indicates that the network location requires no service time. The unit for this field value is specified by the timeUnits property of the analysis object. | Double |
TimeWindowStart1 | The beginning time of the first time window for the network location. This field can contain a null value; a null value indicates no beginning time. A time window only states when a vehicle can arrive at an order; it doesn't state when the service time must be completed. To account for service time and departure before the time window ends, subtract ServiceTime from the TimeWindowEnd1 field. The time window fields (TimeWindowStart1, TimeWindowEnd1, TimeWindowStart2, and TimeWindowEnd2) can contain a time-only value or a date and time value. If a time field such as TimeWindowStart1 has a time-only value (for example, 8:00 AM), the date is assumed to be the default date set for the analysis. Using date and time values (for example, 7/11/2010 8:00 AM) allows you to set time windows that span multiple days. The value for this attribute can be specified using a datetime Python object, such as datetime.datetime(2019, 5, 11, 8, 30, 0), which represents Saturday May 11 2019 8:30:00 AM. If you want to specify a time-only value, datetime.time(8, 30, 0) represents 8:30 AM on the default date that is set using the defaultDate property. The time zone for the value is specified by the timeZoneForTimeFields property of the analysis object. | Date |
TimeWindowEnd1 | The ending time of the first window for the network location. This field can contain a null value; a null value indicates no ending time. | Date |
TimeWindowStart2 | The beginning time of the second time window for the network location. This field can contain a null value; a null value indicates that there is no second time window. If the first time window is null as specified by the TimeWindowStart1 and TimeWindowEnd1 fields, the second time window must also be null. If both time windows are non null, they can't overlap. Also, the second time window must occur after the first. | Date |
TimeWindowEnd2 | The ending time of the second time window for the network location. This field can contain a null value. When TimeWindowStart2 and TimeWindowEnd2 are both null, there is no second time window. When TimeWindowStart2 is not null but TimeWindowEnd2 is null, there is a second time window that has a starting time but no ending time. This is valid. | Date |
MaxViolationTime1 | A time window is considered violated if the arrival time occurs after the time window has ended. This field specifies the maximum allowable violation time for the first time window of the order. It can contain a zero value but can't contain negative values. A zero value indicates that a time window violation at the first time window of the order is unacceptable; that is, the first time window is hard. Conversely, a null value indicates that there is no limit on the allowable violation time. A nonzero value specifies the maximum amount of lateness; for example, a route can arrive at an order up to 30 minutes beyond the end of its first time window. The unit for this field value is specified by the timeUnits property of the analysis object. Time window violations can be tracked and weighted by the solver. Consequently, you can direct the VRP solver to do one of the following:
By assigning an importance level for the timeWindowFactor property of the analysis object, you are essentially choosing one of these options. In any case, however, the solver will return an error if the value set for MaxViolationTime1 is surpassed. | Double |
MaxViolationTime2 | The maximum allowable violation time for the second time window of the order. This field is analogous to the MaxViolationTime1 field. | Double |
InboundArriveTime | Defines when the item to be delivered to the order will be ready at the starting depot. The order can be assigned to a route only if the inbound arrive time precedes the route's latest start time value; this way, the route cannot leave the depot before the item is ready to be loaded onto it. This field can help model scenarios involving inbound-wave transshipments. For example, a job at an order requires special materials that are not currently available at the depot. The materials are being shipped from another location and will arrive at the depot at 11:00 a.m. To ensure a route that leaves before the shipment arrives isn't assigned to the order, the order's inbound arrive time is set to 11:00 a.m. The special materials arrive at 11:00 a.m., they are loaded onto the vehicle, and the vehicle departs from the depot to visit its assigned orders. Notes:
| Date |
OutboundDepartTime | Defines when the item to be picked up at the order must arrive at the ending depot. The order can be assigned to a route only if the route can visit the order and reach its end depot before the specified outbound depart time. This field can help model scenarios involving outbound-wave transshipments. For instance, a shipping company sends out delivery trucks to pick up packages from orders and bring them into a depot where they are forwarded on to other facilities, en route to their final destination. At 3:00 p.m. every day, a semitrailer stops at the depot to pick up the high-priority packages and take them directly to a central processing station. To avoid delaying the high-priority packages until the next day's 3:00 p.m. trip, the shipping company tries to have delivery trucks pick up the high-priority packages from orders and bring them to the depot before the 3:00 p.m. deadline. This is done by setting the outbound depart time to 3:00 p.m. Notes:
| Date |
DeliveryQuantities | The size of the delivery. You can specify size in any dimension, such as weight, volume, or quantity. You can also specify multiple dimensions, for example, weight and volume. Enter delivery quantities without indicating units. For example, if a 300-pound object needs to be delivered to an order, enter 300. You will need to remember that the value is in pounds. If you are tracking multiple dimensions, separate the numeric values with a space. For example, if you are recording the weight and volume of a delivery that weighs 2,000 pounds and has a volume of 100 cubic feet, enter 2000 100. Again, you need to remember the units—in this case, pounds and cubic feet. You also need to remember the sequence in which the values and their corresponding units are entered. Make sure that Capacities for Routes and DeliveryQuantities and PickupQuantities for Orders are specified in the same manner; that is, the values must be in the same units. If you are using multiple dimensions, the dimensions must be listed in the same sequence for all parameters. For example, if you specify weight in pounds, followed by volume in cubic feet for DeliveryQuantities, the capacity of your routes and the pickup quantities of your orders must be specified the same way: weight in pounds, then volume in cubic feet. If you combine units or change the sequence, you will get unwanted results with no warning messages. An empty string or null value is equivalent to all dimensions being zero. If the string has an insufficient number of values in relation to the capacity count or dimensions being tracked, the remaining values are treated as zeros. Delivery quantities can't be negative. | String |
PickupQuantities | The size of the pickup. You can specify size in any dimension, such as weight, volume, or quantity. You can also specify multiple dimensions, for example, weight and volume. You cannot, however, use negative values. This field is analogous to the DeliveryQuantities field of Orders. In the case of an exchange visit, an order can have both delivery and pickup quantities. | String |
Revenue | The income generated if the order is included in a solution. This field can contain a null value—a null value indicates zero revenue—but it can't have a negative value. Revenue is included in optimizing the objective function value but is not part of the solution's operating cost; that is, the TotalCost field in the routes never includes revenue in its output. However, revenue weights the relative importance of servicing orders. | Double |
SpecialtyNames | A space-separated string containing the names of the specialties required by the order. A null value indicates that the order doesn't require specialties. The spelling of any specialties listed in the Orders and Routes classes must match exactly so that the VRP solver can link them together. To illustrate what specialties are and how they work, assume a lawn care and tree trimming company has a portion of its orders that requires a bucket truck to trim tall trees. The company enters BucketTruck in the SpecialtyNames field for these orders to indicate their special need. SpecialtyNames is left null for the other orders. Similarly, the company also enters BucketTruck in the SpecialtyNames field of routes that are driven by trucks with hydraulic booms. It leaves the field null for the other routes. At solve time, the VRP solver assigns orders without special needs to any route, but it only assigns orders that need bucket trucks to routes that have them. | String |
AssignmentRule | Specifies the rule for assigning the order to a route. The field value is specified as one of the following integers (use the numeric code, not the name in parentheses):
This field can't contain a null value. | Integer |
RouteName | The name of the route to which the order is assigned. This field is used to preassign an order to a specific route. It can contain a null value, indicating that the order is not preassigned to any route, and the solver identifies the best possible route assignment for the order. If this is set to null, the Sequence field must also be set to null. After a solve operation, if the order is routed, the RouteName field contains the name of the route to which the order is assigned. | String |
Sequence | This indicates the sequence of the order on its assigned route. This field is used to specify the relative sequence of an order on the route. This field can contain a null value specifying that the order can be placed anywhere along the route. A null value can only occur together with a null RouteName value. The input sequence values are positive and unique for each route (shared across renewal depot visits, orders, and breaks) but do not need to start from 1 or be contiguous. | Integer |
CurbApproach | Specifies the direction a vehicle may arrive at and depart from the order. The field value is specified as one of the following integers (use the numeric code, not the name in parentheses):
The CurbApproach attribute is designed to work with both kinds of national driving standards: right-hand traffic (United States) and left-hand traffic (United Kingdom). First, consider an order on the left side of a vehicle. It is always on the left side regardless of whether the vehicle travels on the left or right half of the road. What may change with national driving standards is your decision to approach an order from one of two directions, that is, so it ends up on the right or left side of the vehicle. For example, if you want to arrive at an order and not have a lane of traffic between the vehicle and the order, choose 1 (Right side of vehicle) in the United States and 2 (Left side of vehicle) in the United Kingdom. | Short Integer |
Bearing | The direction in which a point is moving. The units are degrees and are measured clockwise from true north. This field is used in conjunction with the BearingTol field. Bearing data is usually sent automatically from a mobile device equipped with a GPS receiver. Try to include bearing data if you are loading an input location that is moving, such as a pedestrian or a vehicle. Using this field tends to prevent adding locations to the wrong edges, which can occur when a vehicle is near an intersection or an overpass, for example. Bearing also helps the tool determine on which side of the street the point is. | Double |
BearingTol | The bearing tolerance value creates a range of acceptable bearing values when locating moving points on an edge using the Bearing field. If the value from the Bearing field is within the range of acceptable values that are generated from the bearing tolerance on an edge, the point can be added as a network location there; otherwise, the closest point on the next-nearest edge is evaluated. The units are in degrees, and the default value is 30. Values must be greater than 0 and less than 180. A value of 30 means that when Network Analyst attempts to add a network location on an edge, a range of acceptable bearing values is generated 15 degrees to either side of the edge (left and right) and in both digitized directions of the edge. | Double |
NavLatency | This field is only used in the solve process if Bearing and BearingTol also have values; however, entering a NavLatency value is optional, even when values are present in Bearing and BearingTol. NavLatency indicates how much time is expected to elapse from the moment GPS information is sent from a moving vehicle to a server and the moment the processed route is received by the vehicle's navigation device. The time units of NavLatency are the same as the units specified by the timeUnits property of the analysis object. The time units of NavLatency are the same as the units specified by the timeUnits property of the analysis object. | Double |
Network location fields
| Together, these properties describe the point on the network where the object is located. |
Depots
Specifies one or more depots for the given vehicle routing problem. A depot is a location that a vehicle departs from at the beginning of its workday and returns to at the end of the workday. Vehicles are loaded (for deliveries) or unloaded (for pickups) at depots at the start of the route. In some cases, a depot can also act as a renewal location whereby the vehicle can unload or reload and continue performing deliveries and pickups. A depot has open and close times, as specified by a hard time window. Vehicles can't arrive at a depot outside of this time window.
The data type supports the following fields:
Field | Description | Data type |
---|---|---|
Name | The name of the depot. The StartDepotName and EndDepotName fields on routes reference the names you specify here. It is also referenced by the route renewals, when used. Depot names are not case sensitive but must be nonempty and unique. | String |
Description | The descriptive information about the depot location. This can contain any textual information and has no restrictions for uniqueness. For example, if you want to note which region a depot is in or the depot's address and telephone number, you can enter the information here rather than in the Name field. | String |
TimeWindowStart1 TimeWindowStart1 | The beginning time of the first time window for the network location. This field can contain a null value; a null value indicates no beginning time. The time window fields (TimeWindowStart1, TimeWindowEnd1, TimeWindowStart2, and TimeWindowEnd2) can contain a time-only value or a date and time value. If a time field such as TimeWindowStart1 has a time-only value (for example, 8:00 AM), the date is assumed to be the default date set for the analysis. Using date and time values (for example, 7/11/2010 8:00 AM) allows you to set time windows that span multiple days. The value for this attribute can be specified using a datetime Python object, such as datetime.datetime(2019, 5, 11, 8, 30, 0), which represents Saturday May 11 2019 8:30:00 AM. If you want to specify a time-only value, datetime.time(8, 30, 0) represents 8:30 AM on the default date that is set using the defaultDate property. The time zone for the value is specified by the timeZoneForTimeFields property of the analysis object. | Date |
TimeWindowEnd1 | The ending time of the first window for the network location. This field can contain a null value; a null value indicates no ending time. | Date |
TimeWindowStart2 | The beginning time of the second time window for the network location. This field can contain a null value; a null value indicates that there is no second time window. If the first time window is null, as specified by the TimeWindowStart1 and TimeWindowEnd1 fields, the second time window must also be null. If both time windows are not null, they can't overlap. Also, the second time window must occur after the first. | Date |
TimeWindowEnd2 | The ending time of the second time window for the network location. This field can contain a null value. When TimeWindowStart2 and TimeWindowEnd2 are both null, there is no second time window. When TimeWindowStart2 is not null but TimeWindowEnd2 is null, there is a second time window that has a starting time but no ending time. This is valid. | Date |
CurbApproach | Specifies the direction a vehicle may arrive at and depart from the depot. The field value is specified as one of the following integers shown in parentheses (use the numeric code, not the name in parentheses):
The CurbApproach attribute is designed to work with both kinds of national driving standards: right-hand traffic (United States) and left-hand traffic (United Kingdom). First, consider a depot on the left side of a vehicle. It is always on the left side regardless of whether the vehicle travels on the left or right half of the road. What may change with national driving standards is your decision to approach a depot from one of two directions, that is, so it ends up on the right or left side of the vehicle. For example, if you want to arrive at a depot and not have a lane of traffic between the vehicle and the depot, choose 1 (Right side of vehicle) in the United States and 2 (Left side of vehicle) in the United Kingdom. | Integer |
Bearing | The direction in which a point is moving. The units are degrees and are measured clockwise from true north. This field is used in conjunction with the BearingTol field. Bearing data is usually sent automatically from a mobile device equipped with a GPS receiver. Try to include bearing data if you are loading an input location that is moving, such as a pedestrian or a vehicle. Using this field tends to prevent adding locations to the wrong edges, which can occur when a vehicle is near an intersection or an overpass, for example. Bearing also helps the tool determine on which side of the street the point is. | Double |
BearingTol | The bearing tolerance value creates a range of acceptable bearing values when locating moving points on an edge using the Bearing field. If the value from the Bearing field is within the range of acceptable values that are generated from the bearing tolerance on an edge, the point can be added as a network location there; otherwise, the closest point on the next-nearest edge is evaluated. The units are in degrees, and the default value is 30. Values must be greater than 0 and less than 180. A value of 30 means that when Network Analyst attempts to add a network location on an edge, a range of acceptable bearing values is generated 15 degrees to either side of the edge (left and right) and in both digitized directions of the edge. | Double |
NavLatency | This field is only used in the solve process if Bearing and BearingTol also have values; however, entering a NavLatency value is optional, even when values are present in Bearing and BearingTol. NavLatency indicates how much time is expected to elapse from the moment GPS information is sent from a moving vehicle to a server and the moment the processed route is received by the vehicle's navigation device. The time units of NavLatency are the same as the units specified by the timeUnits property of the analysis object. The time units of NavLatency are the same as the units specified by the timeUnits property of the analysis object. | Double |
Network location fields
| Together, these properties describe the point on the network where the object is located. |
Routes
Specifies one or more routes that specify vehicle and driver characteristics. A route can have start and end depot service times, a fixed or flexible starting time, time-based operating costs, distance-based operating costs, multiple capacities, various constraints on a driver's workday, and so on.
Note:
Unlike other data types, such as Orders and Depots, this data type is a table and does not include any location information.
The data type supports the following fields:
Field | Description | Data type |
---|---|---|
Name | The name of the route. The name must be unique. The tool generates a unique name at solve time if the field value is null; therefore, entering a value is optional in most cases. However, you must enter a name if your analysis includes breaks, route renewals, route zones, or orders that are preassigned to a route because the route name is used as a foreign key in these cases. Route names not are case sensitive. | String |
Description | The descriptive information about the route. This can contain any textual information and does not need to be unique. | String |
StartDepotName | The name of the starting depot for the route. This field is a foreign key to the Name field in Depots. If the StartDepotName value is null, the route will begin from the first order assigned. Omitting the start depot is useful when the vehicle's starting location is unknown or irrelevant to your problem. However, when StartDepotName is null, EndDepotName cannot also be null. Virtual start depots are not allowed if orders or depots are in multiple time zones. If the route is making deliveries and StartDepotName is null, it is assumed the cargo is loaded on the vehicle at a virtual depot before the route begins. For a route that has no renewal visits, its delivery orders (those with nonzero DeliveryQuantities values in Orders) are loaded at the start depot or virtual depot. For a route that has renewal visits, only the delivery orders before the first renewal visit are loaded at the start depot or virtual depot. | String |
EndDepotName | The name of the ending depot for the route. This field is a foreign key to the Name field in Depots. | String |
StartDepotServiceTime | The service time at the starting depot. This can be used to model the time spent loading the vehicle. This field can contain a null value; a null value indicates zero service time. The unit for this field value is specified by the timeUnits property of the analysis object. The service times at the start and end depots are fixed values (given by the StartDepotServiceTime and EndDepotServiceTime field values) and do not take into account the actual load for a route. For example, the time taken to load a vehicle at the starting depot may depend on the size of the orders. The depot service times can be assigned values corresponding to a full truckload or an average truckload, or you can make your own time estimate. | Double |
EndDepotServiceTime | The service time at the ending depot. This can be used to model the time spent unloading the vehicle. This field can contain a null value; a null value indicates zero service time. The unit for this field value is specified by the timeUnits property of the analysis object. The service times at the start and end depots are fixed values (given by the StartDepotServiceTime and EndDepotServiceTime field values) and do not take into account the actual load for a route. For example, the time taken to load a vehicle at the starting depot may depend on the size of the orders. The depot service times can be assigned values corresponding to a full truckload or an average truckload, or you can make your own time estimate. | Double |
EarliestStartTime | The earliest allowable starting time for the route. This is used by the solver in conjunction with the time window of the starting depot for determining feasible route start times. This field can't contain null values and has a default time-only value of 8:00 AM. The default value is interpreted as 8:00 a.m. on the default date set for the analysis. The value for this attribute can be specified using a datetime Python object, such as datetime.datetime(2019, 5, 11, 8, 30, 0), which represents Saturday May 11 2019 8:30:00 AM. If you want to specify a time-only value, datetime.time(8, 30, 0) represents 8:30 AM on the default date that is set using the defaultDate property. The time zone for the value is specified by the timeZoneForTimeFields property of the analysis object. | Date |
LatestStartTime | The latest allowable starting time for the route. This field can't contain null values and has a default time-only value of 10:00 AM. The default value is interpreted as 10:00 a.m. on the default date set for the analysis. The value for this attribute can be specified using a datetime Python object, such as datetime.datetime(2019, 5, 11, 8, 30, 0), which represents Saturday May 11 2019 8:30:00 AM. If you want to specify a time-only value, datetime.time(8, 30, 0) represents 8:30 AM on the default date that is set using the defaultDate property. The time zone for the value is specified by the timeZoneForTimeFields property of the analysis object. | Date |
ArriveDepartDelay | This field stores the amount of travel time needed to accelerate the vehicle to normal travel speeds, decelerate it to a stop, and move it off and on the network (for example, in and out of parking). By including an ArriveDepartDelay value, the VRP solver is deterred from sending many routes to service physically coincident orders. The cost for this property is incurred between visits to noncoincident orders, depots, and route renewals. For example, when a route starts from a depot and visits the first order, the total arrive/depart delay is added to the travel time. The same is true when traveling from the first order to the second order. If the second and third orders are coincident, the ArriveDepartDelay value is not added between them since the vehicle doesn't need to move. If the route travels to a route renewal, the value is added to the travel time again. Although a vehicle must slow down and stop for a break and accelerate afterward, the VRP solver cannot add the ArriveDepartDelay value for breaks. This means that if a route leaves an order, stops for a break, and continues to the next order, the arrive/depart delay is added only once, not twice. For example, assume there are five coincident orders in a high-rise building, and they are serviced by three different routes. This means three arrive/depart delays are incurred; that is, three drivers need to separately find parking places and enter the same building. However, if the orders can be serviced by one route instead, only one driver needs to park and enter the building, and only one arrive/depart delay is incurred. Since the VRP solver tries to minimize cost, it attempts to limit the arrive/depart delays and thus identify the single-route option. (Note that multiple routes may need to be sent when other constraints—such as specialties, time windows, or capacities—require it.) The unit for this field value is specified by the timeUnits property of the analysis object. | Double |
Capacities | The maximum capacity of the vehicle. You can specify capacity in any dimension, such as weight, volume, or quantity. You can also specify multiple dimensions, for example, weight and volume. Enter capacities without indicating units. For example, if your vehicle can carry a maximum of 40,000 pounds, enter 40000. You need to remember that the value is in pounds. If you are tracking multiple dimensions, separate the numeric values with a space. For example, if you are recording both weight and volume and your vehicle can carry a maximum weight of 40,000 pounds and a maximum volume of 2,000 cubic feet, enter the Capacities value as 40000 2000. Again, you need to remember the units. You also need to remember the sequence in which the values and their corresponding units are entered (pounds followed by cubic feet in this case). Remembering the units and the unit sequence is important for a couple of reasons: first, so you can reinterpret the information later; second, so you can properly enter values for the DeliveryQuantities and PickupQuantities fields for the orders. Note that the VRP solver simultaneously refers to Capacities, DeliveryQuantities, and PickupQuantities to verify that a route doesn't become overloaded. Units can't be entered in the field and the VRP tool can't make unit conversions. You must enter the values for the three fields using the same units and the same unit sequence to ensure that the values are correctly interpreted. If you combine units or change the sequence in any of the three fields, unwanted results occur with no warning messages. It is recommended that you set up a unit and unit-sequence standard beforehand and continually refer to it when you enter values for these three fields. An empty string or null value is equivalent to all values being zero. Capacity values can't be negative. If the Capacities field has an insufficient number of values in relation to the DeliveryQuantities or PickupQuantities field for orders, the remaining values are treated as zero. The VRP solver only performs a simple Boolean test to determine whether capacities are exceeded. If a route's capacity value is greater than or equal to the total quantity being carried, the VRP solver will assume the cargo fits in the vehicle. This could be incorrect, depending on the actual shape of the cargo and the vehicle. For example, the VRP solver allows you to fit a 1,000-cubic-foot sphere into a 1,000-cubic-foot truck that is 8 feet wide. In reality, however, since the sphere is 12.6 feet in diameter, it won't fit in the 8-foot wide truck. | String |
FixedCost | A fixed monetary cost that is incurred only if the route is used in a solution (that is, it has orders assigned to it). This field can contain null values; a null value indicates zero fixed cost. This cost is part of the total route operating cost. | Double |
CostPerUnitTime | The monetary cost incurred—per unit of work time—for the total route duration, including travel times as well as service times and wait times at orders, depots, and breaks. This field can't contain a null value and has a default value of 1.0. The unit for this field value is specified by the timeUnits property of the analysis object. | Double |
CostPerUnitDistance | The monetary cost incurred—per unit of distance traveled—for the route length (total travel distance). This field can contain null values; a null value indicates zero cost. The unit for this field value is specified by the distanceUnits property of the analysis object. | Double |
OvertimeStartTime | The duration of regular work time before overtime computation begins. This field can contain null values; a null value indicates that overtime does not apply. The unit for this field value is specified by the timeUnits property of the analysis object. For example, if the driver is to be paid overtime when the total route duration extends beyond eight hours, OvertimeStartTime is specified as 480 (8 hours * 60 minutes/hour), given the time units are minutes. | Double |
CostPerUnitOvertime | The monetary cost incurred per time unit of overtime work. This field can contain null values; a null value indicates that the CostPerUnitOvertime value is the same as the CostPerUnitTime value. | Double |
MaxOrderCount | The maximum allowable number of orders on the route. This field can't contain null values and has a default value of 30. | Integer |
MaxTotalTime | The maximum allowable route duration. The route duration includes travel times as well as service and wait times at orders, depots, and breaks. This field can contain null values; a null value indicates that there is no constraint on the route duration. The unit for this field value is specified by the timeUnits property of the analysis object. | Double |
MaxTotalTravelTime | The maximum allowable travel time for the route. The travel time includes only the time spent driving on the network and does not include service or wait times. This field can contain null values; a null value indicates that there is no constraint on the maximum allowable travel time. This field value can't be larger than the MaxTotalTime field value. The unit for this field value is specified by the timeUnits property of the analysis object. | Double |
MaxTotalDistance | The maximum allowable travel distance for the route. The unit for this field value is specified by the distanceUnits property of the analysis object. This field can contain null values; a null value indicates that there is no constraint on the maximum allowable travel distance. | Double |
SpecialtyNames | A space-separated string containing the names of the specialties supported by the route. A null value indicates that the route does not support any specialties. This field is a foreign key to the SpecialtyNames field in Orders. To illustrate what specialties are and how they work, assume a lawn care and tree trimming company has a portion of its orders that requires a bucket truck to trim tall trees. The company enters BucketTruck in the SpecialtyNames field for these orders to indicate their special need. SpecialtyNames is left as null for the other orders. Similarly, the company also enters BucketTruck in the SpecialtyNames field of routes that are driven by trucks with hydraulic booms. It leaves the field null for the other routes. At solve time, the VRP solver assigns orders without special needs to any route, but it only assigns orders that need bucket trucks to routes that have them. | String |
AssignmentRule | This specifies whether the route can be used when solving the problem. This field is constrained by a domain of values that are listed below (use the numeric code, not the name in parentheses).
| Integer |
Locations | The information in this field defines which network edges and junctions are covered by the line or polygon and the portion of each edge element that is covered. You cannot directly read or edit the information contained in this field, but Network Analyst interprets it when solving an analysis. | Blob |
Breaks
These are the rest periods, or breaks, for the routes in a given vehicle routing problem. A break is associated with exactly one route and can be taken after completing an order, while en route to an order, or prior to servicing an order. It has a start time and a duration for which the driver may or may not be paid. There are three options for establishing when a break begins: a time window, a maximum travel time, or a maximum work time.
Unlike other data types, such as Orders or Depots, this data type is a table and does not include any location information.
The data type supports the following fields:
Field | Description | Data type |
---|---|---|
RouteName | The name of the route to which the break applies. Although a break is assigned to exactly one route, many breaks can be assigned to the same route. This field is a foreign key to the Name field in the routes, so it can't have a null value. | String |
Precedence | Precedence values sequence the breaks of a given route. Breaks with a precedence value of 1 occur before those with a value of 2, and so on. All breaks must have a precedence value, regardless of whether they are time-window, maximum-travel-time, or maximum-work-time breaks. | Integer |
ServiceTime | The duration of the break. This field can't contain null values. The default value is 60. The unit for this field value is specified by the timeUnits property of the analysis object. | Double |
TimeWindowStart | The starting time of the break's time window. Both a starting time and end time must be specified. If this field has a value, the MaxTravelTimeBetweenBreaks and MaxCumulWorkTime field values must be null, and all other breaks in the analysis must have null values for MaxTravelTimeBetweenBreaks and MaxCumulWorkTime. An error will occur at solve time if a route has multiple breaks with overlapping time windows. The time window fields in breaks can contain a time-only value or a date and time value. If a time field, such as TimeWindowStart, has a time-only value (for example, 12:00 PM), the date is assumed to be the date specified by the default_dateparameter. Using date and time values (for example, 7/11/2012 12:00 PM) allows you to specify time windows that span two or more days. This is beneficial when a break should be taken sometime before and after midnight. The value for this attribute can be specified using a datetime Python object, such as datetime.datetime(2019, 5, 11, 8, 30, 0), which represents Saturday May 11 2019 8:30:00 AM. If you want to specify a time-only value, datetime.time(8, 30, 0) represents 8:30 AM on the default date that is set using the defaultDate property. The time zone for the value is specified by the timeZoneForTimeFields property of the analysis object. | Date |
TimeWindowEnd | The ending time of the break's time window. Both a starting time and end time must be specified. If this field has a value, MaxTravelTimeBetweenBreaks and MaxCumulWorkTime must be null, and all other breaks in the analysis must have null values for MaxTravelTimeBetweenBreaks and MaxCumulWorkTime. The value for this attribute can be specified using a datetime Python object, such as datetime.datetime(2019, 5, 11, 8, 30, 0), which represents Saturday May 11 2019 8:30:00 AM. If you want to specify a time-only value, datetime.time(8, 30, 0) represents 8:30 AM on the default date that is set using the defaultDate property. The time zone for the value is specified by the timeZoneForTimeFields property of the analysis object. | Date |
MaxViolationTime | This field specifies 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 specifies the maximum amount of lateness. For example, the break can begin up to 30 minutes beyond the end of its time window, but the lateness is penalized pursuant to the Time Window Violation Importance parameter. This property can be null. A null value with TimeWindowStart and TimeWindowEnd values indicates that there is no limit on the allowable violation time. If MaxTravelTimeBetweenBreaks or MaxCumulWorkTime has a value, MaxViolationTime must be null. The unit for this field value is specified by the timeUnits property of the analysis object. | Double |
MaxTravelTimeBetweenBreaks | 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, MaxTravelTimeBetweenBreaks also indicates the maximum travel time that can be accumulated from the final break to the end depot. This field is designed to limit how long a person can drive until a break is required. For instance, if the time unit for the analysis is set to minutes, and MaxTravelTimeBetweenBreaks has a value of 120, the driver will get a break after two hours of driving. To assign a second break after two more hours of driving, the second break's MaxTravelTimeBetweenBreaks property must be 120. If this field has a value, TimeWindowStart, TimeWindowEnd, MaxViolationTime, and MaxCumulWorkTime must be null for an analysis to solve successfully. The unit for this field value is specified by the timeUnits property of the analysis object. | Double |
MaxCumulWorkTime | 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. Note, however, that 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. This field limits how long a person can work until a break is required. For example, if the time unit for the analysis is set to minutes, MaxCumulWorkTime has a value of 120, and ServiceTime has a value of 15, the driver will get a 15-minute break after two hours of work. Continuing with the last example, assume a second break is needed after three more hours of work. To specify this break, enter 315 (five hours and 15 minutes) as the second break's MaxCumulWorkTime value. This number includes the MaxCumulWorkTime and ServiceTime values of the preceding break, along with the three additional hours of work time before granting the second break. To avoid taking maximum-work-time breaks prematurely, remember that they accumulate work time from the beginning of the route and that work time includes the service time at previously visited depots, orders, and breaks. If this field has a value, TimeWindowStart, TimeWindowEnd, MaxViolationTime, and MaxTravelTimeBetweenBreaks must be null for an analysis to solve successfully. The unit for this field value is specified by the timeUnits property of the analysis object. | Double |
IsPaid | A Boolean value indicating whether the break is paid or unpaid. Setting this field value to 1 indicates that the time spent at the break is included in the route cost computation and overtime determination. A value of 0 indicates otherwise. The default value is 1. | Integer |
Sequence | Indicates the sequence of the break on its route. This field can contain null values, which causes the solver to assign the break sequence. If sequence values are specified, they should be positive and unique for each route (shared across renewal depot visits, orders, and breaks) but need not start from 1 or be contiguous. | Integer |
OrderPairs
Pairs pick up and deliver orders so they are serviced by the same route. Specifying order pairs prevents the analysis from assigning only one of the orders to a route: either both orders are assigned to the same route, or neither order is assigned.
Sometimes it is necessary for the pick up and delivery of orders to be paired. For example, a courier company may need to have a route pick up a high-priority package from one order and deliver it to another without returning to a depot, or sorting station, to minimize delivery time. These related orders can be assigned to the same route with the appropriate sequence using order pairs. Restrictions on how long the package can stay in the vehicle can also be assigned; for example, the package might be a blood sample that must be transported from the doctor's office to the lab within two hours.
Some situations may require two pairs of orders. For example, suppose you want to transport a senior citizen from her home to the doctor and then back home. The ride from her home to the doctor is one pair of orders with a desired arrival time at the doctor, while the ride from the doctor to her home is another pair with a desired pickup time.
The data type supports the following fields:
Field | Description | Data type |
---|---|---|
FirstOrderName | The name of the first order of the pair. This field is a foreign key to the Name field in orders. | String |
SecondOrderName | The name of the second order of the pair. This field is a foreign key to the Name field in orders. The first order in the pair must be a pickup order; that is, the value for its DeliveryQuantities field is null. The second order in the pair must be a delivery order; that is, the value for its PickupQuantities field is null. The quantity picked up at the first order must agree with the quantity delivered at the second order. As a special case, both orders may have zero quantities for scenarios where capacities are not used. The order quantities are not loaded or unloaded at depots. | String |
MaxTransitTime | The maximum transit time for the pair. The transit time is the duration from the departure time of the first order to the arrival time at the second order. This constraint limits the time-on-vehicle, or ride time, between the two orders. When a vehicle is carrying people or perishable goods, the ride time is typically shorter than that of a vehicle carrying packages or nonperishable goods. This field can contain null values; a null value indicates that there is no constraint on the ride time. The unit for this field value is specified by the timeUnits property of the analysis object. Excess transit time (measured with respect to the direct travel time between order pairs) can be tracked and weighted by the solver. Because of this, you can direct the VRP solver to take one of three approaches:
By assigning an importance level using the excessTransitFactor property of the analysis object, you are, in effect, choosing one of these three options. Regardless of the importance level, the solver will always return an error if the MaxTransitTime value is surpassed. | Double |
RouteRenewals
Specifies the intermediate depots that routes can visit to reload or unload the cargo they are delivering or picking up. Specifically, a route renewal links a route to a depot. The relationship indicates the route can renew (reload or unload while en route) at the associated depot.
Route renewals can be used to model scenarios in which a vehicle picks up a full load of deliveries at the starting depot, services the orders, returns to the depot to renew its load of deliveries, and continues servicing more orders. For example, in propane gas delivery, the vehicle may make several deliveries until its tank is nearly or completely depleted, visit a refueling point, and make more deliveries.
Here are a few rules and options to consider:
- The reload/unload point, or renewal location, can be different from the start or end depot.
- Each route can have one or many predetermined renewal locations.
- A renewal location can be used more than once by a single route.
- In cases where there may be several potential renewal locations for a route, the closest available renewal location is identified by the solver.
The data type supports the following fields:
Field | Description | Data type |
---|---|---|
RouteName | The name of the route to which this renewal applies. This field can't contain a null value and is a foreign key to the Name field in routes. | String |
DepotName | The name of the depot where this renewal takes place. This field can't contain a null value and is a foreign key to the Name field in depots. | String |
ServiceTime | The service time for the renewal. This field can contain a null value; a null value indicates zero service time. The unit for this field value is specified by the timeUnits property of the analysis object. The time taken to load a vehicle at a renewal depot may depend on the size of the vehicle and how full or empty the vehicle is. However, the service time for a route renewal is a fixed value and does not take into account the actual load. As such, the renewal service time should be given a value corresponding to a full truckload, an average truckload, or another time estimate of your choice. | Double |
Sequences | Specifies a space-separated string of sequence values of visits to the renewal depot. This field can contain a null value and is used to preassign visits to the renewal depot. | String |
RouteZones
Delineates work territories for given routes. A route zone is a polygon feature used to constrain routes to servicing only those orders that fall within or near the specified area. The following are examples of when route zones may be useful:
- Some of your employees don't have the required permits to perform work in certain states or communities. You can create a hard route zone so they only visit orders in areas where they meet the requirements.
- One of your vehicles breaks down frequently and you want to minimize response time by having it only visit orders that are close to your maintenance garage. You can create a soft or hard route zone to keep the vehicle nearby.
The data type supports the following fields:
Field | Description | Data type |
---|---|---|
RouteName | The name of the route to which this zone applies. A route zone can have a maximum of one associated route. This field can't contain null values, and it is a foreign key to the Name field in routes. | String |
IsHardZone | A Boolean value indicating a hard or soft route zone. A field value of 1 indicates that the route zone is hard; that is, an order that falls outside the route zone polygon can't be assigned to the route. The default value is 1. A field value of 0 indicates that such orders can still be assigned, but the cost of servicing the order is weighted by a function that is based on the Euclidean distance from the route zone. Basically, this means that as the straight-line distance from the soft zone to the order increases, the likelihood of the order being assigned to the route decreases. | Short Integer |
Locations | The information in this field defines which network edges and junctions are covered by the line or polygon and the portion of each edge element that is covered. You cannot directly read or edit the information contained in this field, but Network Analyst interprets it when solving an analysis. | Blob |
Point barrier
Use this parameter to specify one or more points that will act as temporary restrictions or represent additional time or distance that may be required to travel on the underlying streets. For example, a point barrier can be used to represent a fallen tree along a street or time delay spent at a railroad crossing.
The data type supports the following fields:
Field | Description | Data type |
---|---|---|
Name | The name of the barrier. | String |
BarrierType | Specifies whether the point barrier restricts travel completely or adds time or distance when it is crossed. The value for this attribute is specified as one of the following integers (use the numeric code, not the name in parentheses):
| Short |
Additional_Time | The added travel time when the barrier is traversed. This field is applicable only for added-cost barriers and only if the travel mode used for the analysis uses an impedance attribute that is time based. This field value must be greater than or equal to zero, and the values are interpreted to be in the units specified by the timeUnits property. | Double |
Additional_Distance | The added distance when the barrier is traversed. This field is applicable only for added-cost barriers and only if the travel mode used for the analysis uses an impedance attribute that is distance based. This field value must be greater than or equal to zero, and the values are interpreted to be in the units specified by the distanceUnits property. | Double |
Additional_Cost | The added cost when the barrier is traversed. This field is applicable only for added-cost barriers and only if the travel mode used for the analysis uses an impedance attribute that is neither time based nor distance based. This field value must be greater than or equal to zero, and the values are interpreted to be in unknown units. | Double |
FullEdge | Specifies how the restriction point barriers are applied to the edge elements during the analysis. The field value is specified as one of the following integers (use the numeric code, not the name in parentheses):
| Short |
CurbApproach | Specifies the direction of traffic that is affected by the barrier. The field value is specified as one of the following integers (use the numeric code, not the name in parentheses):
Because junctions are points and don't have a side, barriers on junctions affect all vehicles regardless of the curb approach. The CurbApproach attribute is designed to work with both types of national driving standards: right-hand traffic (United States) and left-hand traffic (United Kingdom). First, consider a facility on the left side of a vehicle. It is always on the left side regardless of whether the vehicle travels on the left or right half of the road. What may change with national driving standards is your decision to approach a facility from one of two directions, that is, so it ends up on the right or left side of the vehicle. For example, if you want to arrive at a facility and not have a lane of traffic between the vehicle and the facility, choose 1 (Right side of vehicle) in the United States and 2 (Left side of vehicle) in the United Kingdom. | Short |
Bearing | The direction in which a point is moving. The units are degrees and are measured clockwise from true north. This field is used in conjunction with the BearingTol field. Bearing data is usually sent automatically from a mobile device equipped with a GPS receiver. Try to include bearing data if you are loading an input location that is moving, such as a pedestrian or a vehicle. Using this field tends to prevent adding locations to the wrong edges, which can occur when a vehicle is near an intersection or an overpass, for example. Bearing also helps the tool determine on which side of the street the point is. | Double |
BearingTol | The bearing tolerance value creates a range of acceptable bearing values when locating moving points on an edge using the Bearing field. If the value from the Bearing field is within the range of acceptable values that are generated from the bearing tolerance on an edge, the point can be added as a network location there; otherwise, the closest point on the next-nearest edge is evaluated. The units are in degrees, and the default value is 30. Values must be greater than 0 and less than 180. A value of 30 means that when Network Analyst attempts to add a network location on an edge, a range of acceptable bearing values is generated 15 degrees to either side of the edge (left and right) and in both digitized directions of the edge. | Double |
NavLatency | This field is only used in the solve process if Bearing and BearingTol also have values; however, entering a NavLatency value is optional, even when values are present in Bearing and BearingTol. NavLatency indicates how much time is expected to elapse from the moment GPS information is sent from a moving vehicle to a server and the moment the processed route is received by the vehicle's navigation device. The time units of NavLatency are the same as the units specified by the timeUnits property of the analysis object. The time units of NavLatency are the same as the units specified by the timeUnits property of the analysis object. | Double |
Network location fields
| Together, these properties describe the point on the network where the object is located. |
Line barrier
Use this parameter to specify one or more lines that prohibit travel anywhere the lines intersect the streets. For example, a parade or protest that blocks traffic across several street segments can be modeled with a line barrier. A line barrier can also quickly fence off several roads from being traversed, thereby channeling possible routes away from undesirable parts of the street network.
The data type supports the following fields:
Field | Description | Data type |
---|---|---|
Name | The name of the barrier. | String |
BarrierType | Specifies whether the barrier restricts travel completely or scales the cost (such as time or distance) for traveling through it. The field value is specified as one of the following integers (use the numeric code, not the name in parentheses):
| Short |
ScaledTimeFactor | This is the factor by which the travel time of the streets intersected by the barrier is multiplied. The field value must be greater than zero. This field is applicable only for scaled-cost barriers and only if the travel mode used for the analysis uses an impedance attribute that is time based. | Double |
ScaledDistanceFactor | This is the factor by which the distance of the streets intersected by the barrier is multiplied. The field value must be greater than zero. This field is applicable only for scaled-cost barriers and only if the travel mode used for the analysis uses an impedance attribute that is distance based. | Double |
ScaledCostFactor | This is the factor by which the cost of the streets intersected by the barrier is multiplied. The field value must be greater than zero. This field is applicable only for scaled-cost barriers and only if the travel mode used for the analysis uses an impedance attribute that is neither time based nor distance based. | Double |
Locations | The information in this field defines which network edges and junctions are covered by the line or polygon and the portion of each edge element that is covered. You cannot directly read or edit the information contained in this field, but Network Analyst interprets it when solving an analysis. | Blob |
Polygon barrier
Use this parameter to specify polygons that either completely restrict travel or proportionately scale the time or distance required to travel on the streets intersected by the polygons.
The data type supports the following fields:
Field | Description | Data type |
---|---|---|
Name | The name of the barrier. | String |
BarrierType | Specifies whether the barrier restricts travel completely or scales the cost (such as time or distance) for traveling through it. The field value is specified as one of the following integers (use the numeric code, not the name in parentheses):
| Short |
ScaledTimeFactor | This is the factor by which the travel time of the streets intersected by the barrier is multiplied. The field value must be greater than zero. This field is applicable only for scaled-cost barriers and only if the travel mode used for the analysis uses an impedance attribute that is time based. | Double |
ScaledDistanceFactor | This is the factor by which the distance of the streets intersected by the barrier is multiplied. The field value must be greater than zero. This field is applicable only for scaled-cost barriers and only if the travel mode used for the analysis uses an impedance attribute that is distance based. | Double |
ScaledCostFactor | This is the factor by which the cost of the streets intersected by the barrier is multiplied. The field value must be greater than zero. This field is applicable only for scaled-cost barriers and only if the travel mode used for the analysis uses an impedance attribute that is neither time based nor distance based. | Double |
Locations | The information in this field defines which network edges and junctions are covered by the line or polygon and the portion of each edge element that is covered. You cannot directly read or edit the information contained in this field, but Network Analyst interprets it when solving an analysis. | Blob |