Reference documentation and code samples for the Google Cloud 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.cloud.optimization.v1.OptimizeToursRequest.SolvingMode
Namespace
Google \ Cloud \ Optimization \ V1 \ OptimizeToursRequest
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-09 UTC."],[],[],null,["# Google Cloud Optimization V1 Client - Class SolvingMode (1.0.5)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.5 (latest)](/php/docs/reference/cloud-optimization/latest/V1.OptimizeToursRequest.SolvingMode)\n- [1.0.4](/php/docs/reference/cloud-optimization/1.0.4/V1.OptimizeToursRequest.SolvingMode)\n- [0.7.0](/php/docs/reference/cloud-optimization/0.7.0/V1.OptimizeToursRequest.SolvingMode)\n- [0.6.5](/php/docs/reference/cloud-optimization/0.6.5/V1.OptimizeToursRequest.SolvingMode)\n- [0.5.1](/php/docs/reference/cloud-optimization/0.5.1/V1.OptimizeToursRequest.SolvingMode)\n- [0.4.0](/php/docs/reference/cloud-optimization/0.4.0/V1.OptimizeToursRequest.SolvingMode)\n- [0.3.4](/php/docs/reference/cloud-optimization/0.3.4/V1.OptimizeToursRequest.SolvingMode)\n- [0.2.0](/php/docs/reference/cloud-optimization/0.2.0/V1.OptimizeToursRequest.SolvingMode)\n- [0.1.9](/php/docs/reference/cloud-optimization/0.1.9/V1.OptimizeToursRequest.SolvingMode) \nReference documentation and code samples for the Google Cloud 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/cloud-optimization/latest/V1.OptimizeToursRequest#_Google_Cloud_Optimization_V1_OptimizeToursRequest__getMaxValidationErrors__)\nto cap the number of errors returned.\n\nProtobuf type `google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Optimization \\\\ 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.\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/cloud-optimization/latest/V1.OptimizeToursResponse#_Google_Cloud_Optimization_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/cloud-optimization/latest/V1.OptimizeToursResponse#_Google_Cloud_Optimization_V1_OptimizeToursResponse__getValidationErrors__)\nor\n[OptimizeToursResponse.skipped_shipments](/php/docs/reference/cloud-optimization/latest/V1.OptimizeToursResponse#_Google_Cloud_Optimization_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/cloud-optimization/latest/V1.OptimizeToursResponse#_Google_Cloud_Optimization_V1_OptimizeToursResponse__getValidationErrors__)\nfield and\n[OptimizeToursResponse.skipped_shipments](/php/docs/reference/cloud-optimization/latest/V1.OptimizeToursResponse#_Google_Cloud_Optimization_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;`"]]