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)
路线或解决方案的总行程时长。 该时长以秒为单位,最多包含九个小数位,以“s ”结尾。示例:"3.5s" 。
|
waitDuration |
string (Duration format)
路线或解决方案的总等待时长。 该时长以秒为单位,最多包含九个小数位,以“s ”结尾。示例:"3.5s" 。
|
delayDuration |
string (Duration format)
路线或方案的总延迟时长。 该时长以秒为单位,最多包含九个小数位,以“s ”结尾。示例:"3.5s" 。
|
breakDuration |
string (Duration format)
路线或方案的总休息时长。 该时长以秒为单位,最多包含九个小数位,以“s ”结尾。示例:"3.5s" 。
|
visitDuration |
string (Duration format)
某条路线或某个解决方案的总访问时长。 该时长以秒为单位,最多包含九个小数位,以“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]
该时长以秒为单位,最多包含九个小数位,以“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 的总和。 实验性:此字段的行为或存在性未来可能会发生变化。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):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. |"]]