Interface VehicleOrBuilder (1.10.0)

publicinterface VehicleOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

containsExtraVisitDurationForVisitType(String key)

publicabstractbooleancontainsExtraVisitDurationForVisitType(Stringkey)

Specifies a map from visit_types strings to durations. The duration is time in addition to VisitRequest.duration to be taken at visits with the specified visit_types. This extra visit duration adds cost if cost_per_hour is specified. Keys (i.e. visit_types) cannot be empty strings. If a visit request has multiple types, a duration will be added for each type in the map.

map<string, .google.protobuf.Duration> extra_visit_duration_for_visit_type = 24;

Parameter
Name Description
key String
Returns
Type Description

containsLoadLimits(String key)

publicabstractbooleancontainsLoadLimits(Stringkey)

Capacities of the vehicle (weight, volume, # of pallets for example). The keys in the map are the identifiers of the type of load, consistent with the keys of the Shipment.load_demands field. If a given key is absent from this map, the corresponding capacity is considered to be limitless.

map<string, .google.cloud.optimization.v1.Vehicle.LoadLimit> load_limits = 30;

Parameter
Name Description
key String
Returns
Type Description

getBreakRule()

publicabstractBreakRulegetBreakRule()

Describes the break schedule to be enforced on this vehicle. If empty, no breaks will be scheduled for this vehicle.

.google.cloud.optimization.v1.BreakRule break_rule = 25;

Returns
Type Description
BreakRule

The breakRule.

getBreakRuleIndices(int index) (deprecated)

publicabstractintgetBreakRuleIndices(intindex)

Deprecated. google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1443

Deprecated: No longer used. Indices in the break_rule field in the source ShipmentModel. They correspond to break rules enforced on the vehicle. As of 2018/03, at most one rule index per vehicle can be specified.

repeated int32 break_rule_indices = 29 [deprecated = true];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The breakRuleIndices at the given index.

getBreakRuleIndicesCount() (deprecated)

publicabstractintgetBreakRuleIndicesCount()

Deprecated. google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1443

Deprecated: No longer used. Indices in the break_rule field in the source ShipmentModel. They correspond to break rules enforced on the vehicle. As of 2018/03, at most one rule index per vehicle can be specified.

repeated int32 break_rule_indices = 29 [deprecated = true];

Returns
Type Description
int

The count of breakRuleIndices.

getBreakRuleIndicesList() (deprecated)

publicabstractList<Integer>getBreakRuleIndicesList()

Deprecated. google.cloud.optimization.v1.Vehicle.break_rule_indices is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1443

Deprecated: No longer used. Indices in the break_rule field in the source ShipmentModel. They correspond to break rules enforced on the vehicle. As of 2018/03, at most one rule index per vehicle can be specified.

repeated int32 break_rule_indices = 29 [deprecated = true];

Returns
Type Description
List<Integer>

A list containing the breakRuleIndices.

getBreakRuleOrBuilder()

publicabstractBreakRuleOrBuildergetBreakRuleOrBuilder()

Describes the break schedule to be enforced on this vehicle. If empty, no breaks will be scheduled for this vehicle.

.google.cloud.optimization.v1.BreakRule break_rule = 25;

Returns
Type Description

getCapacities(int index)

publicabstractCapacityQuantitygetCapacities(intindex)

Deprecated: Use Vehicle.load_limits instead.

repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

getCapacitiesCount()

publicabstractintgetCapacitiesCount()

Deprecated: Use Vehicle.load_limits instead.

repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];

Returns
Type Description
int

getCapacitiesList()

publicabstractList<CapacityQuantity>getCapacitiesList()

Deprecated: Use Vehicle.load_limits instead.

repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];

Returns
Type Description

getCapacitiesOrBuilder(int index)

publicabstractCapacityQuantityOrBuildergetCapacitiesOrBuilder(intindex)

Deprecated: Use Vehicle.load_limits instead.

repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

getCapacitiesOrBuilderList()

publicabstractList<?extendsCapacityQuantityOrBuilder>getCapacitiesOrBuilderList()

Deprecated: Use Vehicle.load_limits instead.

repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.CapacityQuantityOrBuilder>

getCostPerHour()

publicabstractdoublegetCostPerHour()

Vehicle costs: all costs add up and must be in the same unit as Shipment.penalty_cost. Cost per hour of the vehicle route. This cost is applied to the total time taken by the route, and includes travel time, waiting time, and visit time. Using cost_per_hour instead of just cost_per_traveled_hour may result in additional latency.

double cost_per_hour = 16;

Returns
Type Description
double

The costPerHour.

getCostPerKilometer()

publicabstractdoublegetCostPerKilometer()

Cost per kilometer of the vehicle route. This cost is applied to the distance reported in the ShipmentRoute.transitions and does not apply to any distance implicitly traveled from the arrival_location to the departure_location of a single VisitRequest.

double cost_per_kilometer = 18;

Returns
Type Description
double

The costPerKilometer.

getCostPerTraveledHour()

publicabstractdoublegetCostPerTraveledHour()

Cost per traveled hour of the vehicle route. This cost is applied only to travel time taken by the route (i.e., that reported in ShipmentRoute.transitions), and excludes waiting time and visit time.

double cost_per_traveled_hour = 17;

Returns
Type Description
double

The costPerTraveledHour.

getEndLoadIntervals(int index)

publicabstractCapacityQuantityIntervalgetEndLoadIntervals(intindex)

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

getEndLoadIntervalsCount()

publicabstractintgetEndLoadIntervalsCount()

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];

Returns
Type Description
int

getEndLoadIntervalsList()

publicabstractList<CapacityQuantityInterval>getEndLoadIntervalsList()

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];

Returns
Type Description

getEndLoadIntervalsOrBuilder(int index)

publicabstractCapacityQuantityIntervalOrBuildergetEndLoadIntervalsOrBuilder(intindex)

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

getEndLoadIntervalsOrBuilderList()

publicabstractList<?extendsCapacityQuantityIntervalOrBuilder>getEndLoadIntervalsOrBuilderList()

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.CapacityQuantityIntervalOrBuilder>

getEndLocation()

publicabstractLatLnggetEndLocation()

Geographic location where the vehicle ends after it has completed its last VisitRequest. If not specified the vehicle's ShipmentRoute ends immediately when it completes its last VisitRequest. If the shipment model has duration and distance matrices, end_location must not be specified.

.google.type.LatLng end_location = 5;

Returns
Type Description
com.google.type.LatLng

The endLocation.

getEndLocationOrBuilder()

publicabstractLatLngOrBuildergetEndLocationOrBuilder()

Geographic location where the vehicle ends after it has completed its last VisitRequest. If not specified the vehicle's ShipmentRoute ends immediately when it completes its last VisitRequest. If the shipment model has duration and distance matrices, end_location must not be specified.

.google.type.LatLng end_location = 5;

Returns
Type Description
com.google.type.LatLngOrBuilder

getEndTags(int index)

publicabstractStringgetEndTags(intindex)

Specifies tags attached to the end of the vehicle's route. Empty or duplicate strings are not allowed.

repeated string end_tags = 8;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The endTags at the given index.

getEndTagsBytes(int index)

publicabstractByteStringgetEndTagsBytes(intindex)

Specifies tags attached to the end of the vehicle's route. Empty or duplicate strings are not allowed.

repeated string end_tags = 8;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the endTags at the given index.

getEndTagsCount()

publicabstractintgetEndTagsCount()

Specifies tags attached to the end of the vehicle's route. Empty or duplicate strings are not allowed.

repeated string end_tags = 8;

Returns
Type Description
int

The count of endTags.

getEndTagsList()

publicabstractList<String>getEndTagsList()

Specifies tags attached to the end of the vehicle's route. Empty or duplicate strings are not allowed.

repeated string end_tags = 8;

Returns
Type Description
List<String>

A list containing the endTags.

getEndTimeWindows(int index)

publicabstractTimeWindowgetEndTimeWindows(intindex)

Time windows during which the vehicle may arrive at its end location. They must be within the global time limits (see ShipmentModel.global_* fields). If unspecified, there is no limitation besides those global time limits. Time windows belonging to the same repeated field must be disjoint, i.e. no time window can overlap with or be adjacent to another, and they must be in chronological order. cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow end_time_windows = 10;

Parameter
Name Description
index int
Returns
Type Description

getEndTimeWindowsCount()

publicabstractintgetEndTimeWindowsCount()

Time windows during which the vehicle may arrive at its end location. They must be within the global time limits (see ShipmentModel.global_* fields). If unspecified, there is no limitation besides those global time limits. Time windows belonging to the same repeated field must be disjoint, i.e. no time window can overlap with or be adjacent to another, and they must be in chronological order. cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow end_time_windows = 10;

Returns
Type Description
int

getEndTimeWindowsList()

publicabstractList<TimeWindow>getEndTimeWindowsList()

Time windows during which the vehicle may arrive at its end location. They must be within the global time limits (see ShipmentModel.global_* fields). If unspecified, there is no limitation besides those global time limits. Time windows belonging to the same repeated field must be disjoint, i.e. no time window can overlap with or be adjacent to another, and they must be in chronological order. cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow end_time_windows = 10;

Returns
Type Description

getEndTimeWindowsOrBuilder(int index)

publicabstractTimeWindowOrBuildergetEndTimeWindowsOrBuilder(intindex)

Time windows during which the vehicle may arrive at its end location. They must be within the global time limits (see ShipmentModel.global_* fields). If unspecified, there is no limitation besides those global time limits. Time windows belonging to the same repeated field must be disjoint, i.e. no time window can overlap with or be adjacent to another, and they must be in chronological order. cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow end_time_windows = 10;

Parameter
Name Description
index int
Returns
Type Description

getEndTimeWindowsOrBuilderList()

publicabstractList<?extendsTimeWindowOrBuilder>getEndTimeWindowsOrBuilderList()

Time windows during which the vehicle may arrive at its end location. They must be within the global time limits (see ShipmentModel.global_* fields). If unspecified, there is no limitation besides those global time limits. Time windows belonging to the same repeated field must be disjoint, i.e. no time window can overlap with or be adjacent to another, and they must be in chronological order. cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow end_time_windows = 10;

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.TimeWindowOrBuilder>

getEndWaypoint()

publicabstractWaypointgetEndWaypoint()

Waypoint representing a geographic location where the vehicle ends after it has completed its last VisitRequest. If neither end_waypoint nor end_location is specified, the vehicle's ShipmentRoute ends immediately when it completes its last VisitRequest. If the shipment model has duration and distance matrices, end_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint end_waypoint = 6;

Returns
Type Description
Waypoint

The endWaypoint.

getEndWaypointOrBuilder()

publicabstractWaypointOrBuildergetEndWaypointOrBuilder()

Waypoint representing a geographic location where the vehicle ends after it has completed its last VisitRequest. If neither end_waypoint nor end_location is specified, the vehicle's ShipmentRoute ends immediately when it completes its last VisitRequest. If the shipment model has duration and distance matrices, end_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint end_waypoint = 6;

Returns
Type Description

getExtraVisitDurationForVisitType()

publicabstractMap<String,Duration>getExtraVisitDurationForVisitType()
Returns
Type Description

getExtraVisitDurationForVisitTypeCount()

publicabstractintgetExtraVisitDurationForVisitTypeCount()

Specifies a map from visit_types strings to durations. The duration is time in addition to VisitRequest.duration to be taken at visits with the specified visit_types. This extra visit duration adds cost if cost_per_hour is specified. Keys (i.e. visit_types) cannot be empty strings. If a visit request has multiple types, a duration will be added for each type in the map.

map<string, .google.protobuf.Duration> extra_visit_duration_for_visit_type = 24;

Returns
Type Description
int

getExtraVisitDurationForVisitTypeMap()

publicabstractMap<String,Duration>getExtraVisitDurationForVisitTypeMap()

Specifies a map from visit_types strings to durations. The duration is time in addition to VisitRequest.duration to be taken at visits with the specified visit_types. This extra visit duration adds cost if cost_per_hour is specified. Keys (i.e. visit_types) cannot be empty strings. If a visit request has multiple types, a duration will be added for each type in the map.

map<string, .google.protobuf.Duration> extra_visit_duration_for_visit_type = 24;

Returns
Type Description

getExtraVisitDurationForVisitTypeOrDefault(String key, Duration defaultValue)

publicabstractDurationgetExtraVisitDurationForVisitTypeOrDefault(Stringkey,DurationdefaultValue)

Specifies a map from visit_types strings to durations. The duration is time in addition to VisitRequest.duration to be taken at visits with the specified visit_types. This extra visit duration adds cost if cost_per_hour is specified. Keys (i.e. visit_types) cannot be empty strings. If a visit request has multiple types, a duration will be added for each type in the map.

map<string, .google.protobuf.Duration> extra_visit_duration_for_visit_type = 24;

Parameters
Name Description
key String
defaultValue Duration
Returns
Type Description

getExtraVisitDurationForVisitTypeOrThrow(String key)

publicabstractDurationgetExtraVisitDurationForVisitTypeOrThrow(Stringkey)

Specifies a map from visit_types strings to durations. The duration is time in addition to VisitRequest.duration to be taken at visits with the specified visit_types. This extra visit duration adds cost if cost_per_hour is specified. Keys (i.e. visit_types) cannot be empty strings. If a visit request has multiple types, a duration will be added for each type in the map.

map<string, .google.protobuf.Duration> extra_visit_duration_for_visit_type = 24;

Parameter
Name Description
key String
Returns
Type Description

getFixedCost()

publicabstractdoublegetFixedCost()

Fixed cost applied if this vehicle is used to handle a shipment.

double fixed_cost = 19;

Returns
Type Description
double

The fixedCost.

getIgnore()

publicabstractbooleangetIgnore()

If true, used_if_route_is_empty must be false, and this vehicle will remain unused. If a shipment is performed by an ignored vehicle in injected_first_solution_routes, it is skipped in the first solution but is free to be performed in the response. If a shipment is performed by an ignored vehicle in injected_solution_constraint and any related pickup/delivery is constrained to remain on the vehicle (i.e., not relaxed to level RELAX_ALL_AFTER_THRESHOLD), it is skipped in the response. If a shipment has a non-empty allowed_vehicle_indices field and all of the allowed vehicles are ignored, it is skipped in the response.

bool ignore = 28;

Returns
Type Description
boolean

The ignore.

getLabel()

publicabstractStringgetLabel()

Specifies a label for this vehicle. This label is reported in the response as the vehicle_label of the corresponding ShipmentRoute.

string label = 27;

Returns
Type Description
String

The label.

getLabelBytes()

publicabstractByteStringgetLabelBytes()

Specifies a label for this vehicle. This label is reported in the response as the vehicle_label of the corresponding ShipmentRoute.

string label = 27;

Returns
Type Description
ByteString

The bytes for label.

getLoadLimits()

publicabstractMap<String,Vehicle.LoadLimit>getLoadLimits()

Use #getLoadLimitsMap() instead.

Returns
Type Description

getLoadLimitsCount()

publicabstractintgetLoadLimitsCount()

Capacities of the vehicle (weight, volume, # of pallets for example). The keys in the map are the identifiers of the type of load, consistent with the keys of the Shipment.load_demands field. If a given key is absent from this map, the corresponding capacity is considered to be limitless.

map<string, .google.cloud.optimization.v1.Vehicle.LoadLimit> load_limits = 30;

Returns
Type Description
int

getLoadLimitsMap()

publicabstractMap<String,Vehicle.LoadLimit>getLoadLimitsMap()

Capacities of the vehicle (weight, volume, # of pallets for example). The keys in the map are the identifiers of the type of load, consistent with the keys of the Shipment.load_demands field. If a given key is absent from this map, the corresponding capacity is considered to be limitless.

map<string, .google.cloud.optimization.v1.Vehicle.LoadLimit> load_limits = 30;

Returns
Type Description

getLoadLimitsOrDefault(String key, Vehicle.LoadLimit defaultValue)

publicabstractVehicle.LoadLimitgetLoadLimitsOrDefault(Stringkey,Vehicle.LoadLimitdefaultValue)

Capacities of the vehicle (weight, volume, # of pallets for example). The keys in the map are the identifiers of the type of load, consistent with the keys of the Shipment.load_demands field. If a given key is absent from this map, the corresponding capacity is considered to be limitless.

map<string, .google.cloud.optimization.v1.Vehicle.LoadLimit> load_limits = 30;

Parameters
Name Description
key String
defaultValue Vehicle.LoadLimit
Returns
Type Description

getLoadLimitsOrThrow(String key)

publicabstractVehicle.LoadLimitgetLoadLimitsOrThrow(Stringkey)

Capacities of the vehicle (weight, volume, # of pallets for example). The keys in the map are the identifiers of the type of load, consistent with the keys of the Shipment.load_demands field. If a given key is absent from this map, the corresponding capacity is considered to be limitless.

map<string, .google.cloud.optimization.v1.Vehicle.LoadLimit> load_limits = 30;

Parameter
Name Description
key String
Returns
Type Description

getRouteDistanceLimit()

publicabstractDistanceLimitgetRouteDistanceLimit()

Limit applied to the total distance of the vehicle's route. In a given OptimizeToursResponse, the route distance is the sum of all its transitions.travel_distance_meters.

.google.cloud.optimization.v1.DistanceLimit route_distance_limit = 23;

Returns
Type Description
DistanceLimit

The routeDistanceLimit.

getRouteDistanceLimitOrBuilder()

publicabstractDistanceLimitOrBuildergetRouteDistanceLimitOrBuilder()

Limit applied to the total distance of the vehicle's route. In a given OptimizeToursResponse, the route distance is the sum of all its transitions.travel_distance_meters.

.google.cloud.optimization.v1.DistanceLimit route_distance_limit = 23;

Returns
Type Description

getRouteDurationLimit()

publicabstractVehicle.DurationLimitgetRouteDurationLimit()

Limit applied to the total duration of the vehicle's route. In a given OptimizeToursResponse, the route duration of a vehicle is the difference between its vehicle_end_time and vehicle_start_time.

.google.cloud.optimization.v1.Vehicle.DurationLimit route_duration_limit = 21;

Returns
Type Description
Vehicle.DurationLimit

The routeDurationLimit.

getRouteDurationLimitOrBuilder()

publicabstractVehicle.DurationLimitOrBuildergetRouteDurationLimitOrBuilder()

Limit applied to the total duration of the vehicle's route. In a given OptimizeToursResponse, the route duration of a vehicle is the difference between its vehicle_end_time and vehicle_start_time.

.google.cloud.optimization.v1.Vehicle.DurationLimit route_duration_limit = 21;

Returns
Type Description

getStartLoadIntervals(int index)

publicabstractCapacityQuantityIntervalgetStartLoadIntervals(intindex)

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

getStartLoadIntervalsCount()

publicabstractintgetStartLoadIntervalsCount()

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];

Returns
Type Description
int

getStartLoadIntervalsList()

publicabstractList<CapacityQuantityInterval>getStartLoadIntervalsList()

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];

Returns
Type Description

getStartLoadIntervalsOrBuilder(int index)

publicabstractCapacityQuantityIntervalOrBuildergetStartLoadIntervalsOrBuilder(intindex)

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description

getStartLoadIntervalsOrBuilderList()

publicabstractList<?extendsCapacityQuantityIntervalOrBuilder>getStartLoadIntervalsOrBuilderList()

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.CapacityQuantityIntervalOrBuilder>

getStartLocation()

publicabstractLatLnggetStartLocation()

Geographic location where the vehicle starts before picking up any shipments. If not specified, the vehicle starts at its first pickup. If the shipment model has duration and distance matrices, start_location must not be specified.

.google.type.LatLng start_location = 3;

Returns
Type Description
com.google.type.LatLng

The startLocation.

getStartLocationOrBuilder()

publicabstractLatLngOrBuildergetStartLocationOrBuilder()

Geographic location where the vehicle starts before picking up any shipments. If not specified, the vehicle starts at its first pickup. If the shipment model has duration and distance matrices, start_location must not be specified.

.google.type.LatLng start_location = 3;

Returns
Type Description
com.google.type.LatLngOrBuilder

getStartTags(int index)

publicabstractStringgetStartTags(intindex)

Specifies tags attached to the start of the vehicle's route. Empty or duplicate strings are not allowed.

repeated string start_tags = 7;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The startTags at the given index.

getStartTagsBytes(int index)

publicabstractByteStringgetStartTagsBytes(intindex)

Specifies tags attached to the start of the vehicle's route. Empty or duplicate strings are not allowed.

repeated string start_tags = 7;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the startTags at the given index.

getStartTagsCount()

publicabstractintgetStartTagsCount()

Specifies tags attached to the start of the vehicle's route. Empty or duplicate strings are not allowed.

repeated string start_tags = 7;

Returns
Type Description
int

The count of startTags.

getStartTagsList()

publicabstractList<String>getStartTagsList()

Specifies tags attached to the start of the vehicle's route. Empty or duplicate strings are not allowed.

repeated string start_tags = 7;

Returns
Type Description
List<String>

A list containing the startTags.

getStartTimeWindows(int index)

publicabstractTimeWindowgetStartTimeWindows(intindex)

Time windows during which the vehicle may depart its start location. They must be within the global time limits (see ShipmentModel.global_* fields). If unspecified, there is no limitation besides those global time limits. Time windows belonging to the same repeated field must be disjoint, i.e. no time window can overlap with or be adjacent to another, and they must be in chronological order. cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow start_time_windows = 9;

Parameter
Name Description
index int
Returns
Type Description

getStartTimeWindowsCount()

publicabstractintgetStartTimeWindowsCount()

Time windows during which the vehicle may depart its start location. They must be within the global time limits (see ShipmentModel.global_* fields). If unspecified, there is no limitation besides those global time limits. Time windows belonging to the same repeated field must be disjoint, i.e. no time window can overlap with or be adjacent to another, and they must be in chronological order. cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow start_time_windows = 9;

Returns
Type Description
int

getStartTimeWindowsList()

publicabstractList<TimeWindow>getStartTimeWindowsList()

Time windows during which the vehicle may depart its start location. They must be within the global time limits (see ShipmentModel.global_* fields). If unspecified, there is no limitation besides those global time limits. Time windows belonging to the same repeated field must be disjoint, i.e. no time window can overlap with or be adjacent to another, and they must be in chronological order. cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow start_time_windows = 9;

Returns
Type Description

getStartTimeWindowsOrBuilder(int index)

publicabstractTimeWindowOrBuildergetStartTimeWindowsOrBuilder(intindex)

Time windows during which the vehicle may depart its start location. They must be within the global time limits (see ShipmentModel.global_* fields). If unspecified, there is no limitation besides those global time limits. Time windows belonging to the same repeated field must be disjoint, i.e. no time window can overlap with or be adjacent to another, and they must be in chronological order. cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow start_time_windows = 9;

Parameter
Name Description
index int
Returns
Type Description

getStartTimeWindowsOrBuilderList()

publicabstractList<?extendsTimeWindowOrBuilder>getStartTimeWindowsOrBuilderList()

Time windows during which the vehicle may depart its start location. They must be within the global time limits (see ShipmentModel.global_* fields). If unspecified, there is no limitation besides those global time limits. Time windows belonging to the same repeated field must be disjoint, i.e. no time window can overlap with or be adjacent to another, and they must be in chronological order. cost_per_hour_after_soft_end_time and soft_end_time can only be set if there is a single time window.

repeated .google.cloud.optimization.v1.TimeWindow start_time_windows = 9;

Returns
Type Description
List<? extends com.google.cloud.optimization.v1.TimeWindowOrBuilder>

getStartWaypoint()

publicabstractWaypointgetStartWaypoint()

Waypoint representing a geographic location where the vehicle starts before picking up any shipments. If neither start_waypoint nor start_location is specified, the vehicle starts at its first pickup. If the shipment model has duration and distance matrices, start_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint start_waypoint = 4;

Returns
Type Description
Waypoint

The startWaypoint.

getStartWaypointOrBuilder()

publicabstractWaypointOrBuildergetStartWaypointOrBuilder()

Waypoint representing a geographic location where the vehicle starts before picking up any shipments. If neither start_waypoint nor start_location is specified, the vehicle starts at its first pickup. If the shipment model has duration and distance matrices, start_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint start_waypoint = 4;

Returns
Type Description

getTravelDurationLimit()

publicabstractVehicle.DurationLimitgetTravelDurationLimit()

Limit applied to the travel duration of the vehicle's route. In a given OptimizeToursResponse, the route travel duration is the sum of all its transitions.travel_duration.

.google.cloud.optimization.v1.Vehicle.DurationLimit travel_duration_limit = 22;

Returns
Type Description
Vehicle.DurationLimit

The travelDurationLimit.

getTravelDurationLimitOrBuilder()

publicabstractVehicle.DurationLimitOrBuildergetTravelDurationLimitOrBuilder()

Limit applied to the travel duration of the vehicle's route. In a given OptimizeToursResponse, the route travel duration is the sum of all its transitions.travel_duration.

.google.cloud.optimization.v1.Vehicle.DurationLimit travel_duration_limit = 22;

Returns
Type Description

getTravelDurationMultiple()

publicabstractdoublegetTravelDurationMultiple()

Specifies a multiplicative factor that can be used to increase or decrease travel times of this vehicle. For example, setting this to 2.0 means that this vehicle is slower and has travel times that are twice what they are for standard vehicles. This multiple does not affect visit durations. It does affect cost if cost_per_hour or cost_per_traveled_hour are specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle is standard, and this multiple is considered 1.0. WARNING: Travel times will be rounded to the nearest second after this multiple is applied but before performing any numerical operations, thus, a small multiple may result in a loss of precision. See also extra_visit_duration_for_visit_type below.

optional double travel_duration_multiple = 11;

Returns
Type Description
double

The travelDurationMultiple.

getTravelMode()

publicabstractVehicle.TravelModegetTravelMode()

The travel mode which affects the roads usable by the vehicle and its speed. See also travel_duration_multiple.

.google.cloud.optimization.v1.Vehicle.TravelMode travel_mode = 1;

Returns
Type Description
Vehicle.TravelMode

The travelMode.

getTravelModeValue()

publicabstractintgetTravelModeValue()

The travel mode which affects the roads usable by the vehicle and its speed. See also travel_duration_multiple.

.google.cloud.optimization.v1.Vehicle.TravelMode travel_mode = 1;

Returns
Type Description
int

The enum numeric value on the wire for travelMode.

getUnloadingPolicy()

publicabstractVehicle.UnloadingPolicygetUnloadingPolicy()

Unloading policy enforced on the vehicle.

.google.cloud.optimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12;

Returns
Type Description
Vehicle.UnloadingPolicy

The unloadingPolicy.

getUnloadingPolicyValue()

publicabstractintgetUnloadingPolicyValue()

Unloading policy enforced on the vehicle.

.google.cloud.optimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12;

Returns
Type Description
int

The enum numeric value on the wire for unloadingPolicy.

getUsedIfRouteIsEmpty()

publicabstractbooleangetUsedIfRouteIsEmpty()

This field only applies to vehicles when their route does not serve any shipments. It indicates if the vehicle should be considered as used or not in this case. If true, the vehicle goes from its start to its end location even if it doesn't serve any shipments, and time and distance costs resulting from its start --> end travel are taken into account. Otherwise, it doesn't travel from its start to its end location, and no break_rule or delay (from TransitionAttributes) are scheduled for this vehicle. In this case, the vehicle's ShipmentRoute doesn't contain any information except for the vehicle index and label.

bool used_if_route_is_empty = 20;

Returns
Type Description
boolean

The usedIfRouteIsEmpty.

hasBreakRule()

publicabstractbooleanhasBreakRule()

Describes the break schedule to be enforced on this vehicle. If empty, no breaks will be scheduled for this vehicle.

.google.cloud.optimization.v1.BreakRule break_rule = 25;

Returns
Type Description
boolean

Whether the breakRule field is set.

hasEndLocation()

publicabstractbooleanhasEndLocation()

Geographic location where the vehicle ends after it has completed its last VisitRequest. If not specified the vehicle's ShipmentRoute ends immediately when it completes its last VisitRequest. If the shipment model has duration and distance matrices, end_location must not be specified.

.google.type.LatLng end_location = 5;

Returns
Type Description
boolean

Whether the endLocation field is set.

hasEndWaypoint()

publicabstractbooleanhasEndWaypoint()

Waypoint representing a geographic location where the vehicle ends after it has completed its last VisitRequest. If neither end_waypoint nor end_location is specified, the vehicle's ShipmentRoute ends immediately when it completes its last VisitRequest. If the shipment model has duration and distance matrices, end_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint end_waypoint = 6;

Returns
Type Description
boolean

Whether the endWaypoint field is set.

hasRouteDistanceLimit()

publicabstractbooleanhasRouteDistanceLimit()

Limit applied to the total distance of the vehicle's route. In a given OptimizeToursResponse, the route distance is the sum of all its transitions.travel_distance_meters.

.google.cloud.optimization.v1.DistanceLimit route_distance_limit = 23;

Returns
Type Description
boolean

Whether the routeDistanceLimit field is set.

hasRouteDurationLimit()

publicabstractbooleanhasRouteDurationLimit()

Limit applied to the total duration of the vehicle's route. In a given OptimizeToursResponse, the route duration of a vehicle is the difference between its vehicle_end_time and vehicle_start_time.

.google.cloud.optimization.v1.Vehicle.DurationLimit route_duration_limit = 21;

Returns
Type Description
boolean

Whether the routeDurationLimit field is set.

hasStartLocation()

publicabstractbooleanhasStartLocation()

Geographic location where the vehicle starts before picking up any shipments. If not specified, the vehicle starts at its first pickup. If the shipment model has duration and distance matrices, start_location must not be specified.

.google.type.LatLng start_location = 3;

Returns
Type Description
boolean

Whether the startLocation field is set.

hasStartWaypoint()

publicabstractbooleanhasStartWaypoint()

Waypoint representing a geographic location where the vehicle starts before picking up any shipments. If neither start_waypoint nor start_location is specified, the vehicle starts at its first pickup. If the shipment model has duration and distance matrices, start_waypoint must not be specified.

.google.cloud.optimization.v1.Waypoint start_waypoint = 4;

Returns
Type Description
boolean

Whether the startWaypoint field is set.

hasTravelDurationLimit()

publicabstractbooleanhasTravelDurationLimit()

Limit applied to the travel duration of the vehicle's route. In a given OptimizeToursResponse, the route travel duration is the sum of all its transitions.travel_duration.

.google.cloud.optimization.v1.Vehicle.DurationLimit travel_duration_limit = 22;

Returns
Type Description
boolean

Whether the travelDurationLimit field is set.

hasTravelDurationMultiple()

publicabstractbooleanhasTravelDurationMultiple()

Specifies a multiplicative factor that can be used to increase or decrease travel times of this vehicle. For example, setting this to 2.0 means that this vehicle is slower and has travel times that are twice what they are for standard vehicles. This multiple does not affect visit durations. It does affect cost if cost_per_hour or cost_per_traveled_hour are specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle is standard, and this multiple is considered 1.0. WARNING: Travel times will be rounded to the nearest second after this multiple is applied but before performing any numerical operations, thus, a small multiple may result in a loss of precision. See also extra_visit_duration_for_visit_type below.

optional double travel_duration_multiple = 11;

Returns
Type Description
boolean

Whether the travelDurationMultiple field is set.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.