SkippedShipment
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ソリューション内の未実施の配送の詳細を指定します。軽微なケースや、スキップの原因を特定できる場合は、その理由をここに報告します。
JSON 表現 |
{
"index": integer,
"label": string,
"reasons": [
{
object (Reason )
}
]
} |
フィールド |
index |
integer
インデックスは、ソース ShipmentModel 内の配送のインデックスに対応しています。
|
label |
string
対応する Shipment.label のコピー(Shipment で指定されている場合)。
|
reasons[] |
object (Reason )
配送がスキップされた理由の説明。Reason の上のコメントをご覧ください。配送がスキップされた理由がわからない場合は、理由は設定されません。
|
理由
配送がスキップされた理由が説明できる場合は、その理由がここに表示されます。すべての車両で理由が同じでない場合は、reason
に複数の要素が含まれます。スキップした配送に重複する理由を指定することはできません(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 台の車両の「りんご」の容量が超過します(車両 1 を含む)。また、少なくとも 1 台の車両の「梨」の容量が超過します(車両 3 を含む)。さらに、少なくとも 1 台の車両の距離制限が超過します(車両 1 を含む)。
JSON 表現 |
{
"code": enum (Code ),
"exampleExceededCapacityType": string,
"exampleVehicleIndex": integer
} |
フィールド |
code |
enum (Code )
コードのコメントを参照してください。
|
exampleExceededCapacityType |
string
理由コードが DEMAND_EXCEEDS_VEHICLE_CAPACITY の場合は、超過している容量タイプを 1 つ記録します。
|
exampleVehicleIndex |
integer
理由が配送車両との互換性に関連する場合、このフィールドには関連する車両のインデックスが 1 つ表示されます。
|
コード
理由タイプを識別するコード。この順序に意味はありません。特に、両方の理由に当てはまる場合に、特定の理由が別の理由より先に表示されるかどうかの判断は提供されません。
列挙型 |
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 m/秒(約 130 km/時)です。 |
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 フィールドが空ではなく、この車両がその配送に属していない。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-29 UTC。
[null,null,["最終更新日 2025-08-29 UTC。"],[[["\u003cp\u003eThis content defines the structure and details of skipped shipments in a solution, including the reasons they were not performed.\u003c/p\u003e\n"],["\u003cp\u003eEach skipped shipment's JSON representation includes an index, label, and a list of reasons explaining why it was skipped, with details on the \u003ccode\u003eindex\u003c/code\u003e and \u003ccode\u003elabel\u003c/code\u003e fields.\u003c/p\u003e\n"],["\u003cp\u003eThe "Reason" section details how reasons for skipping are documented, including \u003ccode\u003ecode\u003c/code\u003e, \u003ccode\u003eexampleExceededCapacityType\u003c/code\u003e, and \u003ccode\u003eexampleVehicleIndex\u003c/code\u003e, which provide specific information about the incompatibility.\u003c/p\u003e\n"],["\u003cp\u003eThe "Code" section lists various enum reasons for skipped shipments, such as \u003ccode\u003eDEMAND_EXCEEDS_VEHICLE_CAPACITY\u003c/code\u003e, \u003ccode\u003eNO_VEHICLE\u003c/code\u003e and \u003ccode\u003eCANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT\u003c/code\u003e, each explaining a different cause.\u003c/p\u003e\n"],["\u003cp\u003eIf a reason applies to multiple vehicles, it will be listed multiple times with a unique \u003ccode\u003eexampleVehicleIndex\u003c/code\u003e for each vehicle, and a skipped shipment will not have duplicate 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/u-turn-avoidance/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/u-turn-avoidance/reference/rest/v1/ShipmentModel#Shipment.FIELDS.label), if specified in the `Shipment`. |\n| `reasons[]` | `object (`[Reason](/maps/tt/route-optimization/experimental/u-turn-avoidance/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/u-turn-avoidance/reference/rest/v1/SkippedShipment#Code), \"exampleExceededCapacityType\": string, \"exampleVehicleIndex\": integer } ``` |\n\n| Fields ||\n|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|\n| `code` | `enum (`[Code](/maps/tt/route-optimization/experimental/u-turn-avoidance/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. |"]]