SkippedShipment

Specifies 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.

JSON representation
{
  "index": integer,
  "label": string,
  "reasons": [
    {
      object (Reason)
    }
  ]
}
Fields
index

integer

The index corresponds to the index of the shipment in the source ShipmentModel.

label

string

Copy of the corresponding Shipment.label, if specified in the Shipment.

reasons[]

object (Reason)

A list of reasons that explain why the shipment was skipped. See comment above Reason.

Reason

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 exampleVehicleIndex. Example:

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
}

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).

JSON representation
{
  "code": enum (Code),
  "exampleExceededCapacityType": string,
  "exampleVehicleIndex": integer
}
Fields
code

enum (Code)

Refer to the comments of Code.

exampleExceededCapacityType

string

If the reason code is DEMAND_EXCEEDS_VEHICLE_CAPACITY, documents one capacity type that is exceeded.

exampleVehicleIndex

integer

If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.

Code

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.

Enums
CODE_UNSPECIFIED This should never be used. If we are unable to understand why a shipment was skipped, we simply return an empty set of reasons.
NO_VEHICLE There is no vehicle in the model making all shipments infeasible.
DEMAND_EXCEEDS_VEHICLE_CAPACITY The demand of the shipment exceeds a vehicle's capacity for some capacity types, one of which is exampleExceededCapacityType.
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.

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).

CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT Same as above but we only compare minimum travel time and the vehicle's travelDurationLimit.
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.
VEHICLE_NOT_ALLOWED The allowedVehicleIndices field of the shipment is not empty and this vehicle does not belong to it.