Page Summary
-
This service optimizes vehicle tours for batch
OptimizeToursRequestmessages, utilizing a Long Running Operation (LRO) to process requests asynchronously. -
Input and output data for the optimization process are managed through Cloud Storage using user-specified formats, with each
OptimizeToursRequestresulting in anOptimizeToursResponsethat containsShipmentRoutes. -
The LRO's status can be checked via
operations.get, indicating if requests are still processing or if all have completed, with successful results available in GCS, while failed requests do not have results available. -
The service uses an HTTP
POSTrequest tohttps://routeoptimization.googleapis.com/v1/{parent=projects/*/locations/*}:batchOptimizeTours, withparentbeing a required path parameter specifying the target project and location. -
To utilize this service, the user needs
https://www.googleapis.com/auth/cloud-platformOAuth scope and therouteoptimization.operations.createIAM permission on theparentresource.
Optimizes vehicle tours for one or more OptimizeToursRequest messages as a batch.
This method is a Long Running Operation (LRO). The inputs for optimization (OptimizeToursRequest messages) and outputs (OptimizeToursResponse messages) are read/written from/to Cloud Storage in user-specified format. Like the locations.optimizeTours method, each OptimizeToursRequest contains a ShipmentModel and returns an OptimizeToursResponse containing ShipmentRoutes, which are a set of routes to be performed by vehicles minimizing the overall cost.
The user can poll operations.get to check the status of the LRO:
If the LRO's done field is false, then at least one request is still being processed. Other requests may have completed successfully and their results are available in GCS.
If the LRO's done field is true, then all requests have been processed. Any successfully processed requests will have their results available in GCS. Any requests that failed will not have their results available in GCS. If the LRO's error field is set, then it contains the error from one of the failed requests.
HTTP request
POST https://routeoptimization.googleapis.com/v1/{parent=projects/*/locations/*}:batchOptimizeTours
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent |
Required. Target project and location to make a call. Format: * If no location is specified, a region will be chosen automatically. |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{
"modelConfigs": [
{
object ( |
| Fields | |
|---|---|
modelConfigs[] |
Required. Input/Output information each purchase model, such as file paths and data formats. |
Response body
If successful, the response body contains an instance of Operation.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
IAM Permissions
Requires the following IAM permission on the parent resource:
routeoptimization.operations.create
For more information, see the IAM documentation.