Google Maps Route Optimization V1 Client - Class OptimizeToursResponse (0.2.0)

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

Response after solving a tour optimization problem containing the routes followed by each vehicle, the shipments which have been skipped and the overall cost of the solution.

Generated from protobuf message google.maps.routeoptimization.v1.OptimizeToursResponse

Namespace

Google \ Maps \ RouteOptimization \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ routes array<Google\Maps\RouteOptimization\V1\ShipmentRoute>

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

↳ request_label string

Copy of the OptimizeToursRequest.label, if a label was specified in the request.

↳ skipped_shipments array<Google\Maps\RouteOptimization\V1\SkippedShipment>

The list of all shipments skipped.

↳ validation_errors array<Google\Maps\RouteOptimization\V1\OptimizeToursValidationError>

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message. Instead of errors, this will include warnings in the case solving_mode is DEFAULT_SOLVE.

↳ metrics Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics

Duration, distance and usage metrics for this solution.

getRoutes

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setRoutes

Routes computed for each vehicle; the i-th route corresponds to the i-th vehicle in the model.

Parameter
Name Description
var array<Google\Maps\RouteOptimization\V1\ShipmentRoute>
Returns
Type Description
$this

getRequestLabel

Copy of the OptimizeToursRequest.label, if a label was specified in the request.

Returns
Type Description
string

setRequestLabel

Copy of the OptimizeToursRequest.label, if a label was specified in the request.

Parameter
Name Description
var string
Returns
Type Description
$this

getSkippedShipments

The list of all shipments skipped.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setSkippedShipments

The list of all shipments skipped.

Parameter
Name Description
var array<Google\Maps\RouteOptimization\V1\SkippedShipment>
Returns
Type Description
$this

getValidationErrors

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message. Instead of errors, this will include warnings in the case solving_mode is DEFAULT_SOLVE.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setValidationErrors

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message. Instead of errors, this will include warnings in the case solving_mode is DEFAULT_SOLVE.

Parameter
Name Description
var array<Google\Maps\RouteOptimization\V1\OptimizeToursValidationError>
Returns
Type Description
$this

getMetrics

Duration, distance and usage metrics for this solution.

Returns
Type Description
Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics|null

hasMetrics

clearMetrics

setMetrics

Duration, distance and usage metrics for this solution.

Parameter
Name Description
var Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics
Returns
Type Description
$this