# Google Maps Route Optimization V1 Client - Class AggregatedMetrics (0.6.2)

0.6.2 (latest) 0.6.1 0.5.1 0.4.1 0.3.3 0.2.0 0.1.0 Reference documentation and code samples for the Google Maps Route Optimization V1 Client class AggregatedMetrics.

Aggregated metrics for
[ShipmentRoute](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentRoute) (resp. for
[OptimizeToursResponse](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursResponse)
over all
[Transition](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentRoute.Transition)
and/or [Visit](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentRoute.Visit) (resp.

over all [ShipmentRoute](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentRoute))
elements.

Generated from protobuf message `google.maps.routeoptimization.v1.AggregatedMetrics`

## Namespace

Google \\ Maps \\ RouteOptimization \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ performed_shipment_count` | `int` Number of shipments performed. Note that a pickup and delivery pair only counts once. |
| `↳ performed_mandatory_shipment_count` | `int` Number of mandatory shipments performed. Experimental: This field's behavior or existence may change in future. |
| `↳ performed_shipment_penalty_cost_sum` | `float` The sum of the [Shipment.penalty_cost](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.Shipment#_Google_Maps_RouteOptimization_V1_Shipment__getPenaltyCost__) of the performed shipments. Experimental: This field's behavior or existence may change in future. |
| `↳ travel_duration` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Total travel duration for a route or a solution. |
| `↳ wait_duration` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Total wait duration for a route or a solution. |
| `↳ delay_duration` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Total delay duration for a route or a solution. |
| `↳ break_duration` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Total break duration for a route or a solution. |
| `↳ visit_duration` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Total visit duration for a route or a solution. |
| `↳ total_duration` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` The total duration should be equal to the sum of all durations above. For routes, it also corresponds to: `<xref uid="\Google\Maps\RouteOptimization\V1\ShipmentRoute::getVehicleEndTime()">ShipmentRoute.vehicle_end_time</xref> - <xref uid="\Google\Maps\RouteOptimization\V1\ShipmentRoute::getVehicleStartTime()">ShipmentRoute.vehicle_start_time</xref>` |
| `↳ travel_distance_meters` | `float` Total travel distance for a route or a solution. |
| `↳ max_loads` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` 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](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentRoute.Transition#_Google_Maps_RouteOptimization_V1_ShipmentRoute_Transition__getVehicleLoads__) (resp. [ShipmentRoute.metrics.max_loads](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.AggregatedMetrics#_Google_Maps_RouteOptimization_V1_AggregatedMetrics__getMaxLoads__). |

### getPerformedShipmentCount

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setPerformedShipmentCount

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPerformedMandatoryShipmentCount

Number of mandatory shipments performed.

Experimental: This field's behavior or existence may change in future.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasPerformedMandatoryShipmentCount

### clearPerformedMandatoryShipmentCount

### setPerformedMandatoryShipmentCount

Number of mandatory shipments performed.

Experimental: This field's behavior or existence may change in future.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPerformedShipmentPenaltyCostSum

The sum of the
[Shipment.penalty_cost](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.Shipment#_Google_Maps_RouteOptimization_V1_Shipment__getPenaltyCost__)
of the performed shipments.

Experimental: This field's behavior or existence may change in future.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### hasPerformedShipmentPenaltyCostSum

### clearPerformedShipmentPenaltyCostSum

### setPerformedShipmentPenaltyCostSum

The sum of the
[Shipment.penalty_cost](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.Shipment#_Google_Maps_RouteOptimization_V1_Shipment__getPenaltyCost__)
of the performed shipments.

Experimental: This field's behavior or existence may change in future.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTravelDuration

Total travel duration for a route or a solution.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasTravelDuration

### clearTravelDuration

### setTravelDuration

Total travel duration for a route or a solution.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getWaitDuration

Total wait duration for a route or a solution.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasWaitDuration

### clearWaitDuration

### setWaitDuration

Total wait duration for a route or a solution.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDelayDuration

Total delay duration for a route or a solution.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasDelayDuration

### clearDelayDuration

### setDelayDuration

Total delay duration for a route or a solution.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBreakDuration

Total break duration for a route or a solution.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasBreakDuration

### clearBreakDuration

### setBreakDuration

Total break duration for a route or a solution.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVisitDuration

Total visit duration for a route or a solution.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasVisitDuration

### clearVisitDuration

### setVisitDuration

Total visit duration for a route or a solution.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTotalDuration

The total duration should be equal to the sum of all durations above.

For routes, it also corresponds to:

    <xref uid="\Google\Maps\RouteOptimization\V1\ShipmentRoute::getVehicleEndTime()">ShipmentRoute.vehicle_end_time</xref>
    -
    <xref uid="\Google\Maps\RouteOptimization\V1\ShipmentRoute::getVehicleStartTime()">ShipmentRoute.vehicle_start_time</xref>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasTotalDuration

### clearTotalDuration

### setTotalDuration

The total duration should be equal to the sum of all durations above.

For routes, it also corresponds to:

    <xref uid="\Google\Maps\RouteOptimization\V1\ShipmentRoute::getVehicleEndTime()">ShipmentRoute.vehicle_end_time</xref>
    -
    <xref uid="\Google\Maps\RouteOptimization\V1\ShipmentRoute::getVehicleStartTime()">ShipmentRoute.vehicle_start_time</xref>

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTravelDistanceMeters

Total travel distance for a route or a solution.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setTravelDistanceMeters

Total travel distance for a route or a solution.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMaxLoads

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](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentRoute.Transition#_Google_Maps_RouteOptimization_V1_ShipmentRoute_Transition__getVehicleLoads__)
(resp.

[ShipmentRoute.metrics.max_loads](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.AggregatedMetrics#_Google_Maps_RouteOptimization_V1_AggregatedMetrics__getMaxLoads__).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setMaxLoads

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](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentRoute.Transition#_Google_Maps_RouteOptimization_V1_ShipmentRoute_Transition__getVehicleLoads__)
(resp.

[ShipmentRoute.metrics.max_loads](https://docs.cloud.google.com/php/docs/reference/maps-routeoptimization/latest/V1.AggregatedMetrics#_Google_Maps_RouteOptimization_V1_AggregatedMetrics__getMaxLoads__).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |