AggregatedMetrics
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
JSON 表示法 |
{
"performedShipmentCount": integer,
"travelDuration": string,
"waitDuration": string,
"delayDuration": string,
"breakDuration": string,
"visitDuration": string,
"totalDuration": string,
"travelDistanceMeters": number,
"maxLoads": {
string: {
object (VehicleLoad )
},
...
},
"performedMandatoryShipmentCount": integer,
"performedShipmentPenaltyCostSum": number
} |
欄位 |
performedShipmentCount |
integer
完成的出貨數量。請注意,每組接送和取貨訂單只會計入一次。
|
travelDuration |
string (Duration format)
路線或解決方案的總行程時間。 以秒為單位的時間長度,最多可有 9 個小數位數,結尾為「s 」,例如:"3.5s" 。
|
waitDuration |
string (Duration format)
路線或解決方案的總等候時間長度。 以秒為單位的時間長度,最多可有 9 個小數位數,結尾為「s 」,例如:"3.5s" 。
|
delayDuration |
string (Duration format)
路線或解決方案的總延遲時間長度。 以秒為單位的時間長度,最多可有 9 個小數位數,結尾為「s 」,例如:"3.5s" 。
|
breakDuration |
string (Duration format)
路線或解決方案的總休息時間長度。 以秒為單位的時間長度,最多可有 9 個小數位數,結尾為「s 」,例如:"3.5s" 。
|
visitDuration |
string (Duration format)
路線或解決方案的總造訪時間長度。 以秒為單位的時間長度,最多可有 9 個小數位數,結尾為「s 」,例如:"3.5s" 。
|
totalDuration |
string (Duration format)
總時間應等於上述所有時間長度的總和。對於路線,也對應到:
[ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] - [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]
以秒為單位的時間長度,最多可有 9 個小數位數,結尾為「s 」,例如:"3.5s" 。
|
travelDistanceMeters |
number
路線或解決方案的總行程距離。
|
maxLoads |
map (key: string, value: object (VehicleLoad ))
在整個路徑 (或解決方案) 中,針對該路徑 (或解決方案) 的每個數量,達成的最大負載量,計算方式為所有 Transition.vehicle_loads (或 ShipmentRoute.metrics.max_loads 。
|
performedMandatoryShipmentCount |
integer
執行的強制出貨數量。 實驗性功能:這個欄位的行為或存在情形可能會在日後變更。
|
performedShipmentPenaltyCostSum |
number
已執行出貨的 Shipment.penalty_cost 總和。 實驗性功能:這個欄位的行為或存在情形可能會在日後變更。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間:2025-08-31 (世界標準時間)。"],[[["\u003cp\u003eThis document outlines the aggregated metrics for ShipmentRoute and OptimizeToursResponse within Google Maps Route Optimization.\u003c/p\u003e\n"],["\u003cp\u003eMetrics include shipment count, travel/wait/delay/break/visit/total durations, travel distance, and maximum loads.\u003c/p\u003e\n"],["\u003cp\u003eAll durations are represented in seconds with up to nine fractional digits using the Duration format.\u003c/p\u003e\n"],["\u003cp\u003eMaximum loads are provided as a map, keyed by quantity and valued by the corresponding VehicleLoad object.\u003c/p\u003e\n"],["\u003cp\u003eThese metrics offer insights into the overall performance and resource utilization of routes and solutions.\u003c/p\u003e\n"]]],[],null,["# AggregatedMetrics\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nAggregated metrics for [ShipmentRoute](/maps/documentation/route-optimization/reference/rest/v1/ShipmentRoute) (resp. for [OptimizeToursResponse](/maps/documentation/route-optimization/reference/rest/v1/OptimizeToursResponse) over all [Transition](/maps/documentation/route-optimization/reference/rest/v1/ShipmentRoute#Transition) and/or [Visit](/maps/documentation/route-optimization/reference/rest/v1/ShipmentRoute#Visit) (resp. over all [ShipmentRoute](/maps/documentation/route-optimization/reference/rest/v1/ShipmentRoute)) elements.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"performedShipmentCount\": integer, \"travelDuration\": string, \"waitDuration\": string, \"delayDuration\": string, \"breakDuration\": string, \"visitDuration\": string, \"totalDuration\": string, \"travelDistanceMeters\": number, \"maxLoads\": { string: { object (/maps/documentation/route-optimization/reference/rest/v1/VehicleLoad) }, ... }, \"performedMandatoryShipmentCount\": integer, \"performedShipmentPenaltyCostSum\": number } ``` |\n\n| Fields ||\n|-----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `performedShipmentCount` | `integer` Number of shipments performed. Note that a pickup and delivery pair only counts once. |\n| `travelDuration` | `string (`[Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration)` format)` Total travel duration for a route or a solution. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `\"3.5s\"`. |\n| `waitDuration` | `string (`[Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration)` format)` Total wait duration for a route or a solution. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `\"3.5s\"`. |\n| `delayDuration` | `string (`[Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration)` format)` Total delay duration for a route or a solution. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `\"3.5s\"`. |\n| `breakDuration` | `string (`[Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration)` format)` Total break duration for a route or a solution. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `\"3.5s\"`. |\n| `visitDuration` | `string (`[Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration)` format)` Total visit duration for a route or a solution. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `\"3.5s\"`. |\n| `totalDuration` | `string (`[Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration)` format)` The total duration should be equal to the sum of all durations above. For routes, it also corresponds to: [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] - [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `\"3.5s\"`. |\n| `travelDistanceMeters` | `number` Total travel distance for a route or a solution. |\n| `maxLoads` | `map (key: string, value: object (`[VehicleLoad](/maps/documentation/route-optimization/reference/rest/v1/VehicleLoad)`))` Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all [Transition.vehicle_loads](/maps/documentation/route-optimization/reference/rest/v1/ShipmentRoute#Transition.FIELDS.vehicle_loads) (resp. [ShipmentRoute.metrics.max_loads](/maps/documentation/route-optimization/reference/rest/v1/AggregatedMetrics#FIELDS.max_loads). |\n| `performedMandatoryShipmentCount` | `integer` Number of mandatory shipments performed. Experimental: This field's behavior or existence may change in future. |\n| `performedShipmentPenaltyCostSum` | `number` The sum of the [Shipment.penalty_cost](/maps/documentation/route-optimization/reference/rest/v1/ShipmentModel#Shipment.FIELDS.penalty_cost) of the performed shipments. Experimental: This field's behavior or existence may change in future. |"]]