ShipmentModel가 포함된 OptimizeToursRequest를 전송하고 전체 비용을 최소화하면서 차량이 실행할 경로 집합인 ShipmentRoute가 포함된 OptimizeToursResponse를 반환합니다.
ShipmentModel 모델은 주로 실행해야 하는 Shipment와 Shipment를 전송하는 데 사용할 수 있는 Vehicle로 구성됩니다. ShipmentRoute는 Shipment를 Vehicle에 할당합니다. 더 구체적으로는 각 차량에 일련의 Visit를 할당합니다. 여기서 Visit는 Shipment의 수령 또는 배송인 VisitRequest에 해당합니다.
목표는 비용이 ShipmentModel에 정의된 많은 구성요소를 포함하는 경우 총비용을 최소화하는 ShipmentRoute를 Vehicle에 할당하는 것입니다.
HTTP 요청
POST https://routeoptimization.googleapis.com/v1/{parent=projects/*}: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"]],["최종 업데이트: 2024-12-22(UTC)"],[[["The Route Optimization API minimizes the total cost of routes by assigning `ShipmentRoute`s to `Vehicle`s."],["The API takes an `OptimizeToursRequest` with a `ShipmentModel` and returns an `OptimizeToursResponse` with `ShipmentRoute`s."],["The `ShipmentModel` defines the `Shipment`s to be transported, the `Vehicle`s available, and the cost components."],["The API considers various factors, including traffic, time windows, and vehicle capacities, to optimize the routes."],["Authorization is required using OAuth scope `https://www.googleapis.com/auth/cloud-platform` and IAM permission `routeoptimization.locations.use`."]]],["This content details the `OptimizeTours` API, which optimizes routes for shipments using vehicles. The core action involves sending a `POST` request to `https://routeoptimization.googleapis.com/v1/{parent=projects/*}:optimizeTours`, specifying a `ShipmentModel` within the request body. This model defines shipments, vehicles, and cost parameters. The API returns an `OptimizeToursResponse` that details `ShipmentRoute`s, assigning visits to each vehicle to minimize costs. The request body allows for parameters like `timeout`, `solvingMode`, and `injectedSolutionConstraint` to further fine-tune the route optimization process.\n"]]