ShipmentModel가 포함된 OptimizeToursRequest를 전송하고 전체 비용을 최소화하면서 차량이 실행할 경로 집합인 ShipmentRoute가 포함된 OptimizeToursResponse를 반환합니다.
ShipmentModel 모델은 주로 실행해야 하는 Shipment와 Shipment를 전송하는 데 사용할 수 있는 Vehicle로 구성됩니다. ShipmentRoute는 Shipment를 Vehicle에 할당합니다. 구체적으로는 일련의 Visit를 각 차량에 할당합니다. 여기서 Visit는 Shipment의 픽업 또는 배달인 VisitRequest에 해당합니다.
목표는 ShipmentRoute를 Vehicle에 할당하여 ShipmentModel에 정의된 많은 구성요소가 비용에 포함되는 경우 총 비용을 최소화하는 것입니다.
HTTP 요청
POST https://routeoptimization.googleapis.com/v1/{parent=projects/*/locations/*}:optimizeTours
이 해석은 injectedFirstSolutionRoutes, injectedSolutionConstraint, refreshDetailsRoutes 필드에 적용됩니다. 솔루션이 생성된 이후 요청의 배송 또는 차량 색인이 변경된 경우(예: 배송 또는 차량이 요청에서 삭제되거나 추가된 경우) 사용할 수 있습니다.
이 값이 true인 경우 다음 카테고리의 라벨은 카테고리에서 최대 한 번만 표시되어야 합니다.
삽입된 솔루션의 vehicleLabel가 요청 차량과 일치하지 않으면 해당 경로가 방문과 함께 솔루션에서 삭제됩니다. 삽입된 솔루션의 shipmentLabel가 배송 요청에 해당하지 않는 경우 해당 방문이 솔루션에서 삭제됩니다. 삽입된 솔루션의 SkippedShipment.label가 요청 배송에 해당하지 않는 경우 솔루션에서 SkippedShipment가 삭제됩니다.
주입된 솔루션에서 경로 방문 또는 전체 경로를 제거하면 암시적 제약 조건에 영향을 미쳐 솔루션 변경, 검증 오류 또는 실행 불가로 이어질 수 있습니다.
참고: 호출자는 각 Vehicle.label(resp. Shipment.label)는 두 가지 관련 요청(삽입된 솔루션에 사용된 OptimizeToursResponse를 생성한 이전 요청과 삽입된 솔루션이 포함된 현재 요청)에서 사용되는 차량(resp. 배송) 항목을 고유하게 식별합니다. 위에서 설명한 고유성 확인으로는 이러한 요구사항을 보장할 수 없습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eSends an \u003ccode\u003eOptimizeToursRequest\u003c/code\u003e and returns an \u003ccode\u003eOptimizeToursResponse\u003c/code\u003e containing optimized \u003ccode\u003eShipmentRoute\u003c/code\u003es for a given \u003ccode\u003eShipmentModel\u003c/code\u003e and \u003ccode\u003eVehicle\u003c/code\u003es.\u003c/p\u003e\n"],["\u003cp\u003eThe service aims to minimize the total cost of routes by assigning \u003ccode\u003eShipment\u003c/code\u003es to \u003ccode\u003eVehicle\u003c/code\u003es and optimizing their \u003ccode\u003eVisit\u003c/code\u003e sequences.\u003c/p\u003e\n"],["\u003cp\u003eRequest body includes parameters to guide the optimization process such as timeout, model, solving mode, search mode, and constraints.\u003c/p\u003e\n"],["\u003cp\u003eThe response contains the optimized routes, including details like polylines, travel durations, and total cost.\u003c/p\u003e\n"],["\u003cp\u003eRequires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope and \u003ccode\u003erouteoptimization.locations.use\u003c/code\u003e IAM permission.\u003c/p\u003e\n"]]],["This content describes the `OptimizeTours` API, which optimizes routes for shipments using vehicles. A `POST` request is sent to `https://routeoptimization.googleapis.com/v1/{parent=projects/*/locations/*}:optimizeTours`. The request body includes a `ShipmentModel` specifying shipments and vehicles. The API then generates an `OptimizeToursResponse` with `ShipmentRoute`s, assigning `Visit`s (pickups/deliveries) to each vehicle to minimize total cost. Optional parameters allow traffic consideration, polyline population, and injected solution constraints. Authorization requires cloud platform scope and IAM permissions.\n"],null,[]]