AggregatedMetrics

  • This data represents aggregated metrics for ShipmentRoute or OptimizeToursResponse, calculated across all Transition and/or Visit elements or ShipmentRoute elements, respectively.

  • The metrics include the number of shipments performed (performedShipmentCount), total travel duration (travelDuration), total wait duration (waitDuration), total delay duration (delayDuration), total break duration (breakDuration), and total visit duration (visitDuration).

  • The totalDuration metric equals the sum of the other duration metrics and can also be calculated by subtracting the vehicle's start time from its end time, and all durations are formatted as strings with up to nine fractional digits, ending with 's'.

  • travelDistanceMeters shows the total travel distance for a route or solution, and maxLoads details the maximum load for each quantity on a route or solution, computed as the maximum over all vehicle loads.

  • The JSON format provides the schema in which these elements are represented.

Aggregated metrics for ShipmentRoute (resp. for OptimizeToursResponse over all Transition and/or Visit (resp. over all ShipmentRoute) elements.

JSON representation
{
  "performedShipmentCount": integer,
  "travelDuration": string,
  "waitDuration": string,
  "delayDuration": string,
  "breakDuration": string,
  "visitDuration": string,
  "totalDuration": string,
  "travelDistanceMeters": number,
  "maxLoads": {
    string: {
      object (VehicleLoad)
    },
    ...
  }
}
Fields
performedShipmentCount

integer

Number of shipments performed. Note that a pickup and delivery pair only counts once.

travelDuration

string (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".

waitDuration

string (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".

delayDuration

string (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".

breakDuration

string (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".

visitDuration

string (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".

totalDuration

string (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".

travelDistanceMeters

number

Total travel distance for a route or a solution.

maxLoads

map (key: string, value: object (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 (resp. ShipmentRoute.metrics.max_loads.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.