Route Optimization API คืออะไร
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
นักพัฒนาแอปในเขตเศรษฐกิจยุโรป (EEA)
การเพิ่มประสิทธิภาพเส้นทางคือ Google Maps Platform API ที่สร้างแผนเส้นทางที่เพิ่มประสิทธิภาพแล้ว
สำหรับยานพาหนะคันเดียวหรือหลายคันและจุดแวะพัก
เหตุใดจึงต้องใช้ Route Optimization API
ปรับปรุงประสิทธิภาพการดำเนินงานของกองยานขนส่งด้วยความช่วยเหลือจาก
แผนเส้นทาง ปรับเส้นทางตามข้อจำกัดด้านต้นทุน เวลา ความต้องการของลูกค้า และ
วัตถุประสงค์ทางธุรกิจอื่นๆ เช่น
- บริษัทโลจิสติกส์สามารถประหยัดเวลาและทรัพยากรได้ด้วยการกำหนดเวลาการจัดส่งในวันถัดไป พร้อมทั้งเพิ่มประสิทธิภาพการนำส่งเพื่อประหยัดเวลา ลดต้นทุน นำส่งตรงเวลา รวมถึงสร้างความพึงพอใจให้แก่คนขับและลูกค้าปลายทาง
- บริษัทจัดส่งอาหารตามคำขอสามารถทำให้กระบวนการจัดส่งรวดเร็วและมีประสิทธิภาพมากขึ้นได้โดยเลือกคนขับที่พร้อมให้บริการที่ดีที่สุดเพื่อรับคำสั่งซื้อใหม่และแทรกคำสั่งซื้อเหล่านั้นลงในเส้นทางที่มีอยู่
- ผู้ให้บริการภาคสนามสามารถเพิ่มประสิทธิภาพและความพึงพอใจของลูกค้า
ได้โดยการมอบหมายผู้ให้บริการให้กับการนัดหมายและค้นหาลำดับการหยุดที่เหมาะสมที่สุดสำหรับการนัดหมายมากกว่า 1 รายการ พร้อมทั้งเพิ่มประสิทธิภาพเส้นทางอีกครั้งเมื่อเกิดปัญหา
สิ่งที่คุณทำได้ด้วย Route Optimization API
ใช้ Route Optimization API เพื่อเพิ่มประสิทธิภาพเส้นทางและงานของกลุ่มยานพาหนะ
ตามวัตถุประสงค์และ
ข้อจำกัดของคุณเอง
- วัตถุประสงค์: เป้าหมายทางธุรกิจ
- ข้อจำกัด: ข้อจำกัดของสินทรัพย์ทางกายภาพ
วัตถุประสงค์
|
ข้อจำกัด
|
ประสิทธิภาพการเดินทาง
|
เพิ่มประสิทธิภาพเส้นทางการเดินทางขั้นพื้นฐานโดยใช้พารามิเตอร์ต่างๆ เช่น ระยะทางและเวลาถึงจุดหมาย
|
เวลาทำงานของคนขับ
|
มอบหมายเส้นทางให้คนขับตามเวลาทำงานและช่วงพัก
|
มาถึงตรงเวลา
|
จัดลำดับความสำคัญของการไปรับ การนำส่ง หรือการให้บริการให้เสร็จก่อนเวลาที่กำหนด
|
ความจุของยานพาหนะ
|
มอบหมายยานพาหนะให้กับงานโดยอิงตามปริมาณสัมภาระที่ยานพาหนะบรรทุกได้
|
ค่าใช้จ่ายในการใช้ยานพาหนะ
|
ลดจำนวนยานพาหนะที่ต้องใช้ในการทำงาน
|
กรอบเวลา
|
ให้การจัดส่งหรืองานมาถึงในช่วงเวลาที่เฉพาะเจาะจง
|
การจัดสรรภาระงาน
|
กระจายงานอย่างเป็นธรรมในกลุ่มยานพาหนะและบุคลากร
|
การขึ้นต่อกันและความเข้ากันได้
|
เพิ่มประสิทธิภาพเส้นทางของกลุ่มยานพาหนะตามประเภทยานพาหนะ ลำดับงาน หรือเงื่อนไขการจัดส่ง
|
วิธีการทำงานของ Route Optimization API
คุณเข้าถึง Route Optimization API ได้โดยใช้ REST, gRPC และ
ไลบรารีของไคลเอ็นต์
เนื้อความของคำขอ
เนื้อหาคำขอจะยอมรับข้อมูลเกี่ยวกับการจัดส่งและยานพาหนะ
ที่พร้อมสำหรับการนำส่ง ซึ่งรวมถึงรายละเอียดต่อไปนี้
- สถานที่รับสินค้าและการนำส่ง
- กรอบเวลา
- ขนาดและน้ำหนักของการจัดส่ง
- ความจุของยานพาหนะ
เนื้อหาการตอบกลับ
เนื้อหาการตอบกลับจะแสดงแผนเส้นทางแบบละเอียด ซึ่งรวมถึง
- ลำดับการแวะพัก
- การจัดส่งที่กำหนด
- เมตริกรวม
อ่านรายละเอียดเพิ่มเติมเกี่ยวกับการสร้างคำขอได้ที่สร้างข้อความคำขอ
และการตีความการตอบกลับได้ที่ตีความการตอบกลับ
แหล่งข้อมูล
ตารางต่อไปนี้สรุปทรัพยากรที่มีผ่าน Route Optimization API พร้อมกับข้อมูลที่ API ส่งคืน
แหล่งข้อมูล
|
คำอธิบายและข้อมูลที่แสดง
|
รูปแบบการตอบกลับ
|
optimizeTours
|
วิธีนี้จะแสดงเส้นทางที่เพิ่มประสิทธิภาพพร้อมรายละเอียดการเข้าชมและเมตริก
|
JSON หรือ gRPC proto
|
batchOptimizeTours
|
เมธอดนี้จะแสดงชื่อทรัพยากรของการดำเนินการที่ใช้เวลานาน ซึ่งจะระบุเมื่อการประมวลผลเสร็จสมบูรณ์
|
JSON หรือ gRPC proto
|
วิธีใช้ Route Optimization API
ไลบรารีของไคลเอ็นต์ที่พร้อมใช้งาน
ดูรายการไลบรารีของไคลเอ็นต์ที่พร้อมใช้งานสำหรับ Route Optimization API ได้ที่
ไลบรารีของไคลเอ็นต์
ขั้นตอนถัดไป
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-10 UTC
[null,null,["อัปเดตล่าสุด 2025-08-10 UTC"],[[["\u003cp\u003eRoute Optimization API leverages Google Maps data and custom parameters to generate efficient routes for fleets, considering factors like time, cost, and vehicle capacity.\u003c/p\u003e\n"],["\u003cp\u003eBusinesses like logistics companies, on-demand delivery services, and field service providers can use the API to automate dispatch, optimize delivery routes, and improve overall operational efficiency.\u003c/p\u003e\n"],["\u003cp\u003eThe API offers synchronous and asynchronous options for route calculation and provides detailed route plans with assigned tasks, vehicle routes, and performance metrics.\u003c/p\u003e\n"],["\u003cp\u003eUsers can define objectives such as travel efficiency, on-time arrival, and load balancing, along with constraints like driver work hours and vehicle capacity for tailored optimization.\u003c/p\u003e\n"],["\u003cp\u003eTo begin, set up a Google Cloud project, construct a basic request, and explore advanced scenarios to create customized route optimization solutions.\u003c/p\u003e\n"]]],["The Route Optimization API optimizes routes for single or multiple vehicles, enhancing operational efficiency. Users define business objectives (e.g., travel efficiency, on-time arrival) and constraints (e.g., driver hours, vehicle capacity) to guide the optimization. The API accepts shipment and vehicle details, such as locations, time windows, and capacity. It returns a detailed route plan with stop sequences and assigned shipments via JSON or gRPC. Users can construct requests and interpret responses using provided guidelines and resources.\n"],null,["# What is the Route Optimization API\n\n**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\nRoute Optimization is a Google Maps Platform API that generates optimized route\nplans for single or multiple vehicles and their stops.\n\nWhy use the Route Optimization API\n----------------------------------\n\nImprove the operational efficiency of your transportation fleet with the help of\nroute plans. Adjust your routes for cost, time constraints, customer needs, and\nany other business objective. For example:\n\n- A **logistics company** can save time and resources by scheduling next-day shipments while optimizing the deliveries for time efficiency, cost saving, on-time delivery, and driver and end customer satisfaction.\n- An **on-demand food delivery** company can make their dispatch process quicker and more effective by choosing the best active driver to pick up new orders and inserting them in their existing routes.\n- A **field service provider** can improve their efficiency and customer satisfaction by assigning providers to appointments and finding the optimal stop sequence for more than one appointment, all while re-optimizing routes when challenges come up.\n\nWhat you can do with the Route Optimization API\n-----------------------------------------------\n\nUse Route Optimization API to optimize your fleet's routes and tasks\nassignments based on your own *objectives* and\n*constraints*.\n\n- **Objectives:** Your business goals.\n- **Constraints:** The limitations of your physical assets.\n\n| Objectives || Constraints ||\n|-----------------------|--------------------------------------------------------------------------------------|------------------------------------|---------------------------------------------------------------------------------------------------|\n| **Travel efficiency** | Optimize basic travel routes using parameters like distance and time-to-destination. | **Drivers work hours** | Assign routes to drivers based on their work hours and breaks. |\n| **On-time arrival** | Prioritize a pickup, delivery, or service to arrive before a specific time. | **Vehicle capacity** | Assign a vehicle to a task based on the amount of load it can carry. |\n| **Vehicle use cost** | Minimize the number of vehicles required to perform a task. | **Time windows** | Have a shipment or task arrive in a specific time slot. |\n| **Load balancing** | Fairly distribute tasks across a fleet of vehicles and personnel. | **Dependencies and compatibility** | Optimize your fleet routes based on your types of vehicle, task sequence, or shipment conditions. |\n\nHow the Route Optimization API works\n------------------------------------\n\nThe Route Optimization API can be accessed using [REST](/maps/documentation/route-optimization/reference/rest/v1/operations), [gRPC](/maps/documentation/route-optimization/reference/rpc), and\n[client libraries](/maps/documentation/route-optimization/client-libraries).\n\n### Request body\n\nThe request body accepts information about your shipments and the vehicles\navailable to deliver them. This includes details such as:\n\n- Pickup and delivery locations\n- Time windows\n- Shipment size and weight\n- Vehicle capacity\n\n### Response body\n\nThe response body provides a detailed route plan which includes:\n\n- Sequence of stops\n- Assigned shipments\n- Overall metrics\n\nRead more details about constructing a request in [Construct a Request\nMessage](/maps/documentation/route-optimization/construct-request)\nand interpreting a response in [Interpret the\nResponse](/maps/documentation/route-optimization/interpret-response).\n\n### Resources\n\nThe following table summarizes the resources available through the\nRoute Optimization API along with the data it returns.\n\n| **Data resources** | **Description and data returned** | **Return format** |\n|----------------------|-----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `optimizeTours` | This method returns an optimized route, with details of the visits and metrics. | [JSON](/maps/documentation/route-optimization/reference/rest/v1/projects/optimizeTours) or [gRPC proto](/maps/documentation/route-optimization/reference/rpc/google.maps.routeoptimization.v1#google.maps.routeoptimization.v1.RouteOptimization.OptimizeTours) |\n| `batchOptimizeTours` | This method returns the resource name of a Long Running Operation, which indicates when processing is complete. | [JSON](/maps/documentation/route-optimization/reference/rest/v1/projects/batchOptimizeTours) or [gRPC proto](/maps/documentation/route-optimization/reference/rpc/google.maps.routeoptimization.v1#google.maps.routeoptimization.v1.RouteOptimization.BatchOptimizeTours) |\n\nHow to use the Route Optimization API\n-------------------------------------\n\n|---|----------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | **Get set up** | Start with [Set up your Google Cloud project](/maps/documentation/route-optimization/cloud-setup) and complete the setup instructions that follow. |\n| 2 | **Run a basic request and receive a response** | After setup, start with sending a basic request and get the response, following [Construct a Request](/maps/documentation/route-optimization/construct-request) and [Interpret the Response](/maps/documentation/route-optimization/interpret-response). |\n| 3 | **Try a more advanced scenario and start creating your own request** | Explore example scenarios starting with [Pickup and Delivery Stop Order Optimization](/maps/documentation/route-optimization/pickup-delivery-order-optimization) and start building requests that match your use cases. |\n\n### Available client libraries\n\nFor a list of the available client libraries for Route Optimization API, see\n[Client Libraries](/maps/documentation/route-optimization/client-libraries).\n\nWhat's next\n-----------\n\n- **Start using the Route Optimization API** : Go to [Run a Basic Request](/maps/documentation/route-optimization/construct-request).\n- **Understand billing** : [Usage and Billing](/maps/documentation/route-optimization/usage-and-billing)\n- **See sample code and libraries** : [Client Libraries](/maps/documentation/route-optimization/client-libraries) and [Open Source](https://github.com/googleapis/google-cloud-java/tree/main/java-maps-routeoptimization).\n- **Follow best practices** : [Best Practices Using Route Optimization API Web\n Services](/maps/documentation/route-optimization/web-service-best-practices)"]]