Class ShipmentRoute.Visit.Builder (1.43.0)

public static final class ShipmentRoute.Visit.Builder extends GeneratedMessageV3.Builder<ShipmentRoute.Visit.Builder> implements ShipmentRoute.VisitOrBuilder

A visit performed during a route. This visit corresponds to a pickup or a delivery of a Shipment.

Protobuf type google.cloud.optimization.v1.ShipmentRoute.Visit

Static Methods

getDescriptor()

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

Methods

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

public ShipmentRoute.Visit.Builder addAllArrivalLoads(Iterable<? extends CapacityQuantity> values)

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

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

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

public ShipmentRoute.Visit.Builder addAllDemands(Iterable<? extends CapacityQuantity> values)

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

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

addArrivalLoads(CapacityQuantity value) (deprecated)

public ShipmentRoute.Visit.Builder addArrivalLoads(CapacityQuantity value)

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
value CapacityQuantity
Returns
Type Description
ShipmentRoute.Visit.Builder

addArrivalLoads(CapacityQuantity.Builder builderForValue) (deprecated)

public ShipmentRoute.Visit.Builder addArrivalLoads(CapacityQuantity.Builder builderForValue)

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
builderForValue CapacityQuantity.Builder
Returns
Type Description
ShipmentRoute.Visit.Builder

addArrivalLoads(int index, CapacityQuantity value) (deprecated)

public ShipmentRoute.Visit.Builder addArrivalLoads(int index, CapacityQuantity value)

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameters
Name Description
index int
value CapacityQuantity
Returns
Type Description
ShipmentRoute.Visit.Builder

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

public ShipmentRoute.Visit.Builder addArrivalLoads(int index, CapacityQuantity.Builder builderForValue)

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameters
Name Description
index int
builderForValue CapacityQuantity.Builder
Returns
Type Description
ShipmentRoute.Visit.Builder

addArrivalLoadsBuilder() (deprecated)

public CapacityQuantity.Builder addArrivalLoadsBuilder()

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Returns
Type Description
CapacityQuantity.Builder

addArrivalLoadsBuilder(int index) (deprecated)

public CapacityQuantity.Builder addArrivalLoadsBuilder(int index)

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
CapacityQuantity.Builder

addDemands(CapacityQuantity value) (deprecated)

public ShipmentRoute.Visit.Builder addDemands(CapacityQuantity value)

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
value CapacityQuantity
Returns
Type Description
ShipmentRoute.Visit.Builder

addDemands(CapacityQuantity.Builder builderForValue) (deprecated)

public ShipmentRoute.Visit.Builder addDemands(CapacityQuantity.Builder builderForValue)

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
builderForValue CapacityQuantity.Builder
Returns
Type Description
ShipmentRoute.Visit.Builder

addDemands(int index, CapacityQuantity value) (deprecated)

public ShipmentRoute.Visit.Builder addDemands(int index, CapacityQuantity value)

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameters
Name Description
index int
value CapacityQuantity
Returns
Type Description
ShipmentRoute.Visit.Builder

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

public ShipmentRoute.Visit.Builder addDemands(int index, CapacityQuantity.Builder builderForValue)

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameters
Name Description
index int
builderForValue CapacityQuantity.Builder
Returns
Type Description
ShipmentRoute.Visit.Builder

addDemandsBuilder() (deprecated)

public CapacityQuantity.Builder addDemandsBuilder()

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Returns
Type Description
CapacityQuantity.Builder

addDemandsBuilder(int index) (deprecated)

public CapacityQuantity.Builder addDemandsBuilder(int index)

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
CapacityQuantity.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ShipmentRoute.Visit.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ShipmentRoute.Visit.Builder
Overrides

build()

public ShipmentRoute.Visit build()
Returns
Type Description
ShipmentRoute.Visit

buildPartial()

public ShipmentRoute.Visit buildPartial()
Returns
Type Description
ShipmentRoute.Visit

clear()

public ShipmentRoute.Visit.Builder clear()
Returns
Type Description
ShipmentRoute.Visit.Builder
Overrides

clearArrivalLoads() (deprecated)

public ShipmentRoute.Visit.Builder clearArrivalLoads()

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Returns
Type Description
ShipmentRoute.Visit.Builder

clearDelayBeforeStart() (deprecated)

public ShipmentRoute.Visit.Builder clearDelayBeforeStart()

Deprecated: Use ShipmentRoute.Transition.delay_duration instead. Delay occurring before the visit starts.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Returns
Type Description
ShipmentRoute.Visit.Builder

clearDemands() (deprecated)

public ShipmentRoute.Visit.Builder clearDemands()

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Returns
Type Description
ShipmentRoute.Visit.Builder

clearDetour()

public ShipmentRoute.Visit.Builder clearDetour()

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Returns
Type Description
ShipmentRoute.Visit.Builder

clearField(Descriptors.FieldDescriptor field)

public ShipmentRoute.Visit.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ShipmentRoute.Visit.Builder
Overrides

clearIsPickup()

public ShipmentRoute.Visit.Builder clearIsPickup()

If true the visit corresponds to a pickup of a Shipment. Otherwise, it corresponds to a delivery.

bool is_pickup = 2;

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

clearLoadDemands()

public ShipmentRoute.Visit.Builder clearLoadDemands()
Returns
Type Description
ShipmentRoute.Visit.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public ShipmentRoute.Visit.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ShipmentRoute.Visit.Builder
Overrides

clearShipmentIndex()

public ShipmentRoute.Visit.Builder clearShipmentIndex()

Index of the shipments field in the source ShipmentModel.

int32 shipment_index = 1;

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

clearShipmentLabel()

public ShipmentRoute.Visit.Builder clearShipmentLabel()

Copy of the corresponding Shipment.label, if specified in the Shipment.

string shipment_label = 7;

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

clearStartTime()

public ShipmentRoute.Visit.Builder clearStartTime()

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Returns
Type Description
ShipmentRoute.Visit.Builder

clearVisitLabel()

public ShipmentRoute.Visit.Builder clearVisitLabel()

Copy of the corresponding VisitRequest.label, if specified in the VisitRequest.

string visit_label = 8;

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

clearVisitRequestIndex()

public ShipmentRoute.Visit.Builder clearVisitRequestIndex()

Index of VisitRequest in either the pickup or delivery field of the Shipment (see is_pickup).

int32 visit_request_index = 3;

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

clone()

public ShipmentRoute.Visit.Builder clone()
Returns
Type Description
ShipmentRoute.Visit.Builder
Overrides

containsLoadDemands(String key)

public boolean containsLoadDemands(String key)

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Parameter
Name Description
key String
Returns
Type Description
boolean

getArrivalLoads(int index) (deprecated)

public CapacityQuantity getArrivalLoads(int index)

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
CapacityQuantity

getArrivalLoadsBuilder(int index) (deprecated)

public CapacityQuantity.Builder getArrivalLoadsBuilder(int index)

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
CapacityQuantity.Builder

getArrivalLoadsBuilderList() (deprecated)

public List<CapacityQuantity.Builder> getArrivalLoadsBuilderList()

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Returns
Type Description
List<Builder>

getArrivalLoadsCount() (deprecated)

public int getArrivalLoadsCount()

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Returns
Type Description
int

getArrivalLoadsList() (deprecated)

public List<CapacityQuantity> getArrivalLoadsList()

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Returns
Type Description
List<CapacityQuantity>

getArrivalLoadsOrBuilder(int index) (deprecated)

public CapacityQuantityOrBuilder getArrivalLoadsOrBuilder(int index)

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
CapacityQuantityOrBuilder

getArrivalLoadsOrBuilderList() (deprecated)

public List<? extends CapacityQuantityOrBuilder> getArrivalLoadsOrBuilderList()

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

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

getDefaultInstanceForType()

public ShipmentRoute.Visit getDefaultInstanceForType()
Returns
Type Description
ShipmentRoute.Visit

getDelayBeforeStart() (deprecated)

public ShipmentRoute.Delay getDelayBeforeStart()

Deprecated. google.cloud.optimization.v1.ShipmentRoute.Visit.delay_before_start is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1965

Deprecated: Use ShipmentRoute.Transition.delay_duration instead. Delay occurring before the visit starts.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Returns
Type Description
ShipmentRoute.Delay

The delayBeforeStart.

getDelayBeforeStartBuilder() (deprecated)

public ShipmentRoute.Delay.Builder getDelayBeforeStartBuilder()

Deprecated: Use ShipmentRoute.Transition.delay_duration instead. Delay occurring before the visit starts.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Returns
Type Description
ShipmentRoute.Delay.Builder

getDelayBeforeStartOrBuilder() (deprecated)

public ShipmentRoute.DelayOrBuilder getDelayBeforeStartOrBuilder()

Deprecated: Use ShipmentRoute.Transition.delay_duration instead. Delay occurring before the visit starts.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Returns
Type Description
ShipmentRoute.DelayOrBuilder

getDemands(int index) (deprecated)

public CapacityQuantity getDemands(int index)

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
CapacityQuantity

getDemandsBuilder(int index) (deprecated)

public CapacityQuantity.Builder getDemandsBuilder(int index)

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
CapacityQuantity.Builder

getDemandsBuilderList() (deprecated)

public List<CapacityQuantity.Builder> getDemandsBuilderList()

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Returns
Type Description
List<Builder>

getDemandsCount() (deprecated)

public int getDemandsCount()

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Returns
Type Description
int

getDemandsList() (deprecated)

public List<CapacityQuantity> getDemandsList()

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Returns
Type Description
List<CapacityQuantity>

getDemandsOrBuilder(int index) (deprecated)

public CapacityQuantityOrBuilder getDemandsOrBuilder(int index)

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
CapacityQuantityOrBuilder

getDemandsOrBuilderList() (deprecated)

public List<? extends CapacityQuantityOrBuilder> getDemandsOrBuilderList()

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDetour()

public Duration getDetour()

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Returns
Type Description
Duration

The detour.

getDetourBuilder()

public Duration.Builder getDetourBuilder()

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Returns
Type Description
Builder

getDetourOrBuilder()

public DurationOrBuilder getDetourOrBuilder()

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Returns
Type Description
DurationOrBuilder

getIsPickup()

public boolean getIsPickup()

If true the visit corresponds to a pickup of a Shipment. Otherwise, it corresponds to a delivery.

bool is_pickup = 2;

Returns
Type Description
boolean

The isPickup.

getLoadDemands() (deprecated)

public Map<String,Shipment.Load> getLoadDemands()

Use #getLoadDemandsMap() instead.

Returns
Type Description
Map<String,Load>

getLoadDemandsCount()

public int getLoadDemandsCount()

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Returns
Type Description
int

getLoadDemandsMap()

public Map<String,Shipment.Load> getLoadDemandsMap()

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Returns
Type Description
Map<String,Load>

getLoadDemandsOrDefault(String key, Shipment.Load defaultValue)

public Shipment.Load getLoadDemandsOrDefault(String key, Shipment.Load defaultValue)

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Parameters
Name Description
key String
defaultValue Shipment.Load
Returns
Type Description
Shipment.Load

getLoadDemandsOrThrow(String key)

public Shipment.Load getLoadDemandsOrThrow(String key)

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Parameter
Name Description
key String
Returns
Type Description
Shipment.Load

getMutableLoadDemands() (deprecated)

public Map<String,Shipment.Load> getMutableLoadDemands()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,Load>

getShipmentIndex()

public int getShipmentIndex()

Index of the shipments field in the source ShipmentModel.

int32 shipment_index = 1;

Returns
Type Description
int

The shipmentIndex.

getShipmentLabel()

public String getShipmentLabel()

Copy of the corresponding Shipment.label, if specified in the Shipment.

string shipment_label = 7;

Returns
Type Description
String

The shipmentLabel.

getShipmentLabelBytes()

public ByteString getShipmentLabelBytes()

Copy of the corresponding Shipment.label, if specified in the Shipment.

string shipment_label = 7;

Returns
Type Description
ByteString

The bytes for shipmentLabel.

getStartTime()

public Timestamp getStartTime()

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Returns
Type Description
Timestamp

The startTime.

getStartTimeBuilder()

public Timestamp.Builder getStartTimeBuilder()

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Returns
Type Description
Builder

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Returns
Type Description
TimestampOrBuilder

getVisitLabel()

public String getVisitLabel()

Copy of the corresponding VisitRequest.label, if specified in the VisitRequest.

string visit_label = 8;

Returns
Type Description
String

The visitLabel.

getVisitLabelBytes()

public ByteString getVisitLabelBytes()

Copy of the corresponding VisitRequest.label, if specified in the VisitRequest.

string visit_label = 8;

Returns
Type Description
ByteString

The bytes for visitLabel.

getVisitRequestIndex()

public int getVisitRequestIndex()

Index of VisitRequest in either the pickup or delivery field of the Shipment (see is_pickup).

int32 visit_request_index = 3;

Returns
Type Description
int

The visitRequestIndex.

hasDelayBeforeStart() (deprecated)

public boolean hasDelayBeforeStart()

Deprecated. google.cloud.optimization.v1.ShipmentRoute.Visit.delay_before_start is deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=1965

Deprecated: Use ShipmentRoute.Transition.delay_duration instead. Delay occurring before the visit starts.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Returns
Type Description
boolean

Whether the delayBeforeStart field is set.

hasDetour()

public boolean hasDetour()

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Returns
Type Description
boolean

Whether the detour field is set.

hasStartTime()

public boolean hasStartTime()

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Returns
Type Description
boolean

Whether the startTime field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

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

internalGetMutableMapFieldReflection(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDelayBeforeStart(ShipmentRoute.Delay value) (deprecated)

public ShipmentRoute.Visit.Builder mergeDelayBeforeStart(ShipmentRoute.Delay value)

Deprecated: Use ShipmentRoute.Transition.delay_duration instead. Delay occurring before the visit starts.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Parameter
Name Description
value ShipmentRoute.Delay
Returns
Type Description
ShipmentRoute.Visit.Builder

mergeDetour(Duration value)

public ShipmentRoute.Visit.Builder mergeDetour(Duration value)

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Parameter
Name Description
value Duration
Returns
Type Description
ShipmentRoute.Visit.Builder

mergeFrom(ShipmentRoute.Visit other)

public ShipmentRoute.Visit.Builder mergeFrom(ShipmentRoute.Visit other)
Parameter
Name Description
other ShipmentRoute.Visit
Returns
Type Description
ShipmentRoute.Visit.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ShipmentRoute.Visit.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ShipmentRoute.Visit.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ShipmentRoute.Visit.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ShipmentRoute.Visit.Builder
Overrides

mergeStartTime(Timestamp value)

public ShipmentRoute.Visit.Builder mergeStartTime(Timestamp value)

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Parameter
Name Description
value Timestamp
Returns
Type Description
ShipmentRoute.Visit.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ShipmentRoute.Visit.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ShipmentRoute.Visit.Builder
Overrides

putAllLoadDemands(Map<String,Shipment.Load> values)

public ShipmentRoute.Visit.Builder putAllLoadDemands(Map<String,Shipment.Load> values)

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Parameter
Name Description
values Map<String,Load>
Returns
Type Description
ShipmentRoute.Visit.Builder

putLoadDemands(String key, Shipment.Load value)

public ShipmentRoute.Visit.Builder putLoadDemands(String key, Shipment.Load value)

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Parameters
Name Description
key String
value Shipment.Load
Returns
Type Description
ShipmentRoute.Visit.Builder

putLoadDemandsBuilderIfAbsent(String key)

public Shipment.Load.Builder putLoadDemandsBuilderIfAbsent(String key)

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Parameter
Name Description
key String
Returns
Type Description
Shipment.Load.Builder

removeArrivalLoads(int index) (deprecated)

public ShipmentRoute.Visit.Builder removeArrivalLoads(int index)

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
ShipmentRoute.Visit.Builder

removeDemands(int index) (deprecated)

public ShipmentRoute.Visit.Builder removeDemands(int index)

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameter
Name Description
index int
Returns
Type Description
ShipmentRoute.Visit.Builder

removeLoadDemands(String key)

public ShipmentRoute.Visit.Builder removeLoadDemands(String key)

Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 11;

Parameter
Name Description
key String
Returns
Type Description
ShipmentRoute.Visit.Builder

setArrivalLoads(int index, CapacityQuantity value) (deprecated)

public ShipmentRoute.Visit.Builder setArrivalLoads(int index, CapacityQuantity value)

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameters
Name Description
index int
value CapacityQuantity
Returns
Type Description
ShipmentRoute.Visit.Builder

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

public ShipmentRoute.Visit.Builder setArrivalLoads(int index, CapacityQuantity.Builder builderForValue)

Deprecated: Use Transition.vehicle_loads instead. Vehicle loads upon arrival at the visit location, for each type specified in Vehicle.capacities, start_load_intervals, end_load_intervals or demands.

Exception: we omit loads for quantity types unconstrained by intervals and that don't have any non-zero demand on the route.

repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true];

Parameters
Name Description
index int
builderForValue CapacityQuantity.Builder
Returns
Type Description
ShipmentRoute.Visit.Builder

setDelayBeforeStart(ShipmentRoute.Delay value) (deprecated)

public ShipmentRoute.Visit.Builder setDelayBeforeStart(ShipmentRoute.Delay value)

Deprecated: Use ShipmentRoute.Transition.delay_duration instead. Delay occurring before the visit starts.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Parameter
Name Description
value ShipmentRoute.Delay
Returns
Type Description
ShipmentRoute.Visit.Builder

setDelayBeforeStart(ShipmentRoute.Delay.Builder builderForValue) (deprecated)

public ShipmentRoute.Visit.Builder setDelayBeforeStart(ShipmentRoute.Delay.Builder builderForValue)

Deprecated: Use ShipmentRoute.Transition.delay_duration instead. Delay occurring before the visit starts.

.google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true];

Parameter
Name Description
builderForValue ShipmentRoute.Delay.Builder
Returns
Type Description
ShipmentRoute.Visit.Builder

setDemands(int index, CapacityQuantity value) (deprecated)

public ShipmentRoute.Visit.Builder setDemands(int index, CapacityQuantity value)

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameters
Name Description
index int
value CapacityQuantity
Returns
Type Description
ShipmentRoute.Visit.Builder

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

public ShipmentRoute.Visit.Builder setDemands(int index, CapacityQuantity.Builder builderForValue)

Deprecated: Use Visit.load_demands instead.

repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true];

Parameters
Name Description
index int
builderForValue CapacityQuantity.Builder
Returns
Type Description
ShipmentRoute.Visit.Builder

setDetour(Duration value)

public ShipmentRoute.Visit.Builder setDetour(Duration value)

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Parameter
Name Description
value Duration
Returns
Type Description
ShipmentRoute.Visit.Builder

setDetour(Duration.Builder builderForValue)

public ShipmentRoute.Visit.Builder setDetour(Duration.Builder builderForValue)

Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ` start_time(delivery) - start_time(pickup)

  • (duration(pickup) + travel duration from the pickup location to the delivery location).
Otherwise, it is computed from the vehicle start_location and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. `

.google.protobuf.Duration detour = 6;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
ShipmentRoute.Visit.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ShipmentRoute.Visit.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ShipmentRoute.Visit.Builder
Overrides

setIsPickup(boolean value)

public ShipmentRoute.Visit.Builder setIsPickup(boolean value)

If true the visit corresponds to a pickup of a Shipment. Otherwise, it corresponds to a delivery.

bool is_pickup = 2;

Parameter
Name Description
value boolean

The isPickup to set.

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

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

public ShipmentRoute.Visit.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ShipmentRoute.Visit.Builder
Overrides

setShipmentIndex(int value)

public ShipmentRoute.Visit.Builder setShipmentIndex(int value)

Index of the shipments field in the source ShipmentModel.

int32 shipment_index = 1;

Parameter
Name Description
value int

The shipmentIndex to set.

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

setShipmentLabel(String value)

public ShipmentRoute.Visit.Builder setShipmentLabel(String value)

Copy of the corresponding Shipment.label, if specified in the Shipment.

string shipment_label = 7;

Parameter
Name Description
value String

The shipmentLabel to set.

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

setShipmentLabelBytes(ByteString value)

public ShipmentRoute.Visit.Builder setShipmentLabelBytes(ByteString value)

Copy of the corresponding Shipment.label, if specified in the Shipment.

string shipment_label = 7;

Parameter
Name Description
value ByteString

The bytes for shipmentLabel to set.

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

setStartTime(Timestamp value)

public ShipmentRoute.Visit.Builder setStartTime(Timestamp value)

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Parameter
Name Description
value Timestamp
Returns
Type Description
ShipmentRoute.Visit.Builder

setStartTime(Timestamp.Builder builderForValue)

public ShipmentRoute.Visit.Builder setStartTime(Timestamp.Builder builderForValue)

Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

.google.protobuf.Timestamp start_time = 4;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
ShipmentRoute.Visit.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final ShipmentRoute.Visit.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ShipmentRoute.Visit.Builder
Overrides

setVisitLabel(String value)

public ShipmentRoute.Visit.Builder setVisitLabel(String value)

Copy of the corresponding VisitRequest.label, if specified in the VisitRequest.

string visit_label = 8;

Parameter
Name Description
value String

The visitLabel to set.

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

setVisitLabelBytes(ByteString value)

public ShipmentRoute.Visit.Builder setVisitLabelBytes(ByteString value)

Copy of the corresponding VisitRequest.label, if specified in the VisitRequest.

string visit_label = 8;

Parameter
Name Description
value ByteString

The bytes for visitLabel to set.

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.

setVisitRequestIndex(int value)

public ShipmentRoute.Visit.Builder setVisitRequestIndex(int value)

Index of VisitRequest in either the pickup or delivery field of the Shipment (see is_pickup).

int32 visit_request_index = 3;

Parameter
Name Description
value int

The visitRequestIndex to set.

Returns
Type Description
ShipmentRoute.Visit.Builder

This builder for chaining.