Google Cloud Optimization V1 Client - Class LoadLimit (0.3.4)

Reference documentation and code samples for the Google Cloud Optimization V1 Client class LoadLimit.

Defines a load limit applying to a vehicle, e.g. "this truck may only carry up to 3500 kg". See load_limits.

Generated from protobuf message google.cloud.optimization.v1.Vehicle.LoadLimit

Namespace

Google \ Cloud \ Optimization \ V1 \ Vehicle

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ max_load int|string

The maximum acceptable amount of load.

↳ soft_max_load int|string

A soft limit of the load. See cost_per_unit_above_soft_max.

↳ cost_per_unit_above_soft_max float

If the load ever exceeds soft_max_load along this vehicle's route, the following cost penalty applies (only once per vehicle): (load - soft_max_load) * cost_per_unit_above_soft_max. All costs add up and must be in the same unit as Shipment.penalty_cost.

↳ start_load_interval Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval

The acceptable load interval of the vehicle at the start of the route.

↳ end_load_interval Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval

The acceptable load interval of the vehicle at the end of the route.

getMaxLoad

The maximum acceptable amount of load.

Returns
TypeDescription
int|string

hasMaxLoad

clearMaxLoad

setMaxLoad

The maximum acceptable amount of load.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getSoftMaxLoad

A soft limit of the load. See cost_per_unit_above_soft_max.

Returns
TypeDescription
int|string

setSoftMaxLoad

A soft limit of the load. See cost_per_unit_above_soft_max.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getCostPerUnitAboveSoftMax

If the load ever exceeds soft_max_load along this vehicle's route, the following cost penalty applies (only once per vehicle): (load - soft_max_load)

Returns
TypeDescription
float

setCostPerUnitAboveSoftMax

If the load ever exceeds soft_max_load along this vehicle's route, the following cost penalty applies (only once per vehicle): (load - soft_max_load)

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getStartLoadInterval

The acceptable load interval of the vehicle at the start of the route.

Returns
TypeDescription
Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval|null

hasStartLoadInterval

clearStartLoadInterval

setStartLoadInterval

The acceptable load interval of the vehicle at the start of the route.

Parameter
NameDescription
var Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval
Returns
TypeDescription
$this

getEndLoadInterval

The acceptable load interval of the vehicle at the end of the route.

Returns
TypeDescription
Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval|null

hasEndLoadInterval

clearEndLoadInterval

setEndLoadInterval

The acceptable load interval of the vehicle at the end of the route.

Parameter
NameDescription
var Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval
Returns
TypeDescription
$this