Tối ưu hoá hành trình xe cho một hoặc nhiều thông báo OptimizeToursRequest dưới dạng lô.
Phương thức này là một Thao tác thực hiện lâu (LRO). Dữ liệu đầu vào cho quá trình tối ưu hoá (tin nhắn OptimizeToursRequest) và dữ liệu đầu ra (tin nhắn OptimizeToursResponse) được đọc và ghi vào Cloud Storage ở định dạng do người dùng chỉ định. Giống như phương thức projects.optimizeTours, mỗi OptimizeToursRequest chứa một ShipmentModel và trả về một OptimizeToursResponse chứa các trường ShipmentRoute. Đây là một tập hợp các tuyến đường mà xe sẽ thực hiện để giảm thiểu tổng chi phí.
Người dùng có thể thăm dò ý kiến operations.get để kiểm tra trạng thái của LRO:
Nếu trường done LRO là sai, thì ít nhất một yêu cầu vẫn đang được xử lý. Các yêu cầu khác có thể đã hoàn tất thành công và kết quả của các yêu cầu đó có trong Cloud Storage.
Nếu trường done của LRO là đúng, thì tất cả các yêu cầu đều đã được xử lý. Mọi yêu cầu được xử lý thành công đều có kết quả trong Cloud Storage. Mọi yêu cầu không thành công sẽ không có kết quả trong Cloud Storage. Nếu trường error của LRO được đặt, thì trường này sẽ chứa lỗi từ một trong các yêu cầu không thành công.
Yêu cầu HTTP
POST https://routeoptimization.googleapis.com/v1/{parent=projects/*}:batchOptimizeTours
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2024-12-22 UTC."],[[["The `batchOptimizeTours` method optimizes vehicle tours for multiple requests as a Long Running Operation (LRO), reading inputs and writing outputs to Cloud Storage."],["Users can monitor the LRO status using `operations.get`, with results becoming available in Cloud Storage upon completion."],["The request body requires `modelConfigs` which specifies file paths and data formats for each model using the `AsyncModelConfig` structure."],["Authorization requires the `https://www.googleapis.com/auth/cloud-platform` OAuth scope and the `routeoptimization.operations.create` IAM permission."],["Successful responses contain an `Operation` instance providing information about the ongoing operation."]]],["This API method `batchOptimizeTours` optimizes vehicle tours for multiple `OptimizeToursRequest` messages via a Long Running Operation (LRO). Inputs and outputs are stored in Cloud Storage. Each request includes a `ShipmentModel`, and returns `ShipmentRoute` fields, minimizing overall cost. Users can check the LRO's status via `operations.get`. The `done` field indicates completion, while the `error` field shows failures. Requires `routeoptimization.operations.create` IAM permission and `cloud-platform` OAuth scope. The parent parameter will be used for routing.\n"]]