SolvingMode
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
솔버가 요청을 처리하는 방법을 정의합니다. VALIDATE_ONLY
모드를 제외한 모든 모드에서 요청이 유효하지 않으면 INVALID_REQUEST
오류가 표시됩니다. 반환되는 오류 수를 제한하려면 maxValidationErrors
를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-29(UTC)
[null,null,["최종 업데이트: 2025-08-29(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,["# SolvingMode\n\nDefines 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. |"]]