Method: projects.batchOptimizeTours
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
एक या उससे ज़्यादा OptimizeToursRequest
मैसेज के लिए, वाहन के सफ़र को एक साथ ऑप्टिमाइज़ करता है.
यह तरीका, ज़्यादा समय तक चलने वाला ऑपरेशन (एलआरओ) है. ऑप्टिमाइज़ेशन (OptimizeToursRequest
मैसेज) और आउटपुट (OptimizeToursResponse
मैसेज) के इनपुट, उपयोगकर्ता के तय किए गए फ़ॉर्मैट में Cloud Storage से पढ़े और उसमें लिखे जाते हैं. projects.optimizeTours
तरीके की तरह, हर OptimizeToursRequest
में एक ShipmentModel
होता है और यह OptimizeToursResponse
दिखाता है. इसमें ShipmentRoute
फ़ील्ड होते हैं, जो वाहनों के लिए तय किए गए रास्तों का एक सेट होता है. इन रास्तों से, कुल लागत को कम किया जा सकता है.
उपयोगकर्ता, एलआरओ का स्टेटस देखने के लिए operations.get
को पोल कर सकता है:
अगर LRO done
फ़ील्ड की वैल्यू 'गलत' है, तो इसका मतलब है कि कम से कम एक अनुरोध अब भी प्रोसेस किया जा रहा है. ऐसा हो सकता है कि अन्य अनुरोध पूरे हो गए हों और उनके नतीजे Cloud Storage में उपलब्ध हों.
अगर एलआरओ का done
फ़ील्ड सही है, तो इसका मतलब है कि सभी अनुरोधों को प्रोसेस कर दिया गया है. प्रोसेस हो चुके हर अनुरोध के नतीजे, Cloud Storage में उपलब्ध होंगे. पूरे न हो पाने वाले किसी भी अनुरोध के नतीजे, Cloud Storage में उपलब्ध नहीं होंगे. अगर एलआरओ का error
फ़ील्ड सेट है, तो इसमें उस अनुरोध से जुड़ी गड़बड़ी की जानकारी होती है जो पूरा नहीं हो सका.
एचटीटीपी अनुरोध
POST https://routeoptimization.googleapis.com/v1/{parent=projects/*}:batchOptimizeTours
यह यूआरएल gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ पैरामीटर
पैरामीटर |
parent |
string
ज़रूरी है. कॉल करने के लिए, प्रोजेक्ट और जगह को टारगेट करें. फ़ॉर्मैट: * projects/{project-id} * projects/{project-id}/locations/{location-id} अगर किसी जगह की जानकारी नहीं दी गई है, तो कोई इलाका अपने-आप चुन लिया जाएगा.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य हिस्से में, यहां दिए गए स्ट्रक्चर का डेटा शामिल होता है:
फ़ील्ड |
modelConfigs[] |
object (AsyncModelConfig )
ज़रूरी है. हर खरीदारी मॉडल की जानकारी इनपुट/आउटपुट जानकारी, जैसे कि फ़ाइल पाथ और डेटा फ़ॉर्मैट.
|
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में Operation
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/cloud-platform
IAM की अनुमतियां
parent
संसाधन पर, इस IAM अनुमति की ज़रूरत होती है:
routeoptimization.operations.create
ज़्यादा जानकारी के लिए, IAM दस्तावेज़ देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-31 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-31 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThe \u003ccode\u003ebatchOptimizeTours\u003c/code\u003e method optimizes vehicle tours for multiple requests as a Long Running Operation (LRO), reading inputs and writing outputs to Cloud Storage.\u003c/p\u003e\n"],["\u003cp\u003eUsers can monitor the LRO status using \u003ccode\u003eoperations.get\u003c/code\u003e, with results becoming available in Cloud Storage upon completion.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires \u003ccode\u003emodelConfigs\u003c/code\u003e which specifies file paths and data formats for each model using the \u003ccode\u003eAsyncModelConfig\u003c/code\u003e structure.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope and the \u003ccode\u003erouteoptimization.operations.create\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful responses contain an \u003ccode\u003eOperation\u003c/code\u003e instance providing information about the ongoing operation.\u003c/p\u003e\n"]]],["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"],null,["# Method: projects.batchOptimizeTours\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n\nOptimizes vehicle tours for one or more `OptimizeToursRequest` messages as a batch.\n\nThis method is a Long Running Operation (LRO). The inputs for optimization (`OptimizeToursRequest` messages) and outputs (`OptimizeToursResponse` messages) are read from and written to Cloud Storage in user-specified format. Like the `projects.optimizeTours` method, each `OptimizeToursRequest` contains a `ShipmentModel` and returns an `OptimizeToursResponse` containing `ShipmentRoute` fields, which are a set of routes to be performed by vehicles minimizing the overall cost.\n\nThe user can poll `operations.get` to check the status of the LRO:\n\nIf the LRO `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 Cloud Storage.\n\nIf the LRO's `done` field is true, then all requests have been processed. Any successfully processed requests will have their results available in Cloud Storage. Any requests that failed will not have their results available in Cloud Storage. If the LRO's `error` field is set, then it contains the error from one of the failed requests.\n\n### HTTP request\n\n`POST https://routeoptimization.googleapis.com/v1/{parent=projects/*}:batchOptimizeTours`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. Target project and location to make a call. Format: \\* `projects/{project-id}` \\* `projects/{project-id}/locations/{location-id}` If no location is specified, a region will be chosen automatically. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"modelConfigs\": [ { object (/maps/documentation/route-optimization/reference/rest/v1/AsyncModelConfig) } ] } ``` |\n\n| Fields ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `modelConfigs[]` | `object (`[AsyncModelConfig](/maps/documentation/route-optimization/reference/rest/v1/AsyncModelConfig)`)` Required. Input/Output information each purchase model, such as file paths and data formats. |\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/maps/documentation/route-optimization/reference/rest/v1/projects.locations.operations#Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:\n\n- `routeoptimization.operations.create`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]