[[["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 LoadLimit (0.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.4.1 (latest)](/php/docs/reference/maps-routeoptimization/latest/V1.Vehicle.LoadLimit)\n- [0.4.0](/php/docs/reference/maps-routeoptimization/0.4.0/V1.Vehicle.LoadLimit)\n- [0.3.3](/php/docs/reference/maps-routeoptimization/0.3.3/V1.Vehicle.LoadLimit)\n- [0.2.0](/php/docs/reference/maps-routeoptimization/0.2.0/V1.Vehicle.LoadLimit)\n- [0.1.0](/php/docs/reference/maps-routeoptimization/0.1.0/V1.Vehicle.LoadLimit) \nReference documentation and code samples for the Google Maps Route Optimization V1 Client class LoadLimit.\n\nDefines a load limit applying to a vehicle, e.g. \"this truck may only\ncarry up to 3500 kg\". See\n[load_limits](/php/docs/reference/maps-routeoptimization/latest/V1.Vehicle#_Google_Maps_RouteOptimization_V1_Vehicle__getLoadLimits__).\n\nGenerated from protobuf message `google.maps.routeoptimization.v1.Vehicle.LoadLimit`\n\nNamespace\n---------\n\nGoogle \\\\ Maps \\\\ RouteOptimization \\\\ V1 \\\\ Vehicle\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getMaxLoad\n\nThe maximum acceptable amount of load.\n\n### hasMaxLoad\n\n### clearMaxLoad\n\n### setMaxLoad\n\nThe maximum acceptable amount of load.\n\n### getSoftMaxLoad\n\nA soft limit of the load. See\n[cost_per_unit_above_soft_max](/php/docs/reference/maps-routeoptimization/latest/V1.Vehicle.LoadLimit#_Google_Maps_RouteOptimization_V1_Vehicle_LoadLimit__getCostPerUnitAboveSoftMax__).\n\n### setSoftMaxLoad\n\nA soft limit of the load. See\n[cost_per_unit_above_soft_max](/php/docs/reference/maps-routeoptimization/latest/V1.Vehicle.LoadLimit#_Google_Maps_RouteOptimization_V1_Vehicle_LoadLimit__getCostPerUnitAboveSoftMax__).\n\n### getCostPerUnitAboveSoftMax\n\nIf the load ever exceeds\n[soft_max_load](/php/docs/reference/maps-routeoptimization/latest/V1.Vehicle.LoadLimit#_Google_Maps_RouteOptimization_V1_Vehicle_LoadLimit__getSoftMaxLoad__)\nalong this vehicle's route, the following cost penalty applies (only once\nper vehicle): (load -\n[soft_max_load](/php/docs/reference/maps-routeoptimization/latest/V1.Vehicle.LoadLimit#_Google_Maps_RouteOptimization_V1_Vehicle_LoadLimit__getSoftMaxLoad__))\n\n- [cost_per_unit_above_soft_max](/php/docs/reference/maps-routeoptimization/latest/V1.Vehicle.LoadLimit#_Google_Maps_RouteOptimization_V1_Vehicle_LoadLimit__getCostPerUnitAboveSoftMax__). All costs add up and must be in the same unit as [Shipment.penalty_cost](/php/docs/reference/maps-routeoptimization/latest/V1.Shipment#_Google_Maps_RouteOptimization_V1_Shipment__getPenaltyCost__).\n\n### setCostPerUnitAboveSoftMax\n\nIf the load ever exceeds\n[soft_max_load](/php/docs/reference/maps-routeoptimization/latest/V1.Vehicle.LoadLimit#_Google_Maps_RouteOptimization_V1_Vehicle_LoadLimit__getSoftMaxLoad__)\nalong this vehicle's route, the following cost penalty applies (only once\nper vehicle): (load -\n[soft_max_load](/php/docs/reference/maps-routeoptimization/latest/V1.Vehicle.LoadLimit#_Google_Maps_RouteOptimization_V1_Vehicle_LoadLimit__getSoftMaxLoad__))\n\n- [cost_per_unit_above_soft_max](/php/docs/reference/maps-routeoptimization/latest/V1.Vehicle.LoadLimit#_Google_Maps_RouteOptimization_V1_Vehicle_LoadLimit__getCostPerUnitAboveSoftMax__). All costs add up and must be in the same unit as [Shipment.penalty_cost](/php/docs/reference/maps-routeoptimization/latest/V1.Shipment#_Google_Maps_RouteOptimization_V1_Shipment__getPenaltyCost__).\n\n### getStartLoadInterval\n\nThe acceptable load interval of the vehicle at the start of the route.\n\n### hasStartLoadInterval\n\n### clearStartLoadInterval\n\n### setStartLoadInterval\n\nThe acceptable load interval of the vehicle at the start of the route.\n\n### getEndLoadInterval\n\nThe acceptable load interval of the vehicle at the end of the route.\n\n### hasEndLoadInterval\n\n### clearEndLoadInterval\n\n### setEndLoadInterval\n\nThe acceptable load interval of the vehicle at the end of the route."]]