Google Cloud Optimization V1 Client - Class OptimizeToursResponse (0.5.1)

Reference documentation and code samples for the Google Cloud 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.cloud.optimization.v1.OptimizeToursResponse

Namespace

Google \ Cloud \ Optimization \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ routes array<Google\Cloud\Optimization\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\Cloud\Optimization\V1\SkippedShipment>

The list of all shipments skipped.

↳ validation_errors array<Google\Cloud\Optimization\V1\OptimizeToursValidationError>

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

↳ metrics Google\Cloud\Optimization\V1\OptimizeToursResponse\Metrics

Duration, distance and usage metrics for this solution.

↳ total_cost float

Deprecated: Use Metrics.total_cost instead. Total cost of the solution. This takes into account all costs: costs per per hour and travel hour, fixed vehicle costs, unperformed shipment penalty costs, global duration cost, etc.

getRoutes

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

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setRoutes

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

Parameter
NameDescription
var array<Google\Cloud\Optimization\V1\ShipmentRoute>
Returns
TypeDescription
$this

getRequestLabel

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

Returns
TypeDescription
string

setRequestLabel

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSkippedShipments

The list of all shipments skipped.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setSkippedShipments

The list of all shipments skipped.

Parameter
NameDescription
var array<Google\Cloud\Optimization\V1\SkippedShipment>
Returns
TypeDescription
$this

getValidationErrors

List of all the validation errors that we were able to detect independently. See the "MULTIPLE ERRORS" explanation for the OptimizeToursValidationError message.

Returns
TypeDescription
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.

Parameter
NameDescription
var array<Google\Cloud\Optimization\V1\OptimizeToursValidationError>
Returns
TypeDescription
$this

getMetrics

Duration, distance and usage metrics for this solution.

Returns
TypeDescription
Google\Cloud\Optimization\V1\OptimizeToursResponse\Metrics|null

hasMetrics

clearMetrics

setMetrics

Duration, distance and usage metrics for this solution.

Parameter
NameDescription
var Google\Cloud\Optimization\V1\OptimizeToursResponse\Metrics
Returns
TypeDescription
$this

getTotalCost

Deprecated: Use Metrics.total_cost instead. Total cost of the solution. This takes into account all costs: costs per per hour and travel hour, fixed vehicle costs, unperformed shipment penalty costs, global duration cost, etc.

Returns
TypeDescription
float

setTotalCost

Deprecated: Use Metrics.total_cost instead. Total cost of the solution. This takes into account all costs: costs per per hour and travel hour, fixed vehicle costs, unperformed shipment penalty costs, global duration cost, etc.

Parameter
NameDescription
var float
Returns
TypeDescription
$this