# 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 `https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/projects.locations/optimizeTours#body.request_body.FIELDS.max_validation_errors` to cap the number of errors returned.

| Enums ||
|---|---|
| `DEFAULT_SOLVE` | Solve the model. Warnings may be issued in \[OptimizeToursResponse.validation_errors\]\[google.cloud.optimization.v1.OptimizeToursResponse.validation_errors\]. |
| `VALIDATE_ONLY` | Only validates the model without solving it: populates as many `https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/OptimizeToursResponse#FIELDS.validation_errors` as possible. |
| `DETECT_SOME_INFEASIBLE_SHIPMENTS` | Only populates `https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/OptimizeToursResponse#FIELDS.validation_errors` or `https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/OptimizeToursResponse#FIELDS.skipped_shipments`, and doesn't actually solve the rest of the request (`status` and `routes` are unset in the response). If infeasibilities in `injectedSolutionConstraint` routes are detected they are populated in the `https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/OptimizeToursResponse#FIELDS.validation_errors` field and `https://developers.google.com/maps/documentation/route-optimization/reference/rest/v1/OptimizeToursResponse#FIELDS.skipped_shipments` is left empty. *IMPORTANT*: not all infeasible shipments are returned here, but only the ones that are detected as infeasible during preprocessing. |
| `TRANSFORM_AND_RETURN_REQUEST` | 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. |