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
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.
If infeasibilities in injected_solution_constraint routes are detected
they are populated in the
OptimizeToursResponse.validation_errors
field and
OptimizeToursResponse.skipped_shipments
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;
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Maps Route Optimization V1 Client - Class SolvingMode (0.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.4.1 (latest)](/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursRequest.SolvingMode)\n- [0.4.0](/php/docs/reference/maps-routeoptimization/0.4.0/V1.OptimizeToursRequest.SolvingMode)\n- [0.3.3](/php/docs/reference/maps-routeoptimization/0.3.3/V1.OptimizeToursRequest.SolvingMode)\n- [0.2.0](/php/docs/reference/maps-routeoptimization/0.2.0/V1.OptimizeToursRequest.SolvingMode)\n- [0.1.0](/php/docs/reference/maps-routeoptimization/0.1.0/V1.OptimizeToursRequest.SolvingMode) \nReference documentation and code samples for the Google Maps Route Optimization V1 Client class SolvingMode.\n\nDefines how the solver should handle the request. In all modes but\n`VALIDATE_ONLY`, if the request is invalid, you will receive an\n`INVALID_REQUEST` error. See\n[max_validation_errors](/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursRequest#_Google_Maps_RouteOptimization_V1_OptimizeToursRequest__getMaxValidationErrors__)\nto cap the number of errors returned.\n\nProtobuf type `google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode`\n\nNamespace\n---------\n\nGoogle \\\\ Maps \\\\ RouteOptimization \\\\ V1 \\\\ OptimizeToursRequest\n\nMethods\n-------\n\n### static::name\n\n### static::value\n\nConstants\n---------\n\n### DEFAULT_SOLVE\n\n Value: 0\n\nSolve the model. Warnings may be issued in\nOptimizeToursResponse.validation_errors.\n\nGenerated from protobuf enum `DEFAULT_SOLVE = 0;`\n\n### VALIDATE_ONLY\n\n Value: 1\n\nOnly validates the model without solving it: populates as many\n[OptimizeToursResponse.validation_errors](/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursResponse#_Google_Maps_RouteOptimization_V1_OptimizeToursResponse__getValidationErrors__)\nas possible.\n\nGenerated from protobuf enum `VALIDATE_ONLY = 1;`\n\n### DETECT_SOME_INFEASIBLE_SHIPMENTS\n\n Value: 2\n\nOnly populates\n[OptimizeToursResponse.validation_errors](/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursResponse#_Google_Maps_RouteOptimization_V1_OptimizeToursResponse__getValidationErrors__)\nor\n[OptimizeToursResponse.skipped_shipments](/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursResponse#_Google_Maps_RouteOptimization_V1_OptimizeToursResponse__getSkippedShipments__),\nand doesn't actually solve the rest of the request (`status` and `routes`\nare unset in the response).\n\nIf infeasibilities in `injected_solution_constraint` routes are detected\nthey are populated in the\n[OptimizeToursResponse.validation_errors](/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursResponse#_Google_Maps_RouteOptimization_V1_OptimizeToursResponse__getValidationErrors__)\nfield and\n[OptimizeToursResponse.skipped_shipments](/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursResponse#_Google_Maps_RouteOptimization_V1_OptimizeToursResponse__getSkippedShipments__)\nis left empty.\n*IMPORTANT*: not all infeasible shipments are returned here, but only the\nones that are detected as infeasible during preprocessing.\n\nGenerated from protobuf enum `DETECT_SOME_INFEASIBLE_SHIPMENTS = 2;`"]]