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 Cloud Optimization V1 Client - Class AggregatedMetrics (1.0.5)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.5 (latest)](/php/docs/reference/cloud-optimization/latest/V1.AggregatedMetrics)\n- [1.0.4](/php/docs/reference/cloud-optimization/1.0.4/V1.AggregatedMetrics)\n- [0.7.0](/php/docs/reference/cloud-optimization/0.7.0/V1.AggregatedMetrics)\n- [0.6.5](/php/docs/reference/cloud-optimization/0.6.5/V1.AggregatedMetrics)\n- [0.5.1](/php/docs/reference/cloud-optimization/0.5.1/V1.AggregatedMetrics)\n- [0.4.0](/php/docs/reference/cloud-optimization/0.4.0/V1.AggregatedMetrics)\n- [0.3.4](/php/docs/reference/cloud-optimization/0.3.4/V1.AggregatedMetrics)\n- [0.2.0](/php/docs/reference/cloud-optimization/0.2.0/V1.AggregatedMetrics)\n- [0.1.9](/php/docs/reference/cloud-optimization/0.1.9/V1.AggregatedMetrics) \nReference documentation and code samples for the Google Cloud Optimization V1 Client class AggregatedMetrics.\n\nAggregated metrics for\n[ShipmentRoute](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute) (resp. for\n[OptimizeToursResponse](/php/docs/reference/cloud-optimization/latest/V1.OptimizeToursResponse)\nover all [Transition](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute.Transition)\nand/or [Visit](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute.Visit) (resp. over\nall [ShipmentRoute](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute)) elements.\n\nGenerated from protobuf message `google.cloud.optimization.v1.AggregatedMetrics`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Optimization \\\\ 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[ShipmentRoute.vehicle_end_time](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute#_Google_Cloud_Optimization_V1_ShipmentRoute__getVehicleEndTime__)\n`-`\n[ShipmentRoute.vehicle_start_time](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute#_Google_Cloud_Optimization_V1_ShipmentRoute__getVehicleStartTime__)\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[ShipmentRoute.vehicle_end_time](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute#_Google_Cloud_Optimization_V1_ShipmentRoute__getVehicleEndTime__)\n`-`\n[ShipmentRoute.vehicle_start_time](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute#_Google_Cloud_Optimization_V1_ShipmentRoute__getVehicleStartTime__)\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/cloud-optimization/latest/V1.ShipmentRoute.Transition#_Google_Cloud_Optimization_V1_ShipmentRoute_Transition__getVehicleLoads__)\n(resp.\n\n[ShipmentRoute.metrics.max_loads](/php/docs/reference/cloud-optimization/latest/V1.AggregatedMetrics#_Google_Cloud_Optimization_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/cloud-optimization/latest/V1.ShipmentRoute.Transition#_Google_Cloud_Optimization_V1_ShipmentRoute_Transition__getVehicleLoads__)\n(resp.\n\n[ShipmentRoute.metrics.max_loads](/php/docs/reference/cloud-optimization/latest/V1.AggregatedMetrics#_Google_Cloud_Optimization_V1_AggregatedMetrics__getMaxLoads__).\n\n### getCosts\n\nDeprecated: Use\n[ShipmentRoute.route_costs](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute#_Google_Cloud_Optimization_V1_ShipmentRoute__getRouteCosts__)\nand\n[OptimizeToursResponse.Metrics.costs](/php/docs/reference/cloud-optimization/latest/V1.OptimizeToursResponse.Metrics#_Google_Cloud_Optimization_V1_OptimizeToursResponse_Metrics__getCosts__)\ninstead.\n\n### setCosts\n\nDeprecated: Use\n[ShipmentRoute.route_costs](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute#_Google_Cloud_Optimization_V1_ShipmentRoute__getRouteCosts__)\nand\n[OptimizeToursResponse.Metrics.costs](/php/docs/reference/cloud-optimization/latest/V1.OptimizeToursResponse.Metrics#_Google_Cloud_Optimization_V1_OptimizeToursResponse_Metrics__getCosts__)\ninstead.\n\n### getTotalCost\n\nDeprecated: Use\n[ShipmentRoute.route_total_cost](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute#_Google_Cloud_Optimization_V1_ShipmentRoute__getRouteTotalCost__)\nand\n[OptimizeToursResponse.Metrics.total_cost](/php/docs/reference/cloud-optimization/latest/V1.OptimizeToursResponse.Metrics#_Google_Cloud_Optimization_V1_OptimizeToursResponse_Metrics__getTotalCost__)\ninstead.\n\n### setTotalCost\n\nDeprecated: Use\n[ShipmentRoute.route_total_cost](/php/docs/reference/cloud-optimization/latest/V1.ShipmentRoute#_Google_Cloud_Optimization_V1_ShipmentRoute__getRouteTotalCost__)\nand\n[OptimizeToursResponse.Metrics.total_cost](/php/docs/reference/cloud-optimization/latest/V1.OptimizeToursResponse.Metrics#_Google_Cloud_Optimization_V1_OptimizeToursResponse_Metrics__getTotalCost__)\ninstead."]]