SkippedShipment
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
جزئیات محموله های انجام نشده را در یک راه حل مشخص می کند. برای موارد بی اهمیت و/یا اگر بتوانیم علت پرش را شناسایی کنیم، دلیل را در اینجا گزارش می کنیم.
نمایندگی JSON |
---|
{
"index": integer,
"label": string,
"reasons": [
{
object (Reason )
}
]
} |
فیلدها |
---|
index | integer این فهرست با نمایه محموله در مبدا ShipmentModel مطابقت دارد. |
label | string کپی مربوطه Shipment.label , در صورتی که در Shipment مشخص شده باشد . |
reasons[] | object ( Reason ) فهرستی از دلایلی که توضیح می دهد چرا حمل و نقل نادیده گرفته شده است. نظر بالای Reason ببینید. اگر نتوانیم بفهمیم که چرا یک محموله نادیده گرفته شده است، دلایلی ارائه نخواهد شد. |
دلیل
اگر بتوانیم دلیل حذف محموله را توضیح دهیم، دلایل در اینجا ذکر می شود. اگر دلیل برای همه وسایل نقلیه یکسان نباشد، reason
بیش از 1 عنصر خواهد داشت. یک محموله نادیده گرفته نمیتواند دلایل تکراری داشته باشد، یعنی جایی که همه فیلدها یکسان هستند به جز برای exampleVehicleIndex
. مثال:
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
}
محموله حذف شده با همه وسایل نقلیه ناسازگار است. دلایل ممکن است برای همه وسایل نقلیه متفاوت باشد، اما حداقل یک وسیله نقلیه از ظرفیت "سیب" تجاوز می کند (از جمله وسیله نقلیه 1)، حداقل یک وسیله نقلیه از ظرفیت "گلابی" تجاوز می کند (از جمله وسیله نقلیه 3) و حداقل فاصله یک وسیله نقلیه از حد مجاز عبور می کند. بیش از حد باشد (از جمله وسیله نقلیه 1).
نمایندگی JSON |
---|
{
"code": enum (Code ),
"exampleExceededCapacityType": string,
"exampleVehicleIndex": integer
} |
فیلدها |
---|
code | enum ( Code ) به نظرات کد مراجعه کنید. |
exampleExceededCapacityType | string اگر کد دلیل DEMAND_EXCEEDS_VEHICLE_CAPACITY باشد، یک نوع ظرفیت بیش از حد را ثبت کنید. |
exampleVehicleIndex | integer اگر دلیل مربوط به ناسازگاری حمل و نقل و وسیله نقلیه باشد، این قسمت شاخص یک وسیله نقلیه مربوطه را ارائه می دهد. |
کد
کد شناسایی نوع دلیل دستور اینجا بی معنی است. به ویژه، هیچ نشانه ای از این که آیا یک دلیل معین در راه حل در برابر دیگری ظاهر می شود، در صورت اعمال هر دو، نمی دهد.
Enums |
---|
CODE_UNSPECIFIED | این هرگز نباید استفاده شود. |
NO_VEHICLE | هیچ وسیله نقلیه ای در مدل وجود ندارد که تمام محموله ها را غیرممکن می کند. |
DEMAND_EXCEEDS_VEHICLE_CAPACITY | تقاضای محموله بیشتر از ظرفیت یک وسیله نقلیه برای برخی از انواع ظرفیت است که یکی از آنها exampleExceededCapacityType است. |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT | حداقل فاصله لازم برای انجام این حملونقل، یعنی از startLocation خودرو تا مکانهای تحویل و/یا تحویل محموله و تا مکان پایانی خودرو routeDistanceLimit خودرو بیشتر است. توجه داشته باشید که برای این محاسبه از فواصل ژئودزیکی استفاده می کنیم. |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT | حداقل زمان لازم برای انجام این حملونقل، از جمله زمان سفر، زمان انتظار و زمان سرویس، بیش از routeDurationLimit خودرو است. توجه: زمان سفر در بهترین حالت، یعنی به صورت فاصله ژئودزیکی x 36 متر بر ثانیه (تقریباً 130 کیلومتر در ساعت) محاسبه می شود. |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT | مانند بالا، اما ما فقط حداقل زمان سفر و travelDurationLimit خودرو را با هم مقایسه می کنیم. |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS | اگر این حملونقل در اولین زمان شروع شود، وسیله نقلیه نمیتواند در بهترین حالت ( CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT برای محاسبات زمان را ببینید) انجام دهد: کل زمان باعث میشود خودرو پس از آخرین زمان پایان آن به پایان برسد. |
VEHICLE_NOT_ALLOWED | قسمت allowedVehicleIndices محموله خالی نیست و این وسیله نقلیه متعلق به آن نیست. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی."],[[["\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. |"]]