# Class InjectedSolutionConstraint (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

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

Solution injected in the request including information about
which visits must be constrained and how they must be
constrained.

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `routes` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/optimization/latest/google.cloud.optimization_v1.types.ShipmentRoute]` Routes of the solution to inject. Some routes may be omitted from the original solution. The routes and skipped shipments must satisfy the basic validity assumptions listed for `injected_first_solution_routes`. |
| `skipped_shipments` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/optimization/latest/google.cloud.optimization_v1.types.SkippedShipment]` Skipped shipments of the solution to inject. Some may be omitted from the original solution. See the `routes` field. |
| `constraint_relaxations` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/optimization/latest/google.cloud.optimization_v1.types.InjectedSolutionConstraint.ConstraintRelaxation]` For zero or more groups of vehicles, specifies when and how much to relax constraints. If this field is empty, all non-empty vehicle routes are fully constrained. |

## Classes

### ConstraintRelaxation

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

For a group of vehicles, specifies at what threshold(s) constraints
on visits will be relaxed and to which level. Shipments listed in
the `skipped_shipment` field are constrained to be skipped; i.e.,
they cannot be performed.