SkippedShipment
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Określa szczegóły niezrealizowanych dostaw w rozwiązaniu. W najprostszych przypadkach lub jeśli jesteśmy w stanie zidentyfikować przyczynę pominięcia, podajemy tutaj jej przyczynę.
Zapis JSON |
{
"index": integer,
"label": string,
"reasons": [
{
object (Reason )
}
]
} |
Pola |
index |
integer
Indeks odpowiada indeksowi przesyłki w źródle ShipmentModel .
|
label |
string
Kopia odpowiedniego elementu Shipment.label , jeśli został on podany w elemencie Shipment .
|
reasons[] |
object (Reason )
Lista powodów, dla których dostawa została pominięta. Zobacz komentarz powyżej Reason . Jeśli nie będziemy w stanie ustalić, dlaczego przesyłka została pominięta, nie ustawimy przyczyn.
|
Przyczyna
Jeśli możemy wyjaśnić, dlaczego przesyłka została pominięta, podamy tutaj powody. Jeśli przyczyna nie jest taka sama w przypadku wszystkich pojazdów, element reason
będzie zawierał więcej niż 1 element. Przesyłka pominięta nie może mieć zduplikowanych przyczyn, czyli wszystkich pól, z wyjątkiem pola exampleVehicleIndex
. Przykład:
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
}
Przesyłka, która została pominięta, jest niezgodna ze wszystkimi pojazdami. Powody mogą być różne w przypadku poszczególnych pojazdów, ale w przynajmniej jednym z nich przekroczona byłaby pojemność „jabłek” (w tym w pojazdzie 1), w przynajmniej jednym z nich przekroczona byłaby pojemność „gruszek” (w tym w pojazdzie 3), a w przynajmniej jednym z nich przekroczony byłby limit odległości (w tym w pojazdzie 1).
Zapis JSON |
{
"code": enum (Code ),
"exampleExceededCapacityType": string,
"exampleVehicleIndex": integer
} |
Pola |
code |
enum (Code )
Zapoznaj się z komentarzami w kodzie.
|
exampleExceededCapacityType |
string
Jeśli kod przyczyny to DEMAND_EXCEEDS_VEHICLE_CAPACITY , dokumentuje jeden z przekroczeń typu pojemności.
|
exampleVehicleIndex |
integer
Jeśli przyczyna dotyczy niezgodności przesyłki z pojazdem, to pole zawiera indeks odpowiedniego pojazdu.
|
Kod
Kod identyfikujący typ przyczyny. Ta kolejność jest bez znaczenia. W szczególności nie wskazuje, czy dana przyczyna pojawi się przed inną w rozwiązaniu, jeśli obie są stosowane.
Wartości w polu enum |
CODE_UNSPECIFIED |
Nie należy jej nigdy używać. |
NO_VEHICLE |
W modelu nie ma żadnego pojazdu, przez co wszystkie dostawy są niemożliwe. |
DEMAND_EXCEEDS_VEHICLE_CAPACITY |
Zapotrzebowanie na dostawę przekracza pojemność pojazdu w przypadku niektórych typów pojemności, z których jeden wynosi exampleExceededCapacityType . |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT |
Minimalna odległość niezbędna do wykonania tej dostawy, czyli od startLocation pojazdu do miejsc odbioru lub dostawy oraz do miejsca docelowego pojazdu, przekracza routeDistanceLimit pojazdu. Pamiętaj, że do tego obliczenia używamy odległości geodezyjnych. |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT |
Minimalny czas niezbędny do wykonania tej przesyłki, w tym czas podróży, czas oczekiwania i obsługa, przekracza routeDurationLimit pojazdu. Uwaga: czas podróży jest obliczany w najlepszym możliwym scenariuszu, czyli jako odległość geodezyjna × 36 m/s (około 130 km/h). |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT |
Tak jak powyżej, ale porównujemy tylko minimalny czas podróży z travelDurationLimit pojazdu. |
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS |
Pojazd nie może wykonać tej dostawy w najlepszym scenariuszu (patrz CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT w celu obliczenia czasu), jeśli rozpoczyna się w najwcześniejszym możliwym czasie: łączny czas pracy pojazdu spowoduje, że zakończy on pracę po upływie najpóźniejszego czasu zakończenia. |
VEHICLE_NOT_ALLOWED |
Pole allowedVehicleIndices przesyłki nie jest puste, a pojazd do niego nie należy. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-08-29 UTC.
[null,null,["Ostatnia aktualizacja: 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. |"]]