Class Vehicle.Builder (1.43.0)

publicstaticfinalclass Vehicle.BuilderextendsGeneratedMessageV3.Builder<Vehicle.Builder>implementsVehicleOrBuilder

Models a vehicle in a shipment problem. Solving a shipment problem will build a route starting from start_location and ending at end_location for this vehicle. A route is a sequence of visits (see ShipmentRoute).

Protobuf type google.cloud.optimization.v1.Vehicle

Implements

VehicleOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addAllBreakRuleIndices(Iterable<? extends Integer> values) (deprecated)

publicVehicle.BuilderaddAllBreakRuleIndices(Iterable<?extendsInteger>values)

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

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
values Iterable<? extends java.lang.Integer>

The breakRuleIndices to add.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

addAllCapacities(Iterable<? extends CapacityQuantity> values) (deprecated)

publicVehicle.BuilderaddAllCapacities(Iterable<?extendsCapacityQuantity>values)

Deprecated: Use Vehicle.load_limits instead.

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

Parameter
Name Description
values Iterable<? extends com.google.cloud.optimization.v1.CapacityQuantity>
Returns
Type Description
Vehicle.Builder

addAllEndLoadIntervals(Iterable<? extends CapacityQuantityInterval> values) (deprecated)

publicVehicle.BuilderaddAllEndLoadIntervals(Iterable<?extendsCapacityQuantityInterval>values)

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

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

Parameter
Name Description
values Iterable<? extends com.google.cloud.optimization.v1.CapacityQuantityInterval>
Returns
Type Description
Vehicle.Builder

addAllEndTags(Iterable<String> values)

publicVehicle.BuilderaddAllEndTags(Iterable<String>values)

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
values Iterable<String>

The endTags to add.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

addAllEndTimeWindows(Iterable<? extends TimeWindow> values)

publicVehicle.BuilderaddAllEndTimeWindows(Iterable<?extendsTimeWindow>values)

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
values Iterable<? extends com.google.cloud.optimization.v1.TimeWindow>
Returns
Type Description
Vehicle.Builder

addAllStartLoadIntervals(Iterable<? extends CapacityQuantityInterval> values) (deprecated)

publicVehicle.BuilderaddAllStartLoadIntervals(Iterable<?extendsCapacityQuantityInterval>values)

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

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

Parameter
Name Description
values Iterable<? extends com.google.cloud.optimization.v1.CapacityQuantityInterval>
Returns
Type Description
Vehicle.Builder

addAllStartTags(Iterable<String> values)

publicVehicle.BuilderaddAllStartTags(Iterable<String>values)

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
values Iterable<String>

The startTags to add.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

addAllStartTimeWindows(Iterable<? extends TimeWindow> values)

publicVehicle.BuilderaddAllStartTimeWindows(Iterable<?extendsTimeWindow>values)

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
values Iterable<? extends com.google.cloud.optimization.v1.TimeWindow>
Returns
Type Description
Vehicle.Builder

addBreakRuleIndices(int value) (deprecated)

publicVehicle.BuilderaddBreakRuleIndices(intvalue)

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

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
value int

The breakRuleIndices to add.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

addCapacities(CapacityQuantity value) (deprecated)

publicVehicle.BuilderaddCapacities(CapacityQuantityvalue)

Deprecated: Use Vehicle.load_limits instead.

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

Parameter
Name Description
value CapacityQuantity
Returns
Type Description
Vehicle.Builder

addCapacities(CapacityQuantity.Builder builderForValue) (deprecated)

publicVehicle.BuilderaddCapacities(CapacityQuantity.BuilderbuilderForValue)

Deprecated: Use Vehicle.load_limits instead.

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

Parameter
Name Description
builderForValue CapacityQuantity.Builder
Returns
Type Description
Vehicle.Builder

addCapacities(int index, CapacityQuantity value) (deprecated)

publicVehicle.BuilderaddCapacities(intindex,CapacityQuantityvalue)

Deprecated: Use Vehicle.load_limits instead.

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

Parameters
Name Description
index int
value CapacityQuantity
Returns
Type Description
Vehicle.Builder

addCapacities(int index, CapacityQuantity.Builder builderForValue) (deprecated)

publicVehicle.BuilderaddCapacities(intindex,CapacityQuantity.BuilderbuilderForValue)

Deprecated: Use Vehicle.load_limits instead.

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

Parameters
Name Description
index int
builderForValue CapacityQuantity.Builder
Returns
Type Description
Vehicle.Builder

addCapacitiesBuilder() (deprecated)

publicCapacityQuantity.BuilderaddCapacitiesBuilder()

Deprecated: Use Vehicle.load_limits instead.

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

Returns
Type Description
CapacityQuantity.Builder

addCapacitiesBuilder(int index) (deprecated)

publicCapacityQuantity.BuilderaddCapacitiesBuilder(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
CapacityQuantity.Builder

addEndLoadIntervals(CapacityQuantityInterval value) (deprecated)

publicVehicle.BuilderaddEndLoadIntervals(CapacityQuantityIntervalvalue)

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

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

Parameter
Name Description
value CapacityQuantityInterval
Returns
Type Description
Vehicle.Builder

addEndLoadIntervals(CapacityQuantityInterval.Builder builderForValue) (deprecated)

publicVehicle.BuilderaddEndLoadIntervals(CapacityQuantityInterval.BuilderbuilderForValue)

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

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

Parameter
Name Description
builderForValue CapacityQuantityInterval.Builder
Returns
Type Description
Vehicle.Builder

addEndLoadIntervals(int index, CapacityQuantityInterval value) (deprecated)

publicVehicle.BuilderaddEndLoadIntervals(intindex,CapacityQuantityIntervalvalue)

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

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

Parameters
Name Description
index int
value CapacityQuantityInterval
Returns
Type Description
Vehicle.Builder

addEndLoadIntervals(int index, CapacityQuantityInterval.Builder builderForValue) (deprecated)

publicVehicle.BuilderaddEndLoadIntervals(intindex,CapacityQuantityInterval.BuilderbuilderForValue)

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

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

Parameters
Name Description
index int
builderForValue CapacityQuantityInterval.Builder
Returns
Type Description
Vehicle.Builder

addEndLoadIntervalsBuilder() (deprecated)

publicCapacityQuantityInterval.BuilderaddEndLoadIntervalsBuilder()

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

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

Returns
Type Description
CapacityQuantityInterval.Builder

addEndLoadIntervalsBuilder(int index) (deprecated)

publicCapacityQuantityInterval.BuilderaddEndLoadIntervalsBuilder(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
CapacityQuantityInterval.Builder

addEndTags(String value)

publicVehicle.BuilderaddEndTags(Stringvalue)

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
value String

The endTags to add.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

addEndTagsBytes(ByteString value)

publicVehicle.BuilderaddEndTagsBytes(ByteStringvalue)

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
value ByteString

The bytes of the endTags to add.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

addEndTimeWindows(TimeWindow value)

publicVehicle.BuilderaddEndTimeWindows(TimeWindowvalue)

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
value TimeWindow
Returns
Type Description
Vehicle.Builder

addEndTimeWindows(TimeWindow.Builder builderForValue)

publicVehicle.BuilderaddEndTimeWindows(TimeWindow.BuilderbuilderForValue)

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
builderForValue TimeWindow.Builder
Returns
Type Description
Vehicle.Builder

addEndTimeWindows(int index, TimeWindow value)

publicVehicle.BuilderaddEndTimeWindows(intindex,TimeWindowvalue)

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;

Parameters
Name Description
index int
value TimeWindow
Returns
Type Description
Vehicle.Builder

addEndTimeWindows(int index, TimeWindow.Builder builderForValue)

publicVehicle.BuilderaddEndTimeWindows(intindex,TimeWindow.BuilderbuilderForValue)

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;

Parameters
Name Description
index int
builderForValue TimeWindow.Builder
Returns
Type Description
Vehicle.Builder

addEndTimeWindowsBuilder()

publicTimeWindow.BuilderaddEndTimeWindowsBuilder()

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
TimeWindow.Builder

addEndTimeWindowsBuilder(int index)

publicTimeWindow.BuilderaddEndTimeWindowsBuilder(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
TimeWindow.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicVehicle.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Vehicle.Builder
Overrides

addStartLoadIntervals(CapacityQuantityInterval value) (deprecated)

publicVehicle.BuilderaddStartLoadIntervals(CapacityQuantityIntervalvalue)

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

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

Parameter
Name Description
value CapacityQuantityInterval
Returns
Type Description
Vehicle.Builder

addStartLoadIntervals(CapacityQuantityInterval.Builder builderForValue) (deprecated)

publicVehicle.BuilderaddStartLoadIntervals(CapacityQuantityInterval.BuilderbuilderForValue)

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

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

Parameter
Name Description
builderForValue CapacityQuantityInterval.Builder
Returns
Type Description
Vehicle.Builder

addStartLoadIntervals(int index, CapacityQuantityInterval value) (deprecated)

publicVehicle.BuilderaddStartLoadIntervals(intindex,CapacityQuantityIntervalvalue)

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

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

Parameters
Name Description
index int
value CapacityQuantityInterval
Returns
Type Description
Vehicle.Builder

addStartLoadIntervals(int index, CapacityQuantityInterval.Builder builderForValue) (deprecated)

publicVehicle.BuilderaddStartLoadIntervals(intindex,CapacityQuantityInterval.BuilderbuilderForValue)

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

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

Parameters
Name Description
index int
builderForValue CapacityQuantityInterval.Builder
Returns
Type Description
Vehicle.Builder

addStartLoadIntervalsBuilder() (deprecated)

publicCapacityQuantityInterval.BuilderaddStartLoadIntervalsBuilder()

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

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

Returns
Type Description
CapacityQuantityInterval.Builder

addStartLoadIntervalsBuilder(int index) (deprecated)

publicCapacityQuantityInterval.BuilderaddStartLoadIntervalsBuilder(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
CapacityQuantityInterval.Builder

addStartTags(String value)

publicVehicle.BuilderaddStartTags(Stringvalue)

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
value String

The startTags to add.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

addStartTagsBytes(ByteString value)

publicVehicle.BuilderaddStartTagsBytes(ByteStringvalue)

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
value ByteString

The bytes of the startTags to add.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

addStartTimeWindows(TimeWindow value)

publicVehicle.BuilderaddStartTimeWindows(TimeWindowvalue)

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
value TimeWindow
Returns
Type Description
Vehicle.Builder

addStartTimeWindows(TimeWindow.Builder builderForValue)

publicVehicle.BuilderaddStartTimeWindows(TimeWindow.BuilderbuilderForValue)

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
builderForValue TimeWindow.Builder
Returns
Type Description
Vehicle.Builder

addStartTimeWindows(int index, TimeWindow value)

publicVehicle.BuilderaddStartTimeWindows(intindex,TimeWindowvalue)

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;

Parameters
Name Description
index int
value TimeWindow
Returns
Type Description
Vehicle.Builder

addStartTimeWindows(int index, TimeWindow.Builder builderForValue)

publicVehicle.BuilderaddStartTimeWindows(intindex,TimeWindow.BuilderbuilderForValue)

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;

Parameters
Name Description
index int
builderForValue TimeWindow.Builder
Returns
Type Description
Vehicle.Builder

addStartTimeWindowsBuilder()

publicTimeWindow.BuilderaddStartTimeWindowsBuilder()

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
TimeWindow.Builder

addStartTimeWindowsBuilder(int index)

publicTimeWindow.BuilderaddStartTimeWindowsBuilder(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
TimeWindow.Builder

build()

publicVehiclebuild()
Returns
Type Description
Vehicle

buildPartial()

publicVehiclebuildPartial()
Returns
Type Description
Vehicle

clear()

publicVehicle.Builderclear()
Returns
Type Description
Vehicle.Builder
Overrides

clearBreakRule()

publicVehicle.BuilderclearBreakRule()

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
Vehicle.Builder

clearBreakRuleIndices() (deprecated)

publicVehicle.BuilderclearBreakRuleIndices()

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

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
Vehicle.Builder

This builder for chaining.

clearCapacities() (deprecated)

publicVehicle.BuilderclearCapacities()

Deprecated: Use Vehicle.load_limits instead.

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

Returns
Type Description
Vehicle.Builder

clearCostPerHour()

publicVehicle.BuilderclearCostPerHour()

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
Vehicle.Builder

This builder for chaining.

clearCostPerKilometer()

publicVehicle.BuilderclearCostPerKilometer()

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
Vehicle.Builder

This builder for chaining.

clearCostPerTraveledHour()

publicVehicle.BuilderclearCostPerTraveledHour()

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
Vehicle.Builder

This builder for chaining.

clearEndLoadIntervals() (deprecated)

publicVehicle.BuilderclearEndLoadIntervals()

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

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

Returns
Type Description
Vehicle.Builder

clearEndLocation()

publicVehicle.BuilderclearEndLocation()

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
Vehicle.Builder

clearEndTags()

publicVehicle.BuilderclearEndTags()

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
Vehicle.Builder

This builder for chaining.

clearEndTimeWindows()

publicVehicle.BuilderclearEndTimeWindows()

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
Vehicle.Builder

clearEndWaypoint()

publicVehicle.BuilderclearEndWaypoint()

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
Vehicle.Builder

clearExtraVisitDurationForVisitType()

publicVehicle.BuilderclearExtraVisitDurationForVisitType()
Returns
Type Description
Vehicle.Builder

clearField(Descriptors.FieldDescriptor field)

publicVehicle.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Vehicle.Builder
Overrides

clearFixedCost()

publicVehicle.BuilderclearFixedCost()

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

double fixed_cost = 19;

Returns
Type Description
Vehicle.Builder

This builder for chaining.

clearIgnore()

publicVehicle.BuilderclearIgnore()

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
Vehicle.Builder

This builder for chaining.

clearLabel()

publicVehicle.BuilderclearLabel()

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
Vehicle.Builder

This builder for chaining.

clearLoadLimits()

publicVehicle.BuilderclearLoadLimits()
Returns
Type Description
Vehicle.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

publicVehicle.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Vehicle.Builder
Overrides

clearRouteDistanceLimit()

publicVehicle.BuilderclearRouteDistanceLimit()

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
Vehicle.Builder

clearRouteDurationLimit()

publicVehicle.BuilderclearRouteDurationLimit()

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.Builder

clearRouteModifiers()

publicVehicle.BuilderclearRouteModifiers()

Optional. A set of conditions to satisfy that affect the way routes are calculated for the given vehicle.

.google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Vehicle.Builder

clearStartLoadIntervals() (deprecated)

publicVehicle.BuilderclearStartLoadIntervals()

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

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

Returns
Type Description
Vehicle.Builder

clearStartLocation()

publicVehicle.BuilderclearStartLocation()

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
Vehicle.Builder

clearStartTags()

publicVehicle.BuilderclearStartTags()

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
Vehicle.Builder

This builder for chaining.

clearStartTimeWindows()

publicVehicle.BuilderclearStartTimeWindows()

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
Vehicle.Builder

clearStartWaypoint()

publicVehicle.BuilderclearStartWaypoint()

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
Vehicle.Builder

clearTravelDurationLimit()

publicVehicle.BuilderclearTravelDurationLimit()

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.Builder

clearTravelDurationMultiple()

publicVehicle.BuilderclearTravelDurationMultiple()

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
Vehicle.Builder

This builder for chaining.

clearTravelMode()

publicVehicle.BuilderclearTravelMode()

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.Builder

This builder for chaining.

clearUnloadingPolicy()

publicVehicle.BuilderclearUnloadingPolicy()

Unloading policy enforced on the vehicle.

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

Returns
Type Description
Vehicle.Builder

This builder for chaining.

clearUsedIfRouteIsEmpty()

publicVehicle.BuilderclearUsedIfRouteIsEmpty()

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
Vehicle.Builder

This builder for chaining.

clone()

publicVehicle.Builderclone()
Returns
Type Description
Vehicle.Builder
Overrides

containsExtraVisitDurationForVisitType(String key)

publicbooleancontainsExtraVisitDurationForVisitType(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
boolean

containsLoadLimits(String key)

publicbooleancontainsLoadLimits(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
boolean

getBreakRule()

publicBreakRulegetBreakRule()

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.

getBreakRuleBuilder()

publicBreakRule.BuildergetBreakRuleBuilder()

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.Builder

getBreakRuleIndices(int index) (deprecated)

publicintgetBreakRuleIndices(intindex)

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

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)

publicintgetBreakRuleIndicesCount()

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

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)

publicList<Integer>getBreakRuleIndicesList()

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

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()

publicBreakRuleOrBuildergetBreakRuleOrBuilder()

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
BreakRuleOrBuilder

getCapacities(int index) (deprecated)

publicCapacityQuantitygetCapacities(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
CapacityQuantity

getCapacitiesBuilder(int index) (deprecated)

publicCapacityQuantity.BuildergetCapacitiesBuilder(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
CapacityQuantity.Builder

getCapacitiesBuilderList() (deprecated)

publicList<CapacityQuantity.Builder>getCapacitiesBuilderList()

Deprecated: Use Vehicle.load_limits instead.

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

Returns
Type Description
List<Builder>

getCapacitiesCount() (deprecated)

publicintgetCapacitiesCount()

Deprecated: Use Vehicle.load_limits instead.

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

Returns
Type Description
int

getCapacitiesList() (deprecated)

publicList<CapacityQuantity>getCapacitiesList()

Deprecated: Use Vehicle.load_limits instead.

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

Returns
Type Description
List<CapacityQuantity>

getCapacitiesOrBuilder(int index) (deprecated)

publicCapacityQuantityOrBuildergetCapacitiesOrBuilder(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
CapacityQuantityOrBuilder

getCapacitiesOrBuilderList() (deprecated)

publicList<?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()

publicdoublegetCostPerHour()

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()

publicdoublegetCostPerKilometer()

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()

publicdoublegetCostPerTraveledHour()

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.

getDefaultInstanceForType()

publicVehiclegetDefaultInstanceForType()
Returns
Type Description
Vehicle

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEndLoadIntervals(int index) (deprecated)

publicCapacityQuantityIntervalgetEndLoadIntervals(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
CapacityQuantityInterval

getEndLoadIntervalsBuilder(int index) (deprecated)

publicCapacityQuantityInterval.BuildergetEndLoadIntervalsBuilder(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
CapacityQuantityInterval.Builder

getEndLoadIntervalsBuilderList() (deprecated)

publicList<CapacityQuantityInterval.Builder>getEndLoadIntervalsBuilderList()

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

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

Returns
Type Description
List<Builder>

getEndLoadIntervalsCount() (deprecated)

publicintgetEndLoadIntervalsCount()

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() (deprecated)

publicList<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
List<CapacityQuantityInterval>

getEndLoadIntervalsOrBuilder(int index) (deprecated)

publicCapacityQuantityIntervalOrBuildergetEndLoadIntervalsOrBuilder(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
CapacityQuantityIntervalOrBuilder

getEndLoadIntervalsOrBuilderList() (deprecated)

publicList<?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()

publicLatLnggetEndLocation()

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.

getEndLocationBuilder()

publicLatLng.BuildergetEndLocationBuilder()

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.Builder

getEndLocationOrBuilder()

publicLatLngOrBuildergetEndLocationOrBuilder()

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)

publicStringgetEndTags(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)

publicByteStringgetEndTagsBytes(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()

publicintgetEndTagsCount()

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()

publicProtocolStringListgetEndTagsList()

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
ProtocolStringList

A list containing the endTags.

getEndTimeWindows(int index)

publicTimeWindowgetEndTimeWindows(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
TimeWindow

getEndTimeWindowsBuilder(int index)

publicTimeWindow.BuildergetEndTimeWindowsBuilder(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
TimeWindow.Builder

getEndTimeWindowsBuilderList()

publicList<TimeWindow.Builder>getEndTimeWindowsBuilderList()

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<Builder>

getEndTimeWindowsCount()

publicintgetEndTimeWindowsCount()

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()

publicList<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
List<TimeWindow>

getEndTimeWindowsOrBuilder(int index)

publicTimeWindowOrBuildergetEndTimeWindowsOrBuilder(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
TimeWindowOrBuilder

getEndTimeWindowsOrBuilderList()

publicList<?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()

publicWaypointgetEndWaypoint()

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.

getEndWaypointBuilder()

publicWaypoint.BuildergetEndWaypointBuilder()

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.Builder

getEndWaypointOrBuilder()

publicWaypointOrBuildergetEndWaypointOrBuilder()

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
WaypointOrBuilder

getExtraVisitDurationForVisitType() (deprecated)

publicMap<String,Duration>getExtraVisitDurationForVisitType()
Returns
Type Description
Map<String,Duration>

getExtraVisitDurationForVisitTypeCount()

publicintgetExtraVisitDurationForVisitTypeCount()

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()

publicMap<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
Map<String,Duration>

getExtraVisitDurationForVisitTypeOrDefault(String key, Duration defaultValue)

publicDurationgetExtraVisitDurationForVisitTypeOrDefault(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
Duration

getExtraVisitDurationForVisitTypeOrThrow(String key)

publicDurationgetExtraVisitDurationForVisitTypeOrThrow(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
Duration

getFixedCost()

publicdoublegetFixedCost()

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

double fixed_cost = 19;

Returns
Type Description
double

The fixedCost.

getIgnore()

publicbooleangetIgnore()

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()

publicStringgetLabel()

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()

publicByteStringgetLabelBytes()

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() (deprecated)

publicMap<String,Vehicle.LoadLimit>getLoadLimits()

Use #getLoadLimitsMap() instead.

Returns
Type Description
Map<String,LoadLimit>

getLoadLimitsCount()

publicintgetLoadLimitsCount()

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()

publicMap<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
Map<String,LoadLimit>

getLoadLimitsOrDefault(String key, Vehicle.LoadLimit defaultValue)

publicVehicle.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
Vehicle.LoadLimit

getLoadLimitsOrThrow(String key)

publicVehicle.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
Vehicle.LoadLimit

getMutableExtraVisitDurationForVisitType() (deprecated)

publicMap<String,Duration>getMutableExtraVisitDurationForVisitType()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,Duration>

getMutableLoadLimits() (deprecated)

publicMap<String,Vehicle.LoadLimit>getMutableLoadLimits()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,LoadLimit>

getRouteDistanceLimit()

publicDistanceLimitgetRouteDistanceLimit()

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.

getRouteDistanceLimitBuilder()

publicDistanceLimit.BuildergetRouteDistanceLimitBuilder()

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.Builder

getRouteDistanceLimitOrBuilder()

publicDistanceLimitOrBuildergetRouteDistanceLimitOrBuilder()

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
DistanceLimitOrBuilder

getRouteDurationLimit()

publicVehicle.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.

getRouteDurationLimitBuilder()

publicVehicle.DurationLimit.BuildergetRouteDurationLimitBuilder()

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.Builder

getRouteDurationLimitOrBuilder()

publicVehicle.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
Vehicle.DurationLimitOrBuilder

getRouteModifiers()

publicRouteModifiersgetRouteModifiers()

Optional. A set of conditions to satisfy that affect the way routes are calculated for the given vehicle.

.google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
RouteModifiers

The routeModifiers.

getRouteModifiersBuilder()

publicRouteModifiers.BuildergetRouteModifiersBuilder()

Optional. A set of conditions to satisfy that affect the way routes are calculated for the given vehicle.

.google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
RouteModifiers.Builder

getRouteModifiersOrBuilder()

publicRouteModifiersOrBuildergetRouteModifiersOrBuilder()

Optional. A set of conditions to satisfy that affect the way routes are calculated for the given vehicle.

.google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
RouteModifiersOrBuilder

getStartLoadIntervals(int index) (deprecated)

publicCapacityQuantityIntervalgetStartLoadIntervals(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
CapacityQuantityInterval

getStartLoadIntervalsBuilder(int index) (deprecated)

publicCapacityQuantityInterval.BuildergetStartLoadIntervalsBuilder(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
CapacityQuantityInterval.Builder

getStartLoadIntervalsBuilderList() (deprecated)

publicList<CapacityQuantityInterval.Builder>getStartLoadIntervalsBuilderList()

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

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

Returns
Type Description
List<Builder>

getStartLoadIntervalsCount() (deprecated)

publicintgetStartLoadIntervalsCount()

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() (deprecated)

publicList<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
List<CapacityQuantityInterval>

getStartLoadIntervalsOrBuilder(int index) (deprecated)

publicCapacityQuantityIntervalOrBuildergetStartLoadIntervalsOrBuilder(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
CapacityQuantityIntervalOrBuilder

getStartLoadIntervalsOrBuilderList() (deprecated)

publicList<?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()

publicLatLnggetStartLocation()

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.

getStartLocationBuilder()

publicLatLng.BuildergetStartLocationBuilder()

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.Builder

getStartLocationOrBuilder()

publicLatLngOrBuildergetStartLocationOrBuilder()

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)

publicStringgetStartTags(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)

publicByteStringgetStartTagsBytes(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()

publicintgetStartTagsCount()

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()

publicProtocolStringListgetStartTagsList()

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
ProtocolStringList

A list containing the startTags.

getStartTimeWindows(int index)

publicTimeWindowgetStartTimeWindows(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
TimeWindow

getStartTimeWindowsBuilder(int index)

publicTimeWindow.BuildergetStartTimeWindowsBuilder(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
TimeWindow.Builder

getStartTimeWindowsBuilderList()

publicList<TimeWindow.Builder>getStartTimeWindowsBuilderList()

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<Builder>

getStartTimeWindowsCount()

publicintgetStartTimeWindowsCount()

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()

publicList<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
List<TimeWindow>

getStartTimeWindowsOrBuilder(int index)

publicTimeWindowOrBuildergetStartTimeWindowsOrBuilder(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
TimeWindowOrBuilder

getStartTimeWindowsOrBuilderList()

publicList<?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()

publicWaypointgetStartWaypoint()

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.

getStartWaypointBuilder()

publicWaypoint.BuildergetStartWaypointBuilder()

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.Builder

getStartWaypointOrBuilder()

publicWaypointOrBuildergetStartWaypointOrBuilder()

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
WaypointOrBuilder

getTravelDurationLimit()

publicVehicle.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.

getTravelDurationLimitBuilder()

publicVehicle.DurationLimit.BuildergetTravelDurationLimitBuilder()

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.Builder

getTravelDurationLimitOrBuilder()

publicVehicle.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
Vehicle.DurationLimitOrBuilder

getTravelDurationMultiple()

publicdoublegetTravelDurationMultiple()

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()

publicVehicle.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()

publicintgetTravelModeValue()

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()

publicVehicle.UnloadingPolicygetUnloadingPolicy()

Unloading policy enforced on the vehicle.

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

Returns
Type Description
Vehicle.UnloadingPolicy

The unloadingPolicy.

getUnloadingPolicyValue()

publicintgetUnloadingPolicyValue()

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()

publicbooleangetUsedIfRouteIsEmpty()

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()

publicbooleanhasBreakRule()

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()

publicbooleanhasEndLocation()

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()

publicbooleanhasEndWaypoint()

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()

publicbooleanhasRouteDistanceLimit()

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()

publicbooleanhasRouteDurationLimit()

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.

hasRouteModifiers()

publicbooleanhasRouteModifiers()

Optional. A set of conditions to satisfy that affect the way routes are calculated for the given vehicle.

.google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the routeModifiers field is set.

hasStartLocation()

publicbooleanhasStartLocation()

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()

publicbooleanhasStartWaypoint()

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()

publicbooleanhasTravelDurationLimit()

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()

publicbooleanhasTravelDurationMultiple()

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.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

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

internalGetMutableMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMutableMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeBreakRule(BreakRule value)

publicVehicle.BuildermergeBreakRule(BreakRulevalue)

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;

Parameter
Name Description
value BreakRule
Returns
Type Description
Vehicle.Builder

mergeEndLocation(LatLng value)

publicVehicle.BuildermergeEndLocation(LatLngvalue)

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;

Parameter
Name Description
value com.google.type.LatLng
Returns
Type Description
Vehicle.Builder

mergeEndWaypoint(Waypoint value)

publicVehicle.BuildermergeEndWaypoint(Waypointvalue)

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;

Parameter
Name Description
value Waypoint
Returns
Type Description
Vehicle.Builder

mergeFrom(Vehicle other)

publicVehicle.BuildermergeFrom(Vehicleother)
Parameter
Name Description
other Vehicle
Returns
Type Description
Vehicle.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicVehicle.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Vehicle.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicVehicle.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Vehicle.Builder
Overrides

mergeRouteDistanceLimit(DistanceLimit value)

publicVehicle.BuildermergeRouteDistanceLimit(DistanceLimitvalue)

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;

Parameter
Name Description
value DistanceLimit
Returns
Type Description
Vehicle.Builder

mergeRouteDurationLimit(Vehicle.DurationLimit value)

publicVehicle.BuildermergeRouteDurationLimit(Vehicle.DurationLimitvalue)

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;

Parameter
Name Description
value Vehicle.DurationLimit
Returns
Type Description
Vehicle.Builder

mergeRouteModifiers(RouteModifiers value)

publicVehicle.BuildermergeRouteModifiers(RouteModifiersvalue)

Optional. A set of conditions to satisfy that affect the way routes are calculated for the given vehicle.

.google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value RouteModifiers
Returns
Type Description
Vehicle.Builder

mergeStartLocation(LatLng value)

publicVehicle.BuildermergeStartLocation(LatLngvalue)

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;

Parameter
Name Description
value com.google.type.LatLng
Returns
Type Description
Vehicle.Builder

mergeStartWaypoint(Waypoint value)

publicVehicle.BuildermergeStartWaypoint(Waypointvalue)

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;

Parameter
Name Description
value Waypoint
Returns
Type Description
Vehicle.Builder

mergeTravelDurationLimit(Vehicle.DurationLimit value)

publicVehicle.BuildermergeTravelDurationLimit(Vehicle.DurationLimitvalue)

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;

Parameter
Name Description
value Vehicle.DurationLimit
Returns
Type Description
Vehicle.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalVehicle.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Vehicle.Builder
Overrides

putAllExtraVisitDurationForVisitType(Map<String,Duration> values)

publicVehicle.BuilderputAllExtraVisitDurationForVisitType(Map<String,Duration>values)

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
values Map<String,Duration>
Returns
Type Description
Vehicle.Builder

putAllLoadLimits(Map<String,Vehicle.LoadLimit> values)

publicVehicle.BuilderputAllLoadLimits(Map<String,Vehicle.LoadLimit>values)

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
values Map<String,LoadLimit>
Returns
Type Description
Vehicle.Builder

putExtraVisitDurationForVisitType(String key, Duration value)

publicVehicle.BuilderputExtraVisitDurationForVisitType(Stringkey,Durationvalue)

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
value Duration
Returns
Type Description
Vehicle.Builder

putExtraVisitDurationForVisitTypeBuilderIfAbsent(String key)

publicDuration.BuilderputExtraVisitDurationForVisitTypeBuilderIfAbsent(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
Builder

putLoadLimits(String key, Vehicle.LoadLimit value)

publicVehicle.BuilderputLoadLimits(Stringkey,Vehicle.LoadLimitvalue)

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
value Vehicle.LoadLimit
Returns
Type Description
Vehicle.Builder

putLoadLimitsBuilderIfAbsent(String key)

publicVehicle.LoadLimit.BuilderputLoadLimitsBuilderIfAbsent(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
Vehicle.LoadLimit.Builder

removeCapacities(int index) (deprecated)

publicVehicle.BuilderremoveCapacities(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
Vehicle.Builder

removeEndLoadIntervals(int index) (deprecated)

publicVehicle.BuilderremoveEndLoadIntervals(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
Vehicle.Builder

removeEndTimeWindows(int index)

publicVehicle.BuilderremoveEndTimeWindows(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
Vehicle.Builder

removeExtraVisitDurationForVisitType(String key)

publicVehicle.BuilderremoveExtraVisitDurationForVisitType(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
Vehicle.Builder

removeLoadLimits(String key)

publicVehicle.BuilderremoveLoadLimits(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
Vehicle.Builder

removeStartLoadIntervals(int index) (deprecated)

publicVehicle.BuilderremoveStartLoadIntervals(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
Vehicle.Builder

removeStartTimeWindows(int index)

publicVehicle.BuilderremoveStartTimeWindows(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
Vehicle.Builder

setBreakRule(BreakRule value)

publicVehicle.BuildersetBreakRule(BreakRulevalue)

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;

Parameter
Name Description
value BreakRule
Returns
Type Description
Vehicle.Builder

setBreakRule(BreakRule.Builder builderForValue)

publicVehicle.BuildersetBreakRule(BreakRule.BuilderbuilderForValue)

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;

Parameter
Name Description
builderForValue BreakRule.Builder
Returns
Type Description
Vehicle.Builder

setBreakRuleIndices(int index, int value) (deprecated)

publicVehicle.BuildersetBreakRuleIndices(intindex,intvalue)

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

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];

Parameters
Name Description
index int

The index to set the value at.

value int

The breakRuleIndices to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setCapacities(int index, CapacityQuantity value) (deprecated)

publicVehicle.BuildersetCapacities(intindex,CapacityQuantityvalue)

Deprecated: Use Vehicle.load_limits instead.

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

Parameters
Name Description
index int
value CapacityQuantity
Returns
Type Description
Vehicle.Builder

setCapacities(int index, CapacityQuantity.Builder builderForValue) (deprecated)

publicVehicle.BuildersetCapacities(intindex,CapacityQuantity.BuilderbuilderForValue)

Deprecated: Use Vehicle.load_limits instead.

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

Parameters
Name Description
index int
builderForValue CapacityQuantity.Builder
Returns
Type Description
Vehicle.Builder

setCostPerHour(double value)

publicVehicle.BuildersetCostPerHour(doublevalue)

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;

Parameter
Name Description
value double

The costPerHour to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setCostPerKilometer(double value)

publicVehicle.BuildersetCostPerKilometer(doublevalue)

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;

Parameter
Name Description
value double

The costPerKilometer to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setCostPerTraveledHour(double value)

publicVehicle.BuildersetCostPerTraveledHour(doublevalue)

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;

Parameter
Name Description
value double

The costPerTraveledHour to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setEndLoadIntervals(int index, CapacityQuantityInterval value) (deprecated)

publicVehicle.BuildersetEndLoadIntervals(intindex,CapacityQuantityIntervalvalue)

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

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

Parameters
Name Description
index int
value CapacityQuantityInterval
Returns
Type Description
Vehicle.Builder

setEndLoadIntervals(int index, CapacityQuantityInterval.Builder builderForValue) (deprecated)

publicVehicle.BuildersetEndLoadIntervals(intindex,CapacityQuantityInterval.BuilderbuilderForValue)

Deprecated: Use Vehicle.LoadLimit.end_load_interval instead.

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

Parameters
Name Description
index int
builderForValue CapacityQuantityInterval.Builder
Returns
Type Description
Vehicle.Builder

setEndLocation(LatLng value)

publicVehicle.BuildersetEndLocation(LatLngvalue)

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;

Parameter
Name Description
value com.google.type.LatLng
Returns
Type Description
Vehicle.Builder

setEndLocation(LatLng.Builder builderForValue)

publicVehicle.BuildersetEndLocation(LatLng.BuilderbuilderForValue)

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;

Parameter
Name Description
builderForValue com.google.type.LatLng.Builder
Returns
Type Description
Vehicle.Builder

setEndTags(int index, String value)

publicVehicle.BuildersetEndTags(intindex,Stringvalue)

Specifies tags attached to the end of the vehicle's route.

Empty or duplicate strings are not allowed.

repeated string end_tags = 8;

Parameters
Name Description
index int

The index to set the value at.

value String

The endTags to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setEndTimeWindows(int index, TimeWindow value)

publicVehicle.BuildersetEndTimeWindows(intindex,TimeWindowvalue)

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;

Parameters
Name Description
index int
value TimeWindow
Returns
Type Description
Vehicle.Builder

setEndTimeWindows(int index, TimeWindow.Builder builderForValue)

publicVehicle.BuildersetEndTimeWindows(intindex,TimeWindow.BuilderbuilderForValue)

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;

Parameters
Name Description
index int
builderForValue TimeWindow.Builder
Returns
Type Description
Vehicle.Builder

setEndWaypoint(Waypoint value)

publicVehicle.BuildersetEndWaypoint(Waypointvalue)

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;

Parameter
Name Description
value Waypoint
Returns
Type Description
Vehicle.Builder

setEndWaypoint(Waypoint.Builder builderForValue)

publicVehicle.BuildersetEndWaypoint(Waypoint.BuilderbuilderForValue)

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;

Parameter
Name Description
builderForValue Waypoint.Builder
Returns
Type Description
Vehicle.Builder

setField(Descriptors.FieldDescriptor field, Object value)

publicVehicle.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Vehicle.Builder
Overrides

setFixedCost(double value)

publicVehicle.BuildersetFixedCost(doublevalue)

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

double fixed_cost = 19;

Parameter
Name Description
value double

The fixedCost to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setIgnore(boolean value)

publicVehicle.BuildersetIgnore(booleanvalue)

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;

Parameter
Name Description
value boolean

The ignore to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setLabel(String value)

publicVehicle.BuildersetLabel(Stringvalue)

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

string label = 27;

Parameter
Name Description
value String

The label to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setLabelBytes(ByteString value)

publicVehicle.BuildersetLabelBytes(ByteStringvalue)

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

string label = 27;

Parameter
Name Description
value ByteString

The bytes for label to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicVehicle.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Vehicle.Builder
Overrides

setRouteDistanceLimit(DistanceLimit value)

publicVehicle.BuildersetRouteDistanceLimit(DistanceLimitvalue)

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;

Parameter
Name Description
value DistanceLimit
Returns
Type Description
Vehicle.Builder

setRouteDistanceLimit(DistanceLimit.Builder builderForValue)

publicVehicle.BuildersetRouteDistanceLimit(DistanceLimit.BuilderbuilderForValue)

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;

Parameter
Name Description
builderForValue DistanceLimit.Builder
Returns
Type Description
Vehicle.Builder

setRouteDurationLimit(Vehicle.DurationLimit value)

publicVehicle.BuildersetRouteDurationLimit(Vehicle.DurationLimitvalue)

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;

Parameter
Name Description
value Vehicle.DurationLimit
Returns
Type Description
Vehicle.Builder

setRouteDurationLimit(Vehicle.DurationLimit.Builder builderForValue)

publicVehicle.BuildersetRouteDurationLimit(Vehicle.DurationLimit.BuilderbuilderForValue)

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;

Parameter
Name Description
builderForValue Vehicle.DurationLimit.Builder
Returns
Type Description
Vehicle.Builder

setRouteModifiers(RouteModifiers value)

publicVehicle.BuildersetRouteModifiers(RouteModifiersvalue)

Optional. A set of conditions to satisfy that affect the way routes are calculated for the given vehicle.

.google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value RouteModifiers
Returns
Type Description
Vehicle.Builder

setRouteModifiers(RouteModifiers.Builder builderForValue)

publicVehicle.BuildersetRouteModifiers(RouteModifiers.BuilderbuilderForValue)

Optional. A set of conditions to satisfy that affect the way routes are calculated for the given vehicle.

.google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue RouteModifiers.Builder
Returns
Type Description
Vehicle.Builder

setStartLoadIntervals(int index, CapacityQuantityInterval value) (deprecated)

publicVehicle.BuildersetStartLoadIntervals(intindex,CapacityQuantityIntervalvalue)

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

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

Parameters
Name Description
index int
value CapacityQuantityInterval
Returns
Type Description
Vehicle.Builder

setStartLoadIntervals(int index, CapacityQuantityInterval.Builder builderForValue) (deprecated)

publicVehicle.BuildersetStartLoadIntervals(intindex,CapacityQuantityInterval.BuilderbuilderForValue)

Deprecated: Use Vehicle.LoadLimit.start_load_interval instead.

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

Parameters
Name Description
index int
builderForValue CapacityQuantityInterval.Builder
Returns
Type Description
Vehicle.Builder

setStartLocation(LatLng value)

publicVehicle.BuildersetStartLocation(LatLngvalue)

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;

Parameter
Name Description
value com.google.type.LatLng
Returns
Type Description
Vehicle.Builder

setStartLocation(LatLng.Builder builderForValue)

publicVehicle.BuildersetStartLocation(LatLng.BuilderbuilderForValue)

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;

Parameter
Name Description
builderForValue com.google.type.LatLng.Builder
Returns
Type Description
Vehicle.Builder

setStartTags(int index, String value)

publicVehicle.BuildersetStartTags(intindex,Stringvalue)

Specifies tags attached to the start of the vehicle's route.

Empty or duplicate strings are not allowed.

repeated string start_tags = 7;

Parameters
Name Description
index int

The index to set the value at.

value String

The startTags to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setStartTimeWindows(int index, TimeWindow value)

publicVehicle.BuildersetStartTimeWindows(intindex,TimeWindowvalue)

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;

Parameters
Name Description
index int
value TimeWindow
Returns
Type Description
Vehicle.Builder

setStartTimeWindows(int index, TimeWindow.Builder builderForValue)

publicVehicle.BuildersetStartTimeWindows(intindex,TimeWindow.BuilderbuilderForValue)

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;

Parameters
Name Description
index int
builderForValue TimeWindow.Builder
Returns
Type Description
Vehicle.Builder

setStartWaypoint(Waypoint value)

publicVehicle.BuildersetStartWaypoint(Waypointvalue)

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;

Parameter
Name Description
value Waypoint
Returns
Type Description
Vehicle.Builder

setStartWaypoint(Waypoint.Builder builderForValue)

publicVehicle.BuildersetStartWaypoint(Waypoint.BuilderbuilderForValue)

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;

Parameter
Name Description
builderForValue Waypoint.Builder
Returns
Type Description
Vehicle.Builder

setTravelDurationLimit(Vehicle.DurationLimit value)

publicVehicle.BuildersetTravelDurationLimit(Vehicle.DurationLimitvalue)

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;

Parameter
Name Description
value Vehicle.DurationLimit
Returns
Type Description
Vehicle.Builder

setTravelDurationLimit(Vehicle.DurationLimit.Builder builderForValue)

publicVehicle.BuildersetTravelDurationLimit(Vehicle.DurationLimit.BuilderbuilderForValue)

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;

Parameter
Name Description
builderForValue Vehicle.DurationLimit.Builder
Returns
Type Description
Vehicle.Builder

setTravelDurationMultiple(double value)

publicVehicle.BuildersetTravelDurationMultiple(doublevalue)

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;

Parameter
Name Description
value double

The travelDurationMultiple to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setTravelMode(Vehicle.TravelMode value)

publicVehicle.BuildersetTravelMode(Vehicle.TravelModevalue)

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;

Parameter
Name Description
value Vehicle.TravelMode

The travelMode to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setTravelModeValue(int value)

publicVehicle.BuildersetTravelModeValue(intvalue)

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;

Parameter
Name Description
value int

The enum numeric value on the wire for travelMode to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalVehicle.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Vehicle.Builder
Overrides

setUnloadingPolicy(Vehicle.UnloadingPolicy value)

publicVehicle.BuildersetUnloadingPolicy(Vehicle.UnloadingPolicyvalue)

Unloading policy enforced on the vehicle.

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

Parameter
Name Description
value Vehicle.UnloadingPolicy

The unloadingPolicy to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setUnloadingPolicyValue(int value)

publicVehicle.BuildersetUnloadingPolicyValue(intvalue)

Unloading policy enforced on the vehicle.

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

Parameter
Name Description
value int

The enum numeric value on the wire for unloadingPolicy to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

setUsedIfRouteIsEmpty(boolean value)

publicVehicle.BuildersetUsedIfRouteIsEmpty(booleanvalue)

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;

Parameter
Name Description
value boolean

The usedIfRouteIsEmpty to set.

Returns
Type Description
Vehicle.Builder

This builder for chaining.

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.