Google Cloud Optimization V1 Client - Class AggregatedMetrics (0.3.4)

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

Aggregated metrics for ShipmentRoute (resp. for OptimizeToursResponse over all Transition and/or Visit (resp. over all ShipmentRoute) elements.

Generated from protobuf message google.cloud.optimization.v1.AggregatedMetrics

Namespace

Google \ Cloud \ Optimization \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ performed_shipment_count int

Number of shipments performed. Note that a pickup and delivery pair only counts once.

↳ travel_duration Google\Protobuf\Duration

Total travel duration for a route or a solution.

↳ wait_duration Google\Protobuf\Duration

Total wait duration for a route or a solution.

↳ delay_duration Google\Protobuf\Duration

Total delay duration for a route or a solution.

↳ break_duration Google\Protobuf\Duration

Total break duration for a route or a solution.

↳ visit_duration Google\Protobuf\Duration

Total visit duration for a route or a solution.

↳ total_duration Google\Protobuf\Duration

The total duration should be equal to the sum of all durations above. For routes, it also corresponds to: ShipmentRoute.vehicle_end_time - ShipmentRoute.vehicle_start_time

↳ travel_distance_meters float

Total travel distance for a route or a solution.

↳ max_loads array|Google\Protobuf\Internal\MapField

Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp. ShipmentRoute.metrics.max_loads.

↳ costs array|Google\Protobuf\Internal\MapField

Deprecated: Use ShipmentRoute.route_costs and OptimizeToursResponse.Metrics.costs instead.

↳ total_cost float

Deprecated: Use ShipmentRoute.route_total_cost and OptimizeToursResponse.Metrics.total_cost instead.

getPerformedShipmentCount

Number of shipments performed. Note that a pickup and delivery pair only counts once.

Returns
TypeDescription
int

setPerformedShipmentCount

Number of shipments performed. Note that a pickup and delivery pair only counts once.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getTravelDuration

Total travel duration for a route or a solution.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasTravelDuration

clearTravelDuration

setTravelDuration

Total travel duration for a route or a solution.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getWaitDuration

Total wait duration for a route or a solution.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasWaitDuration

clearWaitDuration

setWaitDuration

Total wait duration for a route or a solution.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getDelayDuration

Total delay duration for a route or a solution.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasDelayDuration

clearDelayDuration

setDelayDuration

Total delay duration for a route or a solution.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getBreakDuration

Total break duration for a route or a solution.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasBreakDuration

clearBreakDuration

setBreakDuration

Total break duration for a route or a solution.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getVisitDuration

Total visit duration for a route or a solution.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasVisitDuration

clearVisitDuration

setVisitDuration

Total visit duration for a route or a solution.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getTotalDuration

The total duration should be equal to the sum of all durations above.

For routes, it also corresponds to: ShipmentRoute.vehicle_end_time - ShipmentRoute.vehicle_start_time

Returns
TypeDescription
Google\Protobuf\Duration|null

hasTotalDuration

clearTotalDuration

setTotalDuration

The total duration should be equal to the sum of all durations above.

For routes, it also corresponds to: ShipmentRoute.vehicle_end_time - ShipmentRoute.vehicle_start_time

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getTravelDistanceMeters

Total travel distance for a route or a solution.

Returns
TypeDescription
float

setTravelDistanceMeters

Total travel distance for a route or a solution.

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getMaxLoads

Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp.

ShipmentRoute.metrics.max_loads.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setMaxLoads

Maximum load achieved over the entire route (resp. solution), for each of the quantities on this route (resp. solution), computed as the maximum over all Transition.vehicle_loads (resp.

ShipmentRoute.metrics.max_loads.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getCosts

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setCosts

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getTotalCost

Returns
TypeDescription
float

setTotalCost

Parameter
NameDescription
var float
Returns
TypeDescription
$this