# Class SkippedShipment (1.15.0)

1.15.0 (latest) 1.14.0 1.13.0 1.12.0 1.11.2 1.10.0 1.9.1 1.8.5 1.7.0 1.6.0 1.5.0 1.4.3 1.3.2 1.2.0 1.1.3 1.0.1 0.1.1

    SkippedShipment(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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.

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `index` | `int` The index corresponds to the index of the shipment in the source `ShipmentModel`. |
| `label` | `str` Copy of the corresponding Shipment.label, if specified in the `Shipment`. |
| `reasons` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/optimization/latest/google.cloud.optimization_v1.types.SkippedShipment.Reason]` A list of reasons that explain why the shipment was skipped. See comment above `Reason`. |

## Classes

### Reason

    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>