Method: projects.locations.batchOptimizeTours
批量优化一个或多个 OptimizeToursRequest
消息的车辆导览。
此方法是一项长时间运行的操作 (LRO)。系统会以用户指定的格式从 Cloud Storage 读取优化输入(OptimizeToursRequest
消息)和输出(OptimizeToursResponse
消息),并将其写入 Cloud Storage。与 locations.optimizeTours
方法一样,每个 OptimizeToursRequest
都包含一个 ShipmentModel
,并返回一个包含 ShipmentRoute
字段的 OptimizeToursResponse
,这些字段是车辆执行的一组路线,可最大限度地降低总体费用。
用户可以轮询 operations.get
以检查 LRO 的状态:
如果 LRO done
字段为 false,则表示仍有至少一个请求正在处理中。其他请求可能已成功完成,其结果可在 Cloud Storage 中找到。
如果 LRO 的 done
字段为 true,则表示所有请求均已处理完毕。所有成功处理的请求的结果都会存储在 Cloud Storage 中。所有失败的请求的结果都不会显示在 Cloud Storage 中。如果 LRO 的 error
字段已设置,则其中包含某个失败请求的错误。
HTTP 请求
POST https://routeoptimization.googleapis.com/v1/{parent=projects/*/locations/*}:batchOptimizeTours
网址采用 gRPC 转码语法。
路径参数
参数 |
parent |
string
必需。定位项目和位置以进行呼叫。 格式:* projects/{project-id} * projects/{project-id}/locations/{location-id} 如果未指定位置,则系统将自动选择区域。
|
响应正文
如果成功,则响应正文包含一个 Operation
实例。
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/cloud-platform
IAM 权限
需要拥有 parent
资源的以下 IAM 权限:
routeoptimization.operations.create
如需了解详情,请参阅 IAM 文档。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-22。
[null,null,["最后更新时间 (UTC):2024-12-22。"],[[["Optimizes vehicle tours in batches using `OptimizeToursRequest` messages, processing inputs and outputs through Cloud Storage."],["Users can monitor the Long Running Operation (LRO) status via `operations.get` to track progress and access results."],["The request body requires `AsyncModelConfig` objects specifying input/output details for each purchase model."],["Successful responses return an `Operation` object providing information about the optimization process."],["Utilizes the `https://www.googleapis.com/auth/cloud-platform` OAuth scope and `routeoptimization.operations.create` IAM permission for authorization."]]],["This service optimizes vehicle tours via batch processing of `OptimizeToursRequest` messages. Inputs and outputs are managed in Cloud Storage. Each request includes a `ShipmentModel`, yielding `ShipmentRoute` results that minimize overall costs. Users can track progress with `operations.get`; a false `done` field indicates ongoing processing, while a true `done` field signals completion. Failed requests won't have results in Cloud Storage. The HTTP request is a `POST` operation, requiring `routeoptimization.operations.create` IAM permission and `https://www.googleapis.com/auth/cloud-platform` OAuth scope. The `modelConfigs` field contains input/output data.\n"]]