Reason(mapping=None, *, ignore_unknown_fields=False, **kwargs)
If 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 example_vehicle_index
. Example:
::
reasons { code: DEMAND_EXCEEDS_VEHICLE_CAPACITY example_vehicle_index: 1 example_exceeded_capacity_type: "Apples" } reasons { code: DEMAND_EXCEEDS_VEHICLE_CAPACITY example_vehicle_index: 3 example_exceeded_capacity_type: "Pears" } reasons { code: CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT example_vehicle_index: 1 }
The 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).
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes |
|
---|---|
Name | Description |
code |
google.cloud.optimization_v1.types.SkippedShipment.Reason.Code
Refer to the comments of Code. |
example_vehicle_index |
int
If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle. This field is a member of oneof _ _example_vehicle_index .
|
example_exceeded_capacity_type |
str
If the reason code is DEMAND_EXCEEDS_VEHICLE_CAPACITY ,
documents one capacity type that is exceeded.
|
Classes
Code
Code(value)
Code 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.
Note that for this computation we use the geodesic
distances.
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT (4):
The minimum time necessary to perform this shipment,
including travel time, wait time and service time exceeds
the vehicle's `route_duration_limit`.
Note: travel time is computed in the best-case scenario,
namely as geodesic distance x 36 m/s (roughly 130 km/hour).
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT (5):
Same as above but we only compare minimum travel time and
the vehicle's `travel_duration_limit`.
CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS (6):
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.
VEHICLE_NOT_ALLOWED (7):
The `allowed_vehicle_indices` field of the shipment is not
empty and this vehicle does not belong to it.