SkippedShipment
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Nêu thông tin chi tiết về những lô hàng không thực hiện được trong một giải pháp. Đối với các trường hợp không đáng kể và/hoặc nếu chúng tôi có thể xác định nguyên nhân bỏ qua, chúng tôi sẽ báo cáo lý do tại đây.
Biểu diễn dưới dạng JSON |
{
"index": integer,
"label": string,
"reasons": [
{
object (Reason )
}
]
} |
Trường |
index |
integer
Chỉ mục này tương ứng với chỉ mục của lô hàng trong nguồn ShipmentModel .
|
label |
string
Bản sao của Shipment.label tương ứng, nếu được chỉ định trong Shipment .
|
reasons[] |
object (Reason )
Danh sách lý do giải thích lý do lô hàng bị bỏ qua. Xem nhận xét phía trên Reason . Nếu chúng tôi không thể hiểu lý do một lô hàng bị bỏ qua, thì lý do sẽ không được đặt.
|
Lý do
Nếu chúng tôi có thể giải thích lý do đơn đặt hàng bị bỏ qua thì lý do sẽ được liệt kê ở đây. Nếu lý do không giống nhau cho tất cả các phương tiện, reason
sẽ có nhiều hơn 1 phần tử. Một lô hàng bị bỏ qua không được có lý do trùng lặp, tức là tất cả các trường đều giống nhau, ngoại trừ exampleVehicleIndex
. Ví dụ:
reasons {
code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
exampleVehicleIndex: 1
exampleExceededCapacityType: "Apples"
}
reasons {
code: DEMAND_EXCEEDS_VEHICLE_CAPACITY
exampleVehicleIndex: 3
exampleExceededCapacityType: "Pears"
}
reasons {
code: CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT
exampleVehicleIndex: 1
}
Lô hàng bị bỏ qua không tương thích với tất cả xe. Lý do có thể khác nhau đối với tất cả các xe, nhưng ít nhất một xe sẽ vượt quá hạn mức "Táo" (bao gồm cả xe 1), ít nhất một xe sẽ vượt quá hạn mức "Lê" (bao gồm cả xe 3) và ít nhất một xe sẽ vượt quá hạn mức quãng đường (bao gồm cả xe 1).
Biểu diễn dưới dạng JSON |
{
"code": enum (Code ),
"exampleExceededCapacityType": string,
"exampleVehicleIndex": integer
} |
Trường |
code |
enum (Code )
Hãy tham khảo nhận xét trong Code.
|
exampleExceededCapacityType |
string
Nếu mã lý do là DEMAND_EXCEEDS_VEHICLE_CAPACITY , hãy ghi lại một loại dung lượng đã vượt quá.
|
exampleVehicleIndex |
integer
Nếu lý do liên quan đến việc không tương thích về phương tiện vận chuyển, trường này sẽ cung cấp chỉ mục của một chiếc xe có liên quan.
|
Mã
Mã xác định loại lý do. Thứ tự ở đây không có ý nghĩa. Cụ thể, thuộc tính này không cho biết liệu một lý do nhất định có xuất hiện trước một lý do khác trong giải pháp hay không, nếu cả hai đều áp dụng.
Enum |
CODE_UNSPECIFIED |
Bạn không nên sử dụng thuộc tính này. |
NO_VEHICLE |
Không có phương tiện nào trong mô hình khiến tất cả các lô hàng đều không thể thực hiện được. |
DEMAND_EXCEEDS_VEHICLE_CAPACITY |
Nhu cầu của lô hàng vượt quá sức chứa của xe đối với một số loại sức chứa, một trong số đó là exampleExceededCapacityType . |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT |
Khoảng cách tối thiểu cần thiết để thực hiện lô hàng này, tức là từ startLocation của xe đến vị trí lấy hàng và/hoặc giao hàng của lô hàng và đến vị trí cuối cùng của xe vượt quá routeDistanceLimit của xe. Lưu ý rằng đối với tính toán này, chúng tôi sử dụng khoảng cách trắc địa. |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT |
Thời gian tối thiểu cần thiết để thực hiện lô hàng này, bao gồm thời gian di chuyển, thời gian chờ và thời gian bảo dưỡng vượt quá routeDurationLimit của xe. Lưu ý: thời gian di chuyển được tính theo trường hợp tốt nhất, cụ thể là quãng đường trắc địa x 36 m/giây (khoảng 130 km/giờ). |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT |
Tương tự như trên, nhưng chúng tôi chỉ so sánh thời gian di chuyển tối thiểu và travelDurationLimit của xe. |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS |
Xe không thể thực hiện chuyến hàng này trong trường hợp tốt nhất (xem CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT để tính toán thời gian) nếu xe bắt đầu vào thời điểm bắt đầu sớm nhất: tổng thời gian sẽ khiến xe kết thúc sau thời điểm kết thúc muộn nhất. |
VEHICLE_NOT_ALLOWED |
Trường allowedVehicleIndices của lô hàng không trống và chiếc xe này không thuộc về trường đó. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-29 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-29 UTC."],[[["\u003cp\u003eThis document details the structure for reporting reasons why shipments were skipped in a solution, focusing on cases where the cause can be identified.\u003c/p\u003e\n"],["\u003cp\u003eSkipped shipment data includes an index, label, and a list of \u003ccode\u003ereasons\u003c/code\u003e, each \u003ccode\u003ereason\u003c/code\u003e explaining why the shipment couldn't be performed.\u003c/p\u003e\n"],["\u003cp\u003eReasons for skipped shipments include exceeding vehicle capacity, distance limits, duration limits, time window constraints, or not being in the allowed vehicles for the shipment.\u003c/p\u003e\n"],["\u003cp\u003eEach reason contains a \u003ccode\u003ecode\u003c/code\u003e specifying the type of issue, and \u003ccode\u003eexampleVehicleIndex\u003c/code\u003e or \u003ccode\u003eexampleExceededCapacityType\u003c/code\u003e that is present if the issue is vehicle related or exceeds capacity.\u003c/p\u003e\n"],["\u003cp\u003eThe provided structure outlines how to represent these \u003ccode\u003ereasons\u003c/code\u003e in JSON format, including relevant fields and their data types for both the skipped shipment itself and the associated reasons.\u003c/p\u003e\n"]]],[],null,["# SkippedShipment\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [Reason](#Reason)\n - [JSON representation](#Reason.SCHEMA_REPRESENTATION)\n- [Code](#Code)\n\nSpecifies details of unperformed shipments in a solution. For trivial cases and/or if we are able to identify the cause for skipping, we report the reason here.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"index\": integer, \"label\": string, \"reasons\": [ { object (/maps/tt/route-optimization/experimental/load-cost/reference/rest/v1/SkippedShipment#Reason) } ] } ``` |\n\n| Fields ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `index` | `integer` The index corresponds to the index of the shipment in the source `ShipmentModel`. |\n| `label` | `string` Copy of the corresponding [Shipment.label](/maps/tt/route-optimization/experimental/load-cost/reference/rest/v1/ShipmentModel#Shipment.FIELDS.label), if specified in the `Shipment`. |\n| `reasons[]` | `object (`[Reason](/maps/tt/route-optimization/experimental/load-cost/reference/rest/v1/SkippedShipment#Reason)`)` A list of reasons that explain why the shipment was skipped. See comment above `Reason`. If we are unable to understand why a shipment was skipped, reasons will not be set. |\n\nReason\n------\n\nIf we can explain why the shipment was skipped, reasons will be listed here. If the reason is not the same for all vehicles, `reason` will have more than 1 element. A skipped shipment cannot have duplicate reasons, i.e. where all fields are the same except for `exampleVehicleIndex`. Example: \n\n reasons {\n code: DEMAND_EXCEEDS_VEHICLE_CAPACITY\n exampleVehicleIndex: 1\n exampleExceededCapacityType: \"Apples\"\n }\n reasons {\n code: DEMAND_EXCEEDS_VEHICLE_CAPACITY\n exampleVehicleIndex: 3\n exampleExceededCapacityType: \"Pears\"\n }\n reasons {\n code: CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT\n exampleVehicleIndex: 1\n }\n\nThe skipped shipment is incompatible with all vehicles. The reasons may be different for all vehicles but at least one vehicle's \"Apples\" capacity would be exceeded (including vehicle 1), at least one vehicle's \"Pears\" capacity would be exceeded (including vehicle 3) and at least one vehicle's distance limit would be exceeded (including vehicle 1).\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"code\": enum (/maps/tt/route-optimization/experimental/load-cost/reference/rest/v1/SkippedShipment#Code), \"exampleExceededCapacityType\": string, \"exampleVehicleIndex\": integer } ``` |\n\n| Fields ||\n|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| `code` | `enum (`[Code](/maps/tt/route-optimization/experimental/load-cost/reference/rest/v1/SkippedShipment#Code)`)` Refer to the comments of Code. |\n| `exampleExceededCapacityType` | `string` If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded. |\n| `exampleVehicleIndex` | `integer` If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle. |\n\nCode\n----\n\nCode identifying the reason type. The order here is meaningless. In particular, it gives no indication of whether a given reason will appear before another in the solution, if both apply.\n\n| Enums ||\n|------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `CODE_UNSPECIFIED` | This should never be used. |\n| `NO_VEHICLE` | There is no vehicle in the model making all shipments infeasible. |\n| `DEMAND_EXCEEDS_VEHICLE_CAPACITY` | The demand of the shipment exceeds a vehicle's capacity for some capacity types, one of which is `exampleExceededCapacityType`. |\n| `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT` | The minimum distance necessary to perform this shipment, i.e. from the vehicle's `startLocation` to the shipment's pickup and/or delivery locations and to the vehicle's end location exceeds the vehicle's `routeDistanceLimit`. Note that for this computation we use the geodesic distances. |\n| `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT` | The minimum time necessary to perform this shipment, including travel time, wait time and service time exceeds the vehicle's `routeDurationLimit`. Note: travel time is computed in the best-case scenario, namely as geodesic distance x 36 m/s (roughly 130 km/hour). |\n| `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT` | Same as above but we only compare minimum travel time and the vehicle's `travelDurationLimit`. |\n| `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS` | The vehicle cannot perform this shipment in the best-case scenario (see `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT` for time computation) if it starts at its earliest start time: the total time would make the vehicle end after its latest end time. |\n| `VEHICLE_NOT_ALLOWED` | The `allowedVehicleIndices` field of the shipment is not empty and this vehicle does not belong to it. |"]]