SolvingMode
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Xác định cách trình giải quyết xử lý yêu cầu. Trong tất cả các chế độ ngoại trừ VALIDATE_ONLY
, nếu yêu cầu không hợp lệ, bạn sẽ nhận được lỗi INVALID_REQUEST
. Xem maxValidationErrors
để giới hạn số lượng lỗi được trả về.
Enum |
DEFAULT_SOLVE |
Giải mô hình. Cảnh báo có thể được đưa ra trong [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]. |
VALIDATE_ONLY |
Chỉ xác thực mô hình mà không giải quyết mô hình: điền càng nhiều OptimizeToursResponse.validation_errors càng tốt. |
DETECT_SOME_INFEASIBLE_SHIPMENTS |
Chỉ điền sẵn OptimizeToursResponse.validation_errors hoặc OptimizeToursResponse.skipped_shipments và không thực sự giải quyết được phần còn lại của yêu cầu (status và routes không được đặt trong phản hồi). Nếu phát hiện thấy các tuyến đường không khả thi trong injectedSolutionConstraint , các tuyến đường đó sẽ được điền vào trường OptimizeToursResponse.validation_errors và OptimizeToursResponse.skipped_shipments sẽ để trống. LƯU Ý QUAN TRỌNG: không phải tất cả các lô hàng không thể thực hiện được đều được trả về tại đây, mà chỉ những lô hàng được phát hiện là không thể thực hiện được trong quá trình xử lý trước. |
TRANSFORM_AND_RETURN_REQUEST |
Chế độ này chỉ hoạt động nếu ShipmentModel.objectives không trống. Yêu cầu chưa được giải quyết. Mục này chỉ được xác thực và điền các chi phí tương ứng với các mục tiêu đã cho. Ngoài ra, hãy xem tài liệu về ShipmentModel.objectives . Yêu cầu thu được sẽ được trả về dưới dạng OptimizeToursResponse.processed_request . Thử nghiệm: Hãy xem https://developers.google.com/maps/tt/route-optimization/experimental/objectives/make-request để biết thêm thông tin chi tiết. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-31 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\u003cp\u003eDefines how the solver processes the request, dictating whether it solves the model, validates it, or detects infeasible shipments.\u003c/p\u003e\n"],["\u003cp\u003eOffers three modes: \u003ccode\u003eDEFAULT_SOLVE\u003c/code\u003e for solving, \u003ccode\u003eVALIDATE_ONLY\u003c/code\u003e for validation, and \u003ccode\u003eDETECT_SOME_INFEASIBLE_SHIPMENTS\u003c/code\u003e for identifying problematic shipments.\u003c/p\u003e\n"],["\u003cp\u003eIn all modes except \u003ccode\u003eVALIDATE_ONLY\u003c/code\u003e, invalid requests will return an \u003ccode\u003eINVALID_REQUEST\u003c/code\u003e error, with potential for controlling the number of error messages.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDETECT_SOME_INFEASIBLE_SHIPMENTS\u003c/code\u003e mode focuses on pre-processing infeasibility detection without fully solving the problem.\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/documentation/route-optimization/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/documentation/route-optimization/reference/rest/v1/OptimizeToursResponse#FIELDS.validation_errors) as possible. |\n| `DETECT_SOME_INFEASIBLE_SHIPMENTS` | Only populates [OptimizeToursResponse.validation_errors](/maps/documentation/route-optimization/reference/rest/v1/OptimizeToursResponse#FIELDS.validation_errors) or [OptimizeToursResponse.skipped_shipments](/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 [OptimizeToursResponse.validation_errors](/maps/documentation/route-optimization/reference/rest/v1/OptimizeToursResponse#FIELDS.validation_errors) field and [OptimizeToursResponse.skipped_shipments](/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. |\n| `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 \u003chttps://developers.google.com/maps/tt/route-optimization/experimental/objectives/make-request\u003e for more details. |"]]