Google Maps Route Optimization V1 Client - Class Objective (0.6.0)

Reference documentation and code samples for the Google Maps Route Optimization V1 Client class Objective.

Objectives replace the cost model completely, and are therefore incompatible with pre-existing costs. Each objective maps to a number of pre-defined costs for, e.g., vehicles, shipments or transition attributes.

Experimental: See https://developers.google.com/maps/tt/route-optimization/experimental/objectives/make-request for more details.

Generated from protobuf message google.maps.routeoptimization.v1.ShipmentModel.Objective

Namespace

Google \ Maps \ RouteOptimization \ V1 \ ShipmentModel

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ type int

The type of the objective.

↳ weight float

How much this objective should count relatively to the others. This can be any non-negative number, weights do not have to sum to 1. Weights default to 1.0.

getType

The type of the objective.

Returns
Type Description
int

hasType

clearType

setType

The type of the objective.

Parameter
Name Description
var int
Returns
Type Description
$this

getWeight

How much this objective should count relatively to the others. This can be any non-negative number, weights do not have to sum to 1. Weights default to 1.0.

Returns
Type Description
float

hasWeight

clearWeight

setWeight

How much this objective should count relatively to the others. This can be any non-negative number, weights do not have to sum to 1. Weights default to 1.0.

Parameter
Name Description
var float
Returns
Type Description
$this