# Google Maps Route Optimization V1 Client - Class SolvingMode (0.6.2)

0.6.2 (latest) 0.6.1 0.5.1 0.4.1 0.3.3 0.2.0 0.1.0 Reference documentation and code samples for the Google Maps Route Optimization V1 Client class SolvingMode.

Defines how the solver should handle the request. In all modes but
`VALIDATE_ONLY`, if the request is invalid, you will receive an
`INVALID_REQUEST` error. See
[max_validation_errors](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursRequest#_Google_Maps_RouteOptimization_V1_OptimizeToursRequest__getMaxValidationErrors__)
to cap the number of errors returned.

Protobuf type `google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode`

## Namespace

Google \\ Maps \\ RouteOptimization \\ V1 \\ OptimizeToursRequest

## Methods

### static::name

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `mixed` |

### static::value

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `mixed` |

## Constants

### DEFAULT_SOLVE

    Value: 0

Solve the model. Warnings may be issued in
OptimizeToursResponse.validation_errors.

Generated from protobuf enum `DEFAULT_SOLVE = 0;`

### VALIDATE_ONLY

    Value: 1

Only validates the model without solving it: populates as many
[OptimizeToursResponse.validation_errors](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursResponse#_Google_Maps_RouteOptimization_V1_OptimizeToursResponse__getValidationErrors__)
as possible.

Generated from protobuf enum `VALIDATE_ONLY = 1;`

### DETECT_SOME_INFEASIBLE_SHIPMENTS

    Value: 2

Only populates
[OptimizeToursResponse.validation_errors](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursResponse#_Google_Maps_RouteOptimization_V1_OptimizeToursResponse__getValidationErrors__)
or
[OptimizeToursResponse.skipped_shipments](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursResponse#_Google_Maps_RouteOptimization_V1_OptimizeToursResponse__getSkippedShipments__),
and doesn't actually solve the rest of the request (`status` and `routes`
are unset in the response).

If infeasibilities in `injected_solution_constraint` routes are detected
they are populated in the
[OptimizeToursResponse.validation_errors](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursResponse#_Google_Maps_RouteOptimization_V1_OptimizeToursResponse__getValidationErrors__)
field and
[OptimizeToursResponse.skipped_shipments](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursResponse#_Google_Maps_RouteOptimization_V1_OptimizeToursResponse__getSkippedShipments__)
is left empty.
*IMPORTANT*: not all infeasible shipments are returned here, but only the
ones that are detected as infeasible during preprocessing.

Generated from protobuf enum `DETECT_SOME_INFEASIBLE_SHIPMENTS = 2;`

### TRANSFORM_AND_RETURN_REQUEST

    Value: 3

This mode only works if `ShipmentModel.objectives` is not empty. The
request is not solved. It is only validated and filled with costs
corresponding to the given objectives. Also see the documentation of
`ShipmentModel.objectives`. The resulting request is returned as
`OptimizeToursResponse.processed_request`.

Experimental: See
<https://developers.google.com/maps/tt/route-optimization/experimental/objectives/make-request>
for more details.

Generated from protobuf enum `TRANSFORM_AND_RETURN_REQUEST = 3;`