SolvingMode
Stay organized with collections
Save and categorize content based on your preferences.
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 maxValidationErrors
to cap the number of errors returned.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-22 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-22 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eDEFAULT_SOLVE\u003c/code\u003e mode solves the model and may issue warnings in the \u003ccode\u003eOptimizeToursResponse.validation_errors\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eVALIDATE_ONLY\u003c/code\u003e mode validates the model without solving, populating as many \u003ccode\u003eOptimizeToursResponse.validation_errors\u003c/code\u003e as possible.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDETECT_SOME_INFEASIBLE_SHIPMENTS\u003c/code\u003e mode identifies some infeasible shipments during preprocessing, populating \u003ccode\u003eOptimizeToursResponse.validation_errors\u003c/code\u003e or \u003ccode\u003eOptimizeToursResponse.skipped_shipments\u003c/code\u003e, but does not solve the request.\u003c/p\u003e\n"],["\u003cp\u003eInvalid requests in modes other than \u003ccode\u003eVALIDATE_ONLY\u003c/code\u003e will result in an \u003ccode\u003eINVALID_REQUEST\u003c/code\u003e error.\u003c/p\u003e\n"],["\u003cp\u003eThe maximum number of validation errors returned can be capped using \u003ccode\u003emaxValidationErrors\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["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 [maxValidationErrors](/maps/tt/route-optimization/experimental/u-turn-avoidance/reference/rest/v1/projects.locations/optimizeTours#body.request_body.FIELDS.max_validation_errors) to cap the number of errors returned.\n\n| Enums ||\n|------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `DEFAULT_SOLVE` | Solve the model. Warnings may be issued in \\[OptimizeToursResponse.validation_errors\\]\\[google.cloud.optimization.v1.OptimizeToursResponse.validation_errors\\]. |\n| `VALIDATE_ONLY` | Only validates the model without solving it: populates as many [OptimizeToursResponse.validation_errors](/maps/tt/route-optimization/experimental/u-turn-avoidance/reference/rest/v1/OptimizeToursResponse#FIELDS.validation_errors) as possible. |\n| `DETECT_SOME_INFEASIBLE_SHIPMENTS` | Only populates [OptimizeToursResponse.validation_errors](/maps/tt/route-optimization/experimental/u-turn-avoidance/reference/rest/v1/OptimizeToursResponse#FIELDS.validation_errors) or [OptimizeToursResponse.skipped_shipments](/maps/tt/route-optimization/experimental/u-turn-avoidance/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 [OptimizeToursResponse.validation_errors](/maps/tt/route-optimization/experimental/u-turn-avoidance/reference/rest/v1/OptimizeToursResponse#FIELDS.validation_errors) field and [OptimizeToursResponse.skipped_shipments](/maps/tt/route-optimization/experimental/u-turn-avoidance/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. |"]]