- 1.51.0 (latest)
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.14
- 0.1.2
public static final class Vehicle.Builder extends GeneratedMessageV3.Builder<Vehicle.Builder> implements VehicleOrBuilder
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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Vehicle.BuilderImplements
VehicleOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addAllBreakRuleIndices(Iterable<? extends Integer> values)
public Vehicle.Builder addAllBreakRuleIndices(Iterable<? extends Integer> values)
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];
Name | Description |
values | Iterable<? extends java.lang.Integer> The breakRuleIndices to add. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
addAllCapacities(Iterable<? extends CapacityQuantity> values)
public Vehicle.Builder addAllCapacities(Iterable<? extends CapacityQuantity> values)
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Name | Description |
values | Iterable<? extends com.google.cloud.optimization.v1.CapacityQuantity> |
Type | Description |
Vehicle.Builder |
addAllEndLoadIntervals(Iterable<? extends CapacityQuantityInterval> values)
public Vehicle.Builder addAllEndLoadIntervals(Iterable<? extends CapacityQuantityInterval> values)
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Name | Description |
values | Iterable<? extends com.google.cloud.optimization.v1.CapacityQuantityInterval> |
Type | Description |
Vehicle.Builder |
addAllEndTags(Iterable<String> values)
public Vehicle.Builder addAllEndTags(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;
Name | Description |
values | Iterable<String> The endTags to add. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
addAllEndTimeWindows(Iterable<? extends TimeWindow> values)
public Vehicle.Builder addAllEndTimeWindows(Iterable<? extends TimeWindow> 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;
Name | Description |
values | Iterable<? extends com.google.cloud.optimization.v1.TimeWindow> |
Type | Description |
Vehicle.Builder |
addAllStartLoadIntervals(Iterable<? extends CapacityQuantityInterval> values)
public Vehicle.Builder addAllStartLoadIntervals(Iterable<? extends CapacityQuantityInterval> values)
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Name | Description |
values | Iterable<? extends com.google.cloud.optimization.v1.CapacityQuantityInterval> |
Type | Description |
Vehicle.Builder |
addAllStartTags(Iterable<String> values)
public Vehicle.Builder addAllStartTags(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;
Name | Description |
values | Iterable<String> The startTags to add. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
addAllStartTimeWindows(Iterable<? extends TimeWindow> values)
public Vehicle.Builder addAllStartTimeWindows(Iterable<? extends TimeWindow> 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;
Name | Description |
values | Iterable<? extends com.google.cloud.optimization.v1.TimeWindow> |
Type | Description |
Vehicle.Builder |
addBreakRuleIndices(int value)
public Vehicle.Builder addBreakRuleIndices(int value)
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];
Name | Description |
value | int The breakRuleIndices to add. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
addCapacities(CapacityQuantity value)
public Vehicle.Builder addCapacities(CapacityQuantity value)
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Name | Description |
value | CapacityQuantity |
Type | Description |
Vehicle.Builder |
addCapacities(CapacityQuantity.Builder builderForValue)
public Vehicle.Builder addCapacities(CapacityQuantity.Builder builderForValue)
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Name | Description |
builderForValue | CapacityQuantity.Builder |
Type | Description |
Vehicle.Builder |
addCapacities(int index, CapacityQuantity value)
public Vehicle.Builder addCapacities(int index, CapacityQuantity value)
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Name | Description |
index | int |
value | CapacityQuantity |
Type | Description |
Vehicle.Builder |
addCapacities(int index, CapacityQuantity.Builder builderForValue)
public Vehicle.Builder addCapacities(int index, CapacityQuantity.Builder builderForValue)
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Name | Description |
index | int |
builderForValue | CapacityQuantity.Builder |
Type | Description |
Vehicle.Builder |
addCapacitiesBuilder()
public CapacityQuantity.Builder addCapacitiesBuilder()
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Type | Description |
CapacityQuantity.Builder |
addCapacitiesBuilder(int index)
public CapacityQuantity.Builder addCapacitiesBuilder(int index)
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Name | Description |
index | int |
Type | Description |
CapacityQuantity.Builder |
addEndLoadIntervals(CapacityQuantityInterval value)
public Vehicle.Builder addEndLoadIntervals(CapacityQuantityInterval value)
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Name | Description |
value | CapacityQuantityInterval |
Type | Description |
Vehicle.Builder |
addEndLoadIntervals(CapacityQuantityInterval.Builder builderForValue)
public Vehicle.Builder addEndLoadIntervals(CapacityQuantityInterval.Builder builderForValue)
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Name | Description |
builderForValue | CapacityQuantityInterval.Builder |
Type | Description |
Vehicle.Builder |
addEndLoadIntervals(int index, CapacityQuantityInterval value)
public Vehicle.Builder addEndLoadIntervals(int index, CapacityQuantityInterval value)
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Name | Description |
index | int |
value | CapacityQuantityInterval |
Type | Description |
Vehicle.Builder |
addEndLoadIntervals(int index, CapacityQuantityInterval.Builder builderForValue)
public Vehicle.Builder addEndLoadIntervals(int index, CapacityQuantityInterval.Builder builderForValue)
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Name | Description |
index | int |
builderForValue | CapacityQuantityInterval.Builder |
Type | Description |
Vehicle.Builder |
addEndLoadIntervalsBuilder()
public CapacityQuantityInterval.Builder addEndLoadIntervalsBuilder()
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Type | Description |
CapacityQuantityInterval.Builder |
addEndLoadIntervalsBuilder(int index)
public CapacityQuantityInterval.Builder addEndLoadIntervalsBuilder(int index)
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Name | Description |
index | int |
Type | Description |
CapacityQuantityInterval.Builder |
addEndTags(String value)
public Vehicle.Builder addEndTags(String value)
Specifies tags attached to the end of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string end_tags = 8;
Name | Description |
value | String The endTags to add. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
addEndTagsBytes(ByteString value)
public Vehicle.Builder addEndTagsBytes(ByteString value)
Specifies tags attached to the end of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string end_tags = 8;
Name | Description |
value | ByteString The bytes of the endTags to add. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
addEndTimeWindows(TimeWindow value)
public Vehicle.Builder addEndTimeWindows(TimeWindow value)
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;
Name | Description |
value | TimeWindow |
Type | Description |
Vehicle.Builder |
addEndTimeWindows(TimeWindow.Builder builderForValue)
public Vehicle.Builder addEndTimeWindows(TimeWindow.Builder builderForValue)
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;
Name | Description |
builderForValue | TimeWindow.Builder |
Type | Description |
Vehicle.Builder |
addEndTimeWindows(int index, TimeWindow value)
public Vehicle.Builder addEndTimeWindows(int index, TimeWindow value)
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;
Name | Description |
index | int |
value | TimeWindow |
Type | Description |
Vehicle.Builder |
addEndTimeWindows(int index, TimeWindow.Builder builderForValue)
public Vehicle.Builder addEndTimeWindows(int index, TimeWindow.Builder builderForValue)
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;
Name | Description |
index | int |
builderForValue | TimeWindow.Builder |
Type | Description |
Vehicle.Builder |
addEndTimeWindowsBuilder()
public TimeWindow.Builder addEndTimeWindowsBuilder()
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;
Type | Description |
TimeWindow.Builder |
addEndTimeWindowsBuilder(int index)
public TimeWindow.Builder addEndTimeWindowsBuilder(int index)
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;
Name | Description |
index | int |
Type | Description |
TimeWindow.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Vehicle.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Vehicle.Builder |
addStartLoadIntervals(CapacityQuantityInterval value)
public Vehicle.Builder addStartLoadIntervals(CapacityQuantityInterval value)
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Name | Description |
value | CapacityQuantityInterval |
Type | Description |
Vehicle.Builder |
addStartLoadIntervals(CapacityQuantityInterval.Builder builderForValue)
public Vehicle.Builder addStartLoadIntervals(CapacityQuantityInterval.Builder builderForValue)
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Name | Description |
builderForValue | CapacityQuantityInterval.Builder |
Type | Description |
Vehicle.Builder |
addStartLoadIntervals(int index, CapacityQuantityInterval value)
public Vehicle.Builder addStartLoadIntervals(int index, CapacityQuantityInterval value)
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Name | Description |
index | int |
value | CapacityQuantityInterval |
Type | Description |
Vehicle.Builder |
addStartLoadIntervals(int index, CapacityQuantityInterval.Builder builderForValue)
public Vehicle.Builder addStartLoadIntervals(int index, CapacityQuantityInterval.Builder builderForValue)
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Name | Description |
index | int |
builderForValue | CapacityQuantityInterval.Builder |
Type | Description |
Vehicle.Builder |
addStartLoadIntervalsBuilder()
public CapacityQuantityInterval.Builder addStartLoadIntervalsBuilder()
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Type | Description |
CapacityQuantityInterval.Builder |
addStartLoadIntervalsBuilder(int index)
public CapacityQuantityInterval.Builder addStartLoadIntervalsBuilder(int index)
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Name | Description |
index | int |
Type | Description |
CapacityQuantityInterval.Builder |
addStartTags(String value)
public Vehicle.Builder addStartTags(String value)
Specifies tags attached to the start of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string start_tags = 7;
Name | Description |
value | String The startTags to add. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
addStartTagsBytes(ByteString value)
public Vehicle.Builder addStartTagsBytes(ByteString value)
Specifies tags attached to the start of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string start_tags = 7;
Name | Description |
value | ByteString The bytes of the startTags to add. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
addStartTimeWindows(TimeWindow value)
public Vehicle.Builder addStartTimeWindows(TimeWindow value)
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;
Name | Description |
value | TimeWindow |
Type | Description |
Vehicle.Builder |
addStartTimeWindows(TimeWindow.Builder builderForValue)
public Vehicle.Builder addStartTimeWindows(TimeWindow.Builder builderForValue)
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;
Name | Description |
builderForValue | TimeWindow.Builder |
Type | Description |
Vehicle.Builder |
addStartTimeWindows(int index, TimeWindow value)
public Vehicle.Builder addStartTimeWindows(int index, TimeWindow value)
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;
Name | Description |
index | int |
value | TimeWindow |
Type | Description |
Vehicle.Builder |
addStartTimeWindows(int index, TimeWindow.Builder builderForValue)
public Vehicle.Builder addStartTimeWindows(int index, TimeWindow.Builder builderForValue)
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;
Name | Description |
index | int |
builderForValue | TimeWindow.Builder |
Type | Description |
Vehicle.Builder |
addStartTimeWindowsBuilder()
public TimeWindow.Builder addStartTimeWindowsBuilder()
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;
Type | Description |
TimeWindow.Builder |
addStartTimeWindowsBuilder(int index)
public TimeWindow.Builder addStartTimeWindowsBuilder(int index)
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;
Name | Description |
index | int |
Type | Description |
TimeWindow.Builder |
build()
public Vehicle build()
Type | Description |
Vehicle |
buildPartial()
public Vehicle buildPartial()
Type | Description |
Vehicle |
clear()
public Vehicle.Builder clear()
Type | Description |
Vehicle.Builder |
clearBreakRule()
public Vehicle.Builder clearBreakRule()
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;
Type | Description |
Vehicle.Builder |
clearBreakRuleIndices()
public Vehicle.Builder clearBreakRuleIndices()
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];
Type | Description |
Vehicle.Builder | This builder for chaining. |
clearCapacities()
public Vehicle.Builder clearCapacities()
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Type | Description |
Vehicle.Builder |
clearCostPerHour()
public Vehicle.Builder clearCostPerHour()
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;
Type | Description |
Vehicle.Builder | This builder for chaining. |
clearCostPerKilometer()
public Vehicle.Builder clearCostPerKilometer()
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;
Type | Description |
Vehicle.Builder | This builder for chaining. |
clearCostPerTraveledHour()
public Vehicle.Builder clearCostPerTraveledHour()
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;
Type | Description |
Vehicle.Builder | This builder for chaining. |
clearEndLoadIntervals()
public Vehicle.Builder clearEndLoadIntervals()
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Type | Description |
Vehicle.Builder |
clearEndLocation()
public Vehicle.Builder clearEndLocation()
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;
Type | Description |
Vehicle.Builder |
clearEndTags()
public Vehicle.Builder clearEndTags()
Specifies tags attached to the end of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string end_tags = 8;
Type | Description |
Vehicle.Builder | This builder for chaining. |
clearEndTimeWindows()
public Vehicle.Builder clearEndTimeWindows()
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;
Type | Description |
Vehicle.Builder |
clearEndWaypoint()
public Vehicle.Builder clearEndWaypoint()
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;
Type | Description |
Vehicle.Builder |
clearExtraVisitDurationForVisitType()
public Vehicle.Builder clearExtraVisitDurationForVisitType()
Type | Description |
Vehicle.Builder |
clearField(Descriptors.FieldDescriptor field)
public Vehicle.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
Vehicle.Builder |
clearFixedCost()
public Vehicle.Builder clearFixedCost()
Fixed cost applied if this vehicle is used to handle a shipment.
double fixed_cost = 19;
Type | Description |
Vehicle.Builder | This builder for chaining. |
clearIgnore()
public Vehicle.Builder clearIgnore()
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;
Type | Description |
Vehicle.Builder | This builder for chaining. |
clearLabel()
public Vehicle.Builder clearLabel()
Specifies a label for this vehicle. This label is reported in the response
as the vehicle_label
of the corresponding ShipmentRoute.
string label = 27;
Type | Description |
Vehicle.Builder | This builder for chaining. |
clearLoadLimits()
public Vehicle.Builder clearLoadLimits()
Type | Description |
Vehicle.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public Vehicle.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
Vehicle.Builder |
clearRouteDistanceLimit()
public Vehicle.Builder clearRouteDistanceLimit()
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;
Type | Description |
Vehicle.Builder |
clearRouteDurationLimit()
public Vehicle.Builder clearRouteDurationLimit()
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;
Type | Description |
Vehicle.Builder |
clearStartLoadIntervals()
public Vehicle.Builder clearStartLoadIntervals()
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Type | Description |
Vehicle.Builder |
clearStartLocation()
public Vehicle.Builder clearStartLocation()
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;
Type | Description |
Vehicle.Builder |
clearStartTags()
public Vehicle.Builder clearStartTags()
Specifies tags attached to the start of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string start_tags = 7;
Type | Description |
Vehicle.Builder | This builder for chaining. |
clearStartTimeWindows()
public Vehicle.Builder clearStartTimeWindows()
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;
Type | Description |
Vehicle.Builder |
clearStartWaypoint()
public Vehicle.Builder clearStartWaypoint()
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;
Type | Description |
Vehicle.Builder |
clearTravelDurationLimit()
public Vehicle.Builder clearTravelDurationLimit()
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;
Type | Description |
Vehicle.Builder |
clearTravelDurationMultiple()
public Vehicle.Builder clearTravelDurationMultiple()
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;
Type | Description |
Vehicle.Builder | This builder for chaining. |
clearTravelMode()
public Vehicle.Builder clearTravelMode()
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;
Type | Description |
Vehicle.Builder | This builder for chaining. |
clearUnloadingPolicy()
public Vehicle.Builder clearUnloadingPolicy()
Unloading policy enforced on the vehicle.
.google.cloud.optimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12;
Type | Description |
Vehicle.Builder | This builder for chaining. |
clearUsedIfRouteIsEmpty()
public Vehicle.Builder clearUsedIfRouteIsEmpty()
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;
Type | Description |
Vehicle.Builder | This builder for chaining. |
clone()
public Vehicle.Builder clone()
Type | Description |
Vehicle.Builder |
containsExtraVisitDurationForVisitType(String key)
public boolean containsExtraVisitDurationForVisitType(String key)
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;
Name | Description |
key | String |
Type | Description |
boolean |
containsLoadLimits(String key)
public boolean containsLoadLimits(String key)
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;
Name | Description |
key | String |
Type | Description |
boolean |
getBreakRule()
public BreakRule getBreakRule()
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;
Type | Description |
BreakRule | The breakRule. |
getBreakRuleBuilder()
public BreakRule.Builder getBreakRuleBuilder()
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;
Type | Description |
BreakRule.Builder |
getBreakRuleIndices(int index)
public int getBreakRuleIndices(int index)
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];
Name | Description |
index | int The index of the element to return. |
Type | Description |
int | The breakRuleIndices at the given index. |
getBreakRuleIndicesCount()
public int getBreakRuleIndicesCount()
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];
Type | Description |
int | The count of breakRuleIndices. |
getBreakRuleIndicesList()
public List<Integer> getBreakRuleIndicesList()
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];
Type | Description |
List<Integer> | A list containing the breakRuleIndices. |
getBreakRuleOrBuilder()
public BreakRuleOrBuilder getBreakRuleOrBuilder()
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;
Type | Description |
BreakRuleOrBuilder |
getCapacities(int index)
public CapacityQuantity getCapacities(int index)
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Name | Description |
index | int |
Type | Description |
CapacityQuantity |
getCapacitiesBuilder(int index)
public CapacityQuantity.Builder getCapacitiesBuilder(int index)
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Name | Description |
index | int |
Type | Description |
CapacityQuantity.Builder |
getCapacitiesBuilderList()
public List<CapacityQuantity.Builder> getCapacitiesBuilderList()
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Type | Description |
List<Builder> |
getCapacitiesCount()
public int getCapacitiesCount()
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Type | Description |
int |
getCapacitiesList()
public List<CapacityQuantity> getCapacitiesList()
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Type | Description |
List<CapacityQuantity> |
getCapacitiesOrBuilder(int index)
public CapacityQuantityOrBuilder getCapacitiesOrBuilder(int index)
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Name | Description |
index | int |
Type | Description |
CapacityQuantityOrBuilder |
getCapacitiesOrBuilderList()
public List<? extends CapacityQuantityOrBuilder> getCapacitiesOrBuilderList()
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Type | Description |
List<? extends com.google.cloud.optimization.v1.CapacityQuantityOrBuilder> |
getCostPerHour()
public double getCostPerHour()
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;
Type | Description |
double | The costPerHour. |
getCostPerKilometer()
public double getCostPerKilometer()
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;
Type | Description |
double | The costPerKilometer. |
getCostPerTraveledHour()
public double getCostPerTraveledHour()
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;
Type | Description |
double | The costPerTraveledHour. |
getDefaultInstanceForType()
public Vehicle getDefaultInstanceForType()
Type | Description |
Vehicle |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getEndLoadIntervals(int index)
public CapacityQuantityInterval getEndLoadIntervals(int index)
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Name | Description |
index | int |
Type | Description |
CapacityQuantityInterval |
getEndLoadIntervalsBuilder(int index)
public CapacityQuantityInterval.Builder getEndLoadIntervalsBuilder(int index)
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Name | Description |
index | int |
Type | Description |
CapacityQuantityInterval.Builder |
getEndLoadIntervalsBuilderList()
public List<CapacityQuantityInterval.Builder> getEndLoadIntervalsBuilderList()
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Type | Description |
List<Builder> |
getEndLoadIntervalsCount()
public int getEndLoadIntervalsCount()
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Type | Description |
int |
getEndLoadIntervalsList()
public List<CapacityQuantityInterval> getEndLoadIntervalsList()
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Type | Description |
List<CapacityQuantityInterval> |
getEndLoadIntervalsOrBuilder(int index)
public CapacityQuantityIntervalOrBuilder getEndLoadIntervalsOrBuilder(int index)
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Name | Description |
index | int |
Type | Description |
CapacityQuantityIntervalOrBuilder |
getEndLoadIntervalsOrBuilderList()
public List<? extends CapacityQuantityIntervalOrBuilder> getEndLoadIntervalsOrBuilderList()
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Type | Description |
List<? extends com.google.cloud.optimization.v1.CapacityQuantityIntervalOrBuilder> |
getEndLocation()
public LatLng getEndLocation()
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;
Type | Description |
com.google.type.LatLng | The endLocation. |
getEndLocationBuilder()
public LatLng.Builder getEndLocationBuilder()
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;
Type | Description |
com.google.type.LatLng.Builder |
getEndLocationOrBuilder()
public LatLngOrBuilder getEndLocationOrBuilder()
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;
Type | Description |
com.google.type.LatLngOrBuilder |
getEndTags(int index)
public String getEndTags(int index)
Specifies tags attached to the end of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string end_tags = 8;
Name | Description |
index | int The index of the element to return. |
Type | Description |
String | The endTags at the given index. |
getEndTagsBytes(int index)
public ByteString getEndTagsBytes(int index)
Specifies tags attached to the end of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string end_tags = 8;
Name | Description |
index | int The index of the value to return. |
Type | Description |
ByteString | The bytes of the endTags at the given index. |
getEndTagsCount()
public int getEndTagsCount()
Specifies tags attached to the end of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string end_tags = 8;
Type | Description |
int | The count of endTags. |
getEndTagsList()
public ProtocolStringList getEndTagsList()
Specifies tags attached to the end of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string end_tags = 8;
Type | Description |
ProtocolStringList | A list containing the endTags. |
getEndTimeWindows(int index)
public TimeWindow getEndTimeWindows(int index)
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;
Name | Description |
index | int |
Type | Description |
TimeWindow |
getEndTimeWindowsBuilder(int index)
public TimeWindow.Builder getEndTimeWindowsBuilder(int index)
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;
Name | Description |
index | int |
Type | Description |
TimeWindow.Builder |
getEndTimeWindowsBuilderList()
public List<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;
Type | Description |
List<Builder> |
getEndTimeWindowsCount()
public int getEndTimeWindowsCount()
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;
Type | Description |
int |
getEndTimeWindowsList()
public List<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;
Type | Description |
List<TimeWindow> |
getEndTimeWindowsOrBuilder(int index)
public TimeWindowOrBuilder getEndTimeWindowsOrBuilder(int index)
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;
Name | Description |
index | int |
Type | Description |
TimeWindowOrBuilder |
getEndTimeWindowsOrBuilderList()
public List<? extends TimeWindowOrBuilder> 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;
Type | Description |
List<? extends com.google.cloud.optimization.v1.TimeWindowOrBuilder> |
getEndWaypoint()
public Waypoint getEndWaypoint()
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;
Type | Description |
Waypoint | The endWaypoint. |
getEndWaypointBuilder()
public Waypoint.Builder getEndWaypointBuilder()
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;
Type | Description |
Waypoint.Builder |
getEndWaypointOrBuilder()
public WaypointOrBuilder getEndWaypointOrBuilder()
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;
Type | Description |
WaypointOrBuilder |
getExtraVisitDurationForVisitType()
public Map<String,Duration> getExtraVisitDurationForVisitType()
Use #getExtraVisitDurationForVisitTypeMap() instead.
Type | Description |
Map<String,Duration> |
getExtraVisitDurationForVisitTypeCount()
public int getExtraVisitDurationForVisitTypeCount()
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;
Type | Description |
int |
getExtraVisitDurationForVisitTypeMap()
public Map<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;
Type | Description |
Map<String,Duration> |
getExtraVisitDurationForVisitTypeOrDefault(String key, Duration defaultValue)
public Duration getExtraVisitDurationForVisitTypeOrDefault(String key, Duration defaultValue)
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;
Name | Description |
key | String |
defaultValue | Duration |
Type | Description |
Duration |
getExtraVisitDurationForVisitTypeOrThrow(String key)
public Duration getExtraVisitDurationForVisitTypeOrThrow(String key)
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;
Name | Description |
key | String |
Type | Description |
Duration |
getFixedCost()
public double getFixedCost()
Fixed cost applied if this vehicle is used to handle a shipment.
double fixed_cost = 19;
Type | Description |
double | The fixedCost. |
getIgnore()
public boolean getIgnore()
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;
Type | Description |
boolean | The ignore. |
getLabel()
public String getLabel()
Specifies a label for this vehicle. This label is reported in the response
as the vehicle_label
of the corresponding ShipmentRoute.
string label = 27;
Type | Description |
String | The label. |
getLabelBytes()
public ByteString getLabelBytes()
Specifies a label for this vehicle. This label is reported in the response
as the vehicle_label
of the corresponding ShipmentRoute.
string label = 27;
Type | Description |
ByteString | The bytes for label. |
getLoadLimits()
public Map<String,Vehicle.LoadLimit> getLoadLimits()
Use #getLoadLimitsMap() instead.
Type | Description |
Map<String,LoadLimit> |
getLoadLimitsCount()
public int getLoadLimitsCount()
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;
Type | Description |
int |
getLoadLimitsMap()
public Map<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;
Type | Description |
Map<String,LoadLimit> |
getLoadLimitsOrDefault(String key, Vehicle.LoadLimit defaultValue)
public Vehicle.LoadLimit getLoadLimitsOrDefault(String key, Vehicle.LoadLimit defaultValue)
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;
Name | Description |
key | String |
defaultValue | Vehicle.LoadLimit |
Type | Description |
Vehicle.LoadLimit |
getLoadLimitsOrThrow(String key)
public Vehicle.LoadLimit getLoadLimitsOrThrow(String key)
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;
Name | Description |
key | String |
Type | Description |
Vehicle.LoadLimit |
getMutableExtraVisitDurationForVisitType()
public Map<String,Duration> getMutableExtraVisitDurationForVisitType()
Use alternate mutation accessors instead.
Type | Description |
Map<String,Duration> |
getMutableLoadLimits()
public Map<String,Vehicle.LoadLimit> getMutableLoadLimits()
Use alternate mutation accessors instead.
Type | Description |
Map<String,LoadLimit> |
getRouteDistanceLimit()
public DistanceLimit getRouteDistanceLimit()
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;
Type | Description |
DistanceLimit | The routeDistanceLimit. |
getRouteDistanceLimitBuilder()
public DistanceLimit.Builder getRouteDistanceLimitBuilder()
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;
Type | Description |
DistanceLimit.Builder |
getRouteDistanceLimitOrBuilder()
public DistanceLimitOrBuilder getRouteDistanceLimitOrBuilder()
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;
Type | Description |
DistanceLimitOrBuilder |
getRouteDurationLimit()
public Vehicle.DurationLimit getRouteDurationLimit()
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;
Type | Description |
Vehicle.DurationLimit | The routeDurationLimit. |
getRouteDurationLimitBuilder()
public Vehicle.DurationLimit.Builder getRouteDurationLimitBuilder()
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;
Type | Description |
Vehicle.DurationLimit.Builder |
getRouteDurationLimitOrBuilder()
public Vehicle.DurationLimitOrBuilder getRouteDurationLimitOrBuilder()
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;
Type | Description |
Vehicle.DurationLimitOrBuilder |
getStartLoadIntervals(int index)
public CapacityQuantityInterval getStartLoadIntervals(int index)
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Name | Description |
index | int |
Type | Description |
CapacityQuantityInterval |
getStartLoadIntervalsBuilder(int index)
public CapacityQuantityInterval.Builder getStartLoadIntervalsBuilder(int index)
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Name | Description |
index | int |
Type | Description |
CapacityQuantityInterval.Builder |
getStartLoadIntervalsBuilderList()
public List<CapacityQuantityInterval.Builder> getStartLoadIntervalsBuilderList()
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Type | Description |
List<Builder> |
getStartLoadIntervalsCount()
public int getStartLoadIntervalsCount()
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Type | Description |
int |
getStartLoadIntervalsList()
public List<CapacityQuantityInterval> getStartLoadIntervalsList()
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Type | Description |
List<CapacityQuantityInterval> |
getStartLoadIntervalsOrBuilder(int index)
public CapacityQuantityIntervalOrBuilder getStartLoadIntervalsOrBuilder(int index)
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Name | Description |
index | int |
Type | Description |
CapacityQuantityIntervalOrBuilder |
getStartLoadIntervalsOrBuilderList()
public List<? extends CapacityQuantityIntervalOrBuilder> getStartLoadIntervalsOrBuilderList()
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Type | Description |
List<? extends com.google.cloud.optimization.v1.CapacityQuantityIntervalOrBuilder> |
getStartLocation()
public LatLng getStartLocation()
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;
Type | Description |
com.google.type.LatLng | The startLocation. |
getStartLocationBuilder()
public LatLng.Builder getStartLocationBuilder()
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;
Type | Description |
com.google.type.LatLng.Builder |
getStartLocationOrBuilder()
public LatLngOrBuilder getStartLocationOrBuilder()
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;
Type | Description |
com.google.type.LatLngOrBuilder |
getStartTags(int index)
public String getStartTags(int index)
Specifies tags attached to the start of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string start_tags = 7;
Name | Description |
index | int The index of the element to return. |
Type | Description |
String | The startTags at the given index. |
getStartTagsBytes(int index)
public ByteString getStartTagsBytes(int index)
Specifies tags attached to the start of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string start_tags = 7;
Name | Description |
index | int The index of the value to return. |
Type | Description |
ByteString | The bytes of the startTags at the given index. |
getStartTagsCount()
public int getStartTagsCount()
Specifies tags attached to the start of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string start_tags = 7;
Type | Description |
int | The count of startTags. |
getStartTagsList()
public ProtocolStringList getStartTagsList()
Specifies tags attached to the start of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string start_tags = 7;
Type | Description |
ProtocolStringList | A list containing the startTags. |
getStartTimeWindows(int index)
public TimeWindow getStartTimeWindows(int index)
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;
Name | Description |
index | int |
Type | Description |
TimeWindow |
getStartTimeWindowsBuilder(int index)
public TimeWindow.Builder getStartTimeWindowsBuilder(int index)
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;
Name | Description |
index | int |
Type | Description |
TimeWindow.Builder |
getStartTimeWindowsBuilderList()
public List<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;
Type | Description |
List<Builder> |
getStartTimeWindowsCount()
public int getStartTimeWindowsCount()
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;
Type | Description |
int |
getStartTimeWindowsList()
public List<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;
Type | Description |
List<TimeWindow> |
getStartTimeWindowsOrBuilder(int index)
public TimeWindowOrBuilder getStartTimeWindowsOrBuilder(int index)
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;
Name | Description |
index | int |
Type | Description |
TimeWindowOrBuilder |
getStartTimeWindowsOrBuilderList()
public List<? extends TimeWindowOrBuilder> 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;
Type | Description |
List<? extends com.google.cloud.optimization.v1.TimeWindowOrBuilder> |
getStartWaypoint()
public Waypoint getStartWaypoint()
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;
Type | Description |
Waypoint | The startWaypoint. |
getStartWaypointBuilder()
public Waypoint.Builder getStartWaypointBuilder()
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;
Type | Description |
Waypoint.Builder |
getStartWaypointOrBuilder()
public WaypointOrBuilder getStartWaypointOrBuilder()
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;
Type | Description |
WaypointOrBuilder |
getTravelDurationLimit()
public Vehicle.DurationLimit getTravelDurationLimit()
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;
Type | Description |
Vehicle.DurationLimit | The travelDurationLimit. |
getTravelDurationLimitBuilder()
public Vehicle.DurationLimit.Builder getTravelDurationLimitBuilder()
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;
Type | Description |
Vehicle.DurationLimit.Builder |
getTravelDurationLimitOrBuilder()
public Vehicle.DurationLimitOrBuilder getTravelDurationLimitOrBuilder()
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;
Type | Description |
Vehicle.DurationLimitOrBuilder |
getTravelDurationMultiple()
public double getTravelDurationMultiple()
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;
Type | Description |
double | The travelDurationMultiple. |
getTravelMode()
public Vehicle.TravelMode getTravelMode()
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;
Type | Description |
Vehicle.TravelMode | The travelMode. |
getTravelModeValue()
public int getTravelModeValue()
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;
Type | Description |
int | The enum numeric value on the wire for travelMode. |
getUnloadingPolicy()
public Vehicle.UnloadingPolicy getUnloadingPolicy()
Unloading policy enforced on the vehicle.
.google.cloud.optimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12;
Type | Description |
Vehicle.UnloadingPolicy | The unloadingPolicy. |
getUnloadingPolicyValue()
public int getUnloadingPolicyValue()
Unloading policy enforced on the vehicle.
.google.cloud.optimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12;
Type | Description |
int | The enum numeric value on the wire for unloadingPolicy. |
getUsedIfRouteIsEmpty()
public boolean getUsedIfRouteIsEmpty()
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;
Type | Description |
boolean | The usedIfRouteIsEmpty. |
hasBreakRule()
public boolean hasBreakRule()
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;
Type | Description |
boolean | Whether the breakRule field is set. |
hasEndLocation()
public boolean hasEndLocation()
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;
Type | Description |
boolean | Whether the endLocation field is set. |
hasEndWaypoint()
public boolean hasEndWaypoint()
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;
Type | Description |
boolean | Whether the endWaypoint field is set. |
hasRouteDistanceLimit()
public boolean hasRouteDistanceLimit()
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;
Type | Description |
boolean | Whether the routeDistanceLimit field is set. |
hasRouteDurationLimit()
public boolean hasRouteDurationLimit()
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;
Type | Description |
boolean | Whether the routeDurationLimit field is set. |
hasStartLocation()
public boolean hasStartLocation()
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;
Type | Description |
boolean | Whether the startLocation field is set. |
hasStartWaypoint()
public boolean hasStartWaypoint()
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;
Type | Description |
boolean | Whether the startWaypoint field is set. |
hasTravelDurationLimit()
public boolean hasTravelDurationLimit()
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;
Type | Description |
boolean | Whether the travelDurationLimit field is set. |
hasTravelDurationMultiple()
public boolean hasTravelDurationMultiple()
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;
Type | Description |
boolean | Whether the travelDurationMultiple field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeBreakRule(BreakRule value)
public Vehicle.Builder mergeBreakRule(BreakRule value)
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;
Name | Description |
value | BreakRule |
Type | Description |
Vehicle.Builder |
mergeEndLocation(LatLng value)
public Vehicle.Builder mergeEndLocation(LatLng value)
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;
Name | Description |
value | com.google.type.LatLng |
Type | Description |
Vehicle.Builder |
mergeEndWaypoint(Waypoint value)
public Vehicle.Builder mergeEndWaypoint(Waypoint value)
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;
Name | Description |
value | Waypoint |
Type | Description |
Vehicle.Builder |
mergeFrom(Vehicle other)
public Vehicle.Builder mergeFrom(Vehicle other)
Name | Description |
other | Vehicle |
Type | Description |
Vehicle.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Vehicle.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Vehicle.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public Vehicle.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
Vehicle.Builder |
mergeRouteDistanceLimit(DistanceLimit value)
public Vehicle.Builder mergeRouteDistanceLimit(DistanceLimit value)
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;
Name | Description |
value | DistanceLimit |
Type | Description |
Vehicle.Builder |
mergeRouteDurationLimit(Vehicle.DurationLimit value)
public Vehicle.Builder mergeRouteDurationLimit(Vehicle.DurationLimit value)
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;
Name | Description |
value | Vehicle.DurationLimit |
Type | Description |
Vehicle.Builder |
mergeStartLocation(LatLng value)
public Vehicle.Builder mergeStartLocation(LatLng value)
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;
Name | Description |
value | com.google.type.LatLng |
Type | Description |
Vehicle.Builder |
mergeStartWaypoint(Waypoint value)
public Vehicle.Builder mergeStartWaypoint(Waypoint value)
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;
Name | Description |
value | Waypoint |
Type | Description |
Vehicle.Builder |
mergeTravelDurationLimit(Vehicle.DurationLimit value)
public Vehicle.Builder mergeTravelDurationLimit(Vehicle.DurationLimit value)
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;
Name | Description |
value | Vehicle.DurationLimit |
Type | Description |
Vehicle.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Vehicle.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Vehicle.Builder |
putAllExtraVisitDurationForVisitType(Map<String,Duration> values)
public Vehicle.Builder putAllExtraVisitDurationForVisitType(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;
Name | Description |
values | Map<String,Duration> |
Type | Description |
Vehicle.Builder |
putAllLoadLimits(Map<String,Vehicle.LoadLimit> values)
public Vehicle.Builder putAllLoadLimits(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;
Name | Description |
values | Map<String,LoadLimit> |
Type | Description |
Vehicle.Builder |
putExtraVisitDurationForVisitType(String key, Duration value)
public Vehicle.Builder putExtraVisitDurationForVisitType(String key, Duration value)
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;
Name | Description |
key | String |
value | Duration |
Type | Description |
Vehicle.Builder |
putLoadLimits(String key, Vehicle.LoadLimit value)
public Vehicle.Builder putLoadLimits(String key, Vehicle.LoadLimit value)
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;
Name | Description |
key | String |
value | Vehicle.LoadLimit |
Type | Description |
Vehicle.Builder |
removeCapacities(int index)
public Vehicle.Builder removeCapacities(int index)
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Name | Description |
index | int |
Type | Description |
Vehicle.Builder |
removeEndLoadIntervals(int index)
public Vehicle.Builder removeEndLoadIntervals(int index)
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Name | Description |
index | int |
Type | Description |
Vehicle.Builder |
removeEndTimeWindows(int index)
public Vehicle.Builder removeEndTimeWindows(int index)
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;
Name | Description |
index | int |
Type | Description |
Vehicle.Builder |
removeExtraVisitDurationForVisitType(String key)
public Vehicle.Builder removeExtraVisitDurationForVisitType(String key)
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;
Name | Description |
key | String |
Type | Description |
Vehicle.Builder |
removeLoadLimits(String key)
public Vehicle.Builder removeLoadLimits(String key)
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;
Name | Description |
key | String |
Type | Description |
Vehicle.Builder |
removeStartLoadIntervals(int index)
public Vehicle.Builder removeStartLoadIntervals(int index)
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Name | Description |
index | int |
Type | Description |
Vehicle.Builder |
removeStartTimeWindows(int index)
public Vehicle.Builder removeStartTimeWindows(int index)
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;
Name | Description |
index | int |
Type | Description |
Vehicle.Builder |
setBreakRule(BreakRule value)
public Vehicle.Builder setBreakRule(BreakRule value)
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;
Name | Description |
value | BreakRule |
Type | Description |
Vehicle.Builder |
setBreakRule(BreakRule.Builder builderForValue)
public Vehicle.Builder setBreakRule(BreakRule.Builder builderForValue)
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;
Name | Description |
builderForValue | BreakRule.Builder |
Type | Description |
Vehicle.Builder |
setBreakRuleIndices(int index, int value)
public Vehicle.Builder setBreakRuleIndices(int index, int value)
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];
Name | Description |
index | int The index to set the value at. |
value | int The breakRuleIndices to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setCapacities(int index, CapacityQuantity value)
public Vehicle.Builder setCapacities(int index, CapacityQuantity value)
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Name | Description |
index | int |
value | CapacityQuantity |
Type | Description |
Vehicle.Builder |
setCapacities(int index, CapacityQuantity.Builder builderForValue)
public Vehicle.Builder setCapacities(int index, CapacityQuantity.Builder builderForValue)
Deprecated: Use [Vehicle.load_limits][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true];
Name | Description |
index | int |
builderForValue | CapacityQuantity.Builder |
Type | Description |
Vehicle.Builder |
setCostPerHour(double value)
public Vehicle.Builder setCostPerHour(double value)
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;
Name | Description |
value | double The costPerHour to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setCostPerKilometer(double value)
public Vehicle.Builder setCostPerKilometer(double value)
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;
Name | Description |
value | double The costPerKilometer to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setCostPerTraveledHour(double value)
public Vehicle.Builder setCostPerTraveledHour(double value)
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;
Name | Description |
value | double The costPerTraveledHour to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setEndLoadIntervals(int index, CapacityQuantityInterval value)
public Vehicle.Builder setEndLoadIntervals(int index, CapacityQuantityInterval value)
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Name | Description |
index | int |
value | CapacityQuantityInterval |
Type | Description |
Vehicle.Builder |
setEndLoadIntervals(int index, CapacityQuantityInterval.Builder builderForValue)
public Vehicle.Builder setEndLoadIntervals(int index, CapacityQuantityInterval.Builder builderForValue)
Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true];
Name | Description |
index | int |
builderForValue | CapacityQuantityInterval.Builder |
Type | Description |
Vehicle.Builder |
setEndLocation(LatLng value)
public Vehicle.Builder setEndLocation(LatLng value)
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;
Name | Description |
value | com.google.type.LatLng |
Type | Description |
Vehicle.Builder |
setEndLocation(LatLng.Builder builderForValue)
public Vehicle.Builder setEndLocation(LatLng.Builder builderForValue)
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;
Name | Description |
builderForValue | com.google.type.LatLng.Builder |
Type | Description |
Vehicle.Builder |
setEndTags(int index, String value)
public Vehicle.Builder setEndTags(int index, String value)
Specifies tags attached to the end of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string end_tags = 8;
Name | Description |
index | int The index to set the value at. |
value | String The endTags to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setEndTimeWindows(int index, TimeWindow value)
public Vehicle.Builder setEndTimeWindows(int index, TimeWindow value)
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;
Name | Description |
index | int |
value | TimeWindow |
Type | Description |
Vehicle.Builder |
setEndTimeWindows(int index, TimeWindow.Builder builderForValue)
public Vehicle.Builder setEndTimeWindows(int index, TimeWindow.Builder builderForValue)
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;
Name | Description |
index | int |
builderForValue | TimeWindow.Builder |
Type | Description |
Vehicle.Builder |
setEndWaypoint(Waypoint value)
public Vehicle.Builder setEndWaypoint(Waypoint value)
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;
Name | Description |
value | Waypoint |
Type | Description |
Vehicle.Builder |
setEndWaypoint(Waypoint.Builder builderForValue)
public Vehicle.Builder setEndWaypoint(Waypoint.Builder builderForValue)
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;
Name | Description |
builderForValue | Waypoint.Builder |
Type | Description |
Vehicle.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public Vehicle.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Vehicle.Builder |
setFixedCost(double value)
public Vehicle.Builder setFixedCost(double value)
Fixed cost applied if this vehicle is used to handle a shipment.
double fixed_cost = 19;
Name | Description |
value | double The fixedCost to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setIgnore(boolean value)
public Vehicle.Builder setIgnore(boolean value)
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;
Name | Description |
value | boolean The ignore to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setLabel(String value)
public Vehicle.Builder setLabel(String value)
Specifies a label for this vehicle. This label is reported in the response
as the vehicle_label
of the corresponding ShipmentRoute.
string label = 27;
Name | Description |
value | String The label to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setLabelBytes(ByteString value)
public Vehicle.Builder setLabelBytes(ByteString value)
Specifies a label for this vehicle. This label is reported in the response
as the vehicle_label
of the corresponding ShipmentRoute.
string label = 27;
Name | Description |
value | ByteString The bytes for label to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Vehicle.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
Vehicle.Builder |
setRouteDistanceLimit(DistanceLimit value)
public Vehicle.Builder setRouteDistanceLimit(DistanceLimit value)
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;
Name | Description |
value | DistanceLimit |
Type | Description |
Vehicle.Builder |
setRouteDistanceLimit(DistanceLimit.Builder builderForValue)
public Vehicle.Builder setRouteDistanceLimit(DistanceLimit.Builder builderForValue)
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;
Name | Description |
builderForValue | DistanceLimit.Builder |
Type | Description |
Vehicle.Builder |
setRouteDurationLimit(Vehicle.DurationLimit value)
public Vehicle.Builder setRouteDurationLimit(Vehicle.DurationLimit value)
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;
Name | Description |
value | Vehicle.DurationLimit |
Type | Description |
Vehicle.Builder |
setRouteDurationLimit(Vehicle.DurationLimit.Builder builderForValue)
public Vehicle.Builder setRouteDurationLimit(Vehicle.DurationLimit.Builder builderForValue)
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;
Name | Description |
builderForValue | Vehicle.DurationLimit.Builder |
Type | Description |
Vehicle.Builder |
setStartLoadIntervals(int index, CapacityQuantityInterval value)
public Vehicle.Builder setStartLoadIntervals(int index, CapacityQuantityInterval value)
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Name | Description |
index | int |
value | CapacityQuantityInterval |
Type | Description |
Vehicle.Builder |
setStartLoadIntervals(int index, CapacityQuantityInterval.Builder builderForValue)
public Vehicle.Builder setStartLoadIntervals(int index, CapacityQuantityInterval.Builder builderForValue)
Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true];
Name | Description |
index | int |
builderForValue | CapacityQuantityInterval.Builder |
Type | Description |
Vehicle.Builder |
setStartLocation(LatLng value)
public Vehicle.Builder setStartLocation(LatLng value)
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;
Name | Description |
value | com.google.type.LatLng |
Type | Description |
Vehicle.Builder |
setStartLocation(LatLng.Builder builderForValue)
public Vehicle.Builder setStartLocation(LatLng.Builder builderForValue)
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;
Name | Description |
builderForValue | com.google.type.LatLng.Builder |
Type | Description |
Vehicle.Builder |
setStartTags(int index, String value)
public Vehicle.Builder setStartTags(int index, String value)
Specifies tags attached to the start of the vehicle's route. Empty or duplicate strings are not allowed.
repeated string start_tags = 7;
Name | Description |
index | int The index to set the value at. |
value | String The startTags to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setStartTimeWindows(int index, TimeWindow value)
public Vehicle.Builder setStartTimeWindows(int index, TimeWindow value)
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;
Name | Description |
index | int |
value | TimeWindow |
Type | Description |
Vehicle.Builder |
setStartTimeWindows(int index, TimeWindow.Builder builderForValue)
public Vehicle.Builder setStartTimeWindows(int index, TimeWindow.Builder builderForValue)
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;
Name | Description |
index | int |
builderForValue | TimeWindow.Builder |
Type | Description |
Vehicle.Builder |
setStartWaypoint(Waypoint value)
public Vehicle.Builder setStartWaypoint(Waypoint value)
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;
Name | Description |
value | Waypoint |
Type | Description |
Vehicle.Builder |
setStartWaypoint(Waypoint.Builder builderForValue)
public Vehicle.Builder setStartWaypoint(Waypoint.Builder builderForValue)
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;
Name | Description |
builderForValue | Waypoint.Builder |
Type | Description |
Vehicle.Builder |
setTravelDurationLimit(Vehicle.DurationLimit value)
public Vehicle.Builder setTravelDurationLimit(Vehicle.DurationLimit value)
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;
Name | Description |
value | Vehicle.DurationLimit |
Type | Description |
Vehicle.Builder |
setTravelDurationLimit(Vehicle.DurationLimit.Builder builderForValue)
public Vehicle.Builder setTravelDurationLimit(Vehicle.DurationLimit.Builder builderForValue)
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;
Name | Description |
builderForValue | Vehicle.DurationLimit.Builder |
Type | Description |
Vehicle.Builder |
setTravelDurationMultiple(double value)
public Vehicle.Builder setTravelDurationMultiple(double value)
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;
Name | Description |
value | double The travelDurationMultiple to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setTravelMode(Vehicle.TravelMode value)
public Vehicle.Builder setTravelMode(Vehicle.TravelMode value)
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;
Name | Description |
value | Vehicle.TravelMode The travelMode to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setTravelModeValue(int value)
public Vehicle.Builder setTravelModeValue(int value)
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;
Name | Description |
value | int The enum numeric value on the wire for travelMode to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final Vehicle.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Vehicle.Builder |
setUnloadingPolicy(Vehicle.UnloadingPolicy value)
public Vehicle.Builder setUnloadingPolicy(Vehicle.UnloadingPolicy value)
Unloading policy enforced on the vehicle.
.google.cloud.optimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12;
Name | Description |
value | Vehicle.UnloadingPolicy The unloadingPolicy to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setUnloadingPolicyValue(int value)
public Vehicle.Builder setUnloadingPolicyValue(int value)
Unloading policy enforced on the vehicle.
.google.cloud.optimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12;
Name | Description |
value | int The enum numeric value on the wire for unloadingPolicy to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |
setUsedIfRouteIsEmpty(boolean value)
public Vehicle.Builder setUsedIfRouteIsEmpty(boolean value)
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;
Name | Description |
value | boolean The usedIfRouteIsEmpty to set. |
Type | Description |
Vehicle.Builder | This builder for chaining. |