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>
Maximum load achieved over the entire route (resp. solution), for each of
the quantities on this route (resp. solution), computed as the maximum over
allTransition.vehicle_loads(resp.
Maximum load achieved over the entire route (resp. solution), for each of
the quantities on this route (resp. solution), computed as the maximum over
allTransition.vehicle_loads(resp.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Maps Route Optimization V1 Client - Class AggregatedMetrics (0.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.4.1 (latest)](/php/docs/reference/maps-routeoptimization/latest/V1.AggregatedMetrics)\n- [0.4.0](/php/docs/reference/maps-routeoptimization/0.4.0/V1.AggregatedMetrics)\n- [0.3.3](/php/docs/reference/maps-routeoptimization/0.3.3/V1.AggregatedMetrics)\n- [0.2.0](/php/docs/reference/maps-routeoptimization/0.2.0/V1.AggregatedMetrics)\n- [0.1.0](/php/docs/reference/maps-routeoptimization/0.1.0/V1.AggregatedMetrics) \nReference documentation and code samples for the Google Maps Route Optimization V1 Client class AggregatedMetrics.\n\nAggregated metrics for\n[ShipmentRoute](/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentRoute) (resp. for\n[OptimizeToursResponse](/php/docs/reference/maps-routeoptimization/latest/V1.OptimizeToursResponse)\nover all\n[Transition](/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentRoute.Transition)\nand/or [Visit](/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentRoute.Visit) (resp.\n\nover all [ShipmentRoute](/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentRoute))\nelements.\n\nGenerated from protobuf message `google.maps.routeoptimization.v1.AggregatedMetrics`\n\nNamespace\n---------\n\nGoogle \\\\ Maps \\\\ RouteOptimization \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getPerformedShipmentCount\n\nNumber of shipments performed. Note that a pickup and delivery pair only\ncounts once.\n\n### setPerformedShipmentCount\n\nNumber of shipments performed. Note that a pickup and delivery pair only\ncounts once.\n\n### getTravelDuration\n\nTotal travel duration for a route or a solution.\n\n### hasTravelDuration\n\n### clearTravelDuration\n\n### setTravelDuration\n\nTotal travel duration for a route or a solution.\n\n### getWaitDuration\n\nTotal wait duration for a route or a solution.\n\n### hasWaitDuration\n\n### clearWaitDuration\n\n### setWaitDuration\n\nTotal wait duration for a route or a solution.\n\n### getDelayDuration\n\nTotal delay duration for a route or a solution.\n\n### hasDelayDuration\n\n### clearDelayDuration\n\n### setDelayDuration\n\nTotal delay duration for a route or a solution.\n\n### getBreakDuration\n\nTotal break duration for a route or a solution.\n\n### hasBreakDuration\n\n### clearBreakDuration\n\n### setBreakDuration\n\nTotal break duration for a route or a solution.\n\n### getVisitDuration\n\nTotal visit duration for a route or a solution.\n\n### hasVisitDuration\n\n### clearVisitDuration\n\n### setVisitDuration\n\nTotal visit duration for a route or a solution.\n\n### getTotalDuration\n\nThe total duration should be equal to the sum of all durations above.\n\nFor routes, it also corresponds to: \n\n \u003cxref uid=\"\\Google\\Maps\\RouteOptimization\\V1\\ShipmentRoute::getVehicleEndTime()\"\u003eShipmentRoute.vehicle_end_time\u003c/xref\u003e\n -\n \u003cxref uid=\"\\Google\\Maps\\RouteOptimization\\V1\\ShipmentRoute::getVehicleStartTime()\"\u003eShipmentRoute.vehicle_start_time\u003c/xref\u003e\n\n### hasTotalDuration\n\n### clearTotalDuration\n\n### setTotalDuration\n\nThe total duration should be equal to the sum of all durations above.\n\nFor routes, it also corresponds to: \n\n \u003cxref uid=\"\\Google\\Maps\\RouteOptimization\\V1\\ShipmentRoute::getVehicleEndTime()\"\u003eShipmentRoute.vehicle_end_time\u003c/xref\u003e\n -\n \u003cxref uid=\"\\Google\\Maps\\RouteOptimization\\V1\\ShipmentRoute::getVehicleStartTime()\"\u003eShipmentRoute.vehicle_start_time\u003c/xref\u003e\n\n### getTravelDistanceMeters\n\nTotal travel distance for a route or a solution.\n\n### setTravelDistanceMeters\n\nTotal travel distance for a route or a solution.\n\n### getMaxLoads\n\nMaximum load achieved over the entire route (resp. solution), for each of\nthe quantities on this route (resp. solution), computed as the maximum over\nall\n[Transition.vehicle_loads](/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentRoute.Transition#_Google_Maps_RouteOptimization_V1_ShipmentRoute_Transition__getVehicleLoads__)\n(resp.\n\n[ShipmentRoute.metrics.max_loads](/php/docs/reference/maps-routeoptimization/latest/V1.AggregatedMetrics#_Google_Maps_RouteOptimization_V1_AggregatedMetrics__getMaxLoads__).\n\n### setMaxLoads\n\nMaximum load achieved over the entire route (resp. solution), for each of\nthe quantities on this route (resp. solution), computed as the maximum over\nall\n[Transition.vehicle_loads](/php/docs/reference/maps-routeoptimization/latest/V1.ShipmentRoute.Transition#_Google_Maps_RouteOptimization_V1_ShipmentRoute_Transition__getVehicleLoads__)\n(resp.\n\n[ShipmentRoute.metrics.max_loads](/php/docs/reference/maps-routeoptimization/latest/V1.AggregatedMetrics#_Google_Maps_RouteOptimization_V1_AggregatedMetrics__getMaxLoads__)."]]