Class OptimizeToursResponse.Metrics (1.51.0)

public static final class OptimizeToursResponse.Metrics extends GeneratedMessageV3 implements OptimizeToursResponse.MetricsOrBuilder

Overall metrics, aggregated over all routes.

Protobuf type google.cloud.optimization.v1.OptimizeToursResponse.Metrics

Static Fields

AGGREGATED_ROUTE_METRICS_FIELD_NUMBER

public static final int AGGREGATED_ROUTE_METRICS_FIELD_NUMBER
Field Value
Type Description
int

COSTS_FIELD_NUMBER

public static final int COSTS_FIELD_NUMBER
Field Value
Type Description
int

EARLIEST_VEHICLE_START_TIME_FIELD_NUMBER

public static final int EARLIEST_VEHICLE_START_TIME_FIELD_NUMBER
Field Value
Type Description
int

LATEST_VEHICLE_END_TIME_FIELD_NUMBER

public static final int LATEST_VEHICLE_END_TIME_FIELD_NUMBER
Field Value
Type Description
int

SKIPPED_MANDATORY_SHIPMENT_COUNT_FIELD_NUMBER

public static final int SKIPPED_MANDATORY_SHIPMENT_COUNT_FIELD_NUMBER
Field Value
Type Description
int

TOTAL_COST_FIELD_NUMBER

public static final int TOTAL_COST_FIELD_NUMBER
Field Value
Type Description
int

USED_VEHICLE_COUNT_FIELD_NUMBER

public static final int USED_VEHICLE_COUNT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static OptimizeToursResponse.Metrics getDefaultInstance()
Returns
Type Description
OptimizeToursResponse.Metrics

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static OptimizeToursResponse.Metrics.Builder newBuilder()
Returns
Type Description
OptimizeToursResponse.Metrics.Builder

newBuilder(OptimizeToursResponse.Metrics prototype)

public static OptimizeToursResponse.Metrics.Builder newBuilder(OptimizeToursResponse.Metrics prototype)
Parameter
Name Description
prototype OptimizeToursResponse.Metrics
Returns
Type Description
OptimizeToursResponse.Metrics.Builder

parseDelimitedFrom(InputStream input)

public static OptimizeToursResponse.Metrics parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
OptimizeToursResponse.Metrics
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse.Metrics parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse.Metrics
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static OptimizeToursResponse.Metrics parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
OptimizeToursResponse.Metrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse.Metrics parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse.Metrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static OptimizeToursResponse.Metrics parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
OptimizeToursResponse.Metrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse.Metrics parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse.Metrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static OptimizeToursResponse.Metrics parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
OptimizeToursResponse.Metrics
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse.Metrics parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse.Metrics
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static OptimizeToursResponse.Metrics parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
OptimizeToursResponse.Metrics
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse.Metrics parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse.Metrics
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static OptimizeToursResponse.Metrics parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
OptimizeToursResponse.Metrics
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static OptimizeToursResponse.Metrics parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
OptimizeToursResponse.Metrics
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<OptimizeToursResponse.Metrics> parser()
Returns
Type Description
Parser<Metrics>

Methods

containsCosts(String key)

public boolean containsCosts(String key)

Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

map<string, double> costs = 10;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAggregatedRouteMetrics()

public AggregatedMetrics getAggregatedRouteMetrics()

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

.google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;

Returns
Type Description
AggregatedMetrics

The aggregatedRouteMetrics.

getAggregatedRouteMetricsOrBuilder()

public AggregatedMetricsOrBuilder getAggregatedRouteMetricsOrBuilder()

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

.google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;

Returns
Type Description
AggregatedMetricsOrBuilder

getCosts() (deprecated)

public Map<String,Double> getCosts()

Use #getCostsMap() instead.

Returns
Type Description
Map<String,Double>

getCostsCount()

public int getCostsCount()

Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

map<string, double> costs = 10;

Returns
Type Description
int

getCostsMap()

public Map<String,Double> getCostsMap()

Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

map<string, double> costs = 10;

Returns
Type Description
Map<String,Double>

getCostsOrDefault(String key, double defaultValue)

public double getCostsOrDefault(String key, double defaultValue)

Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

map<string, double> costs = 10;

Parameters
Name Description
key String
defaultValue double
Returns
Type Description
double

getCostsOrThrow(String key)

public double getCostsOrThrow(String key)

Cost of the solution, broken down by cost-related request fields. The keys are proto paths, relative to the input OptimizeToursRequest, e.g. "model.shipments.pickups.cost", and the values are the total cost generated by the corresponding cost field, aggregated over the whole solution. In other words, costs["model.shipments.pickups.cost"] is the sum of all pickup costs over the solution. All costs defined in the model are reported in detail here with the exception of costs related to TransitionAttributes that are only reported in an aggregated way as of 2022/01.

map<string, double> costs = 10;

Parameter
Name Description
key String
Returns
Type Description
double

getDefaultInstanceForType()

public OptimizeToursResponse.Metrics getDefaultInstanceForType()
Returns
Type Description
OptimizeToursResponse.Metrics

getEarliestVehicleStartTime()

public Timestamp getEarliestVehicleStartTime()

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time.

.google.protobuf.Timestamp earliest_vehicle_start_time = 4;

Returns
Type Description
Timestamp

The earliestVehicleStartTime.

getEarliestVehicleStartTimeOrBuilder()

public TimestampOrBuilder getEarliestVehicleStartTimeOrBuilder()

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time.

.google.protobuf.Timestamp earliest_vehicle_start_time = 4;

Returns
Type Description
TimestampOrBuilder

getLatestVehicleEndTime()

public Timestamp getLatestVehicleEndTime()

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time.

.google.protobuf.Timestamp latest_vehicle_end_time = 5;

Returns
Type Description
Timestamp

The latestVehicleEndTime.

getLatestVehicleEndTimeOrBuilder()

public TimestampOrBuilder getLatestVehicleEndTimeOrBuilder()

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time.

.google.protobuf.Timestamp latest_vehicle_end_time = 5;

Returns
Type Description
TimestampOrBuilder

getParserForType()

public Parser<OptimizeToursResponse.Metrics> getParserForType()
Returns
Type Description
Parser<Metrics>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSkippedMandatoryShipmentCount()

public int getSkippedMandatoryShipmentCount()

Number of mandatory shipments skipped.

int32 skipped_mandatory_shipment_count = 2;

Returns
Type Description
int

The skippedMandatoryShipmentCount.

getTotalCost()

public double getTotalCost()

Total cost of the solution. The sum of all values in the costs map.

double total_cost = 6;

Returns
Type Description
double

The totalCost.

getUsedVehicleCount()

public int getUsedVehicleCount()

Number of vehicles used. Note: if a vehicle route is empty and Vehicle.used_if_route_is_empty is true, the vehicle is considered used.

int32 used_vehicle_count = 3;

Returns
Type Description
int

The usedVehicleCount.

hasAggregatedRouteMetrics()

public boolean hasAggregatedRouteMetrics()

Aggregated over the routes. Each metric is the sum (or max, for loads) over all ShipmentRoute.metrics fields of the same name.

.google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1;

Returns
Type Description
boolean

Whether the aggregatedRouteMetrics field is set.

hasEarliestVehicleStartTime()

public boolean hasEarliestVehicleStartTime()

The earliest start time for a used vehicle, computed as the minimum over all used vehicles of ShipmentRoute.vehicle_start_time.

.google.protobuf.Timestamp earliest_vehicle_start_time = 4;

Returns
Type Description
boolean

Whether the earliestVehicleStartTime field is set.

hasLatestVehicleEndTime()

public boolean hasLatestVehicleEndTime()

The latest end time for a used vehicle, computed as the maximum over all used vehicles of ShipmentRoute.vehicle_end_time.

.google.protobuf.Timestamp latest_vehicle_end_time = 5;

Returns
Type Description
boolean

Whether the latestVehicleEndTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public OptimizeToursResponse.Metrics.Builder newBuilderForType()
Returns
Type Description
OptimizeToursResponse.Metrics.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected OptimizeToursResponse.Metrics.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
OptimizeToursResponse.Metrics.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public OptimizeToursResponse.Metrics.Builder toBuilder()
Returns
Type Description
OptimizeToursResponse.Metrics.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException