Interface ShipmentRoute.VisitOrBuilder (1.46.0)

publicstaticinterface ShipmentRoute.VisitOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

containsLoadDemands(String key)

publicabstractbooleancontainsLoadDemands(Stringkey)

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)

publicabstractCapacityQuantitygetArrivalLoads(intindex)

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

getArrivalLoadsCount() (deprecated)

publicabstractintgetArrivalLoadsCount()

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)

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

publicabstractCapacityQuantityOrBuildergetArrivalLoadsOrBuilder(intindex)

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)

publicabstractList<?extendsCapacityQuantityOrBuilder>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>

getDelayBeforeStart() (deprecated)

publicabstractShipmentRoute.DelaygetDelayBeforeStart()

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.

getDelayBeforeStartOrBuilder() (deprecated)

publicabstractShipmentRoute.DelayOrBuildergetDelayBeforeStartOrBuilder()

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)

publicabstractCapacityQuantitygetDemands(intindex)

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

getDemandsCount() (deprecated)

publicabstractintgetDemandsCount()

Deprecated: Use Visit.load_demands instead.

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

Returns
Type Description
int

getDemandsList() (deprecated)

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

publicabstractCapacityQuantityOrBuildergetDemandsOrBuilder(intindex)

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)

publicabstractList<?extendsCapacityQuantityOrBuilder>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>

getDetour()

publicabstractDurationgetDetour()

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.

getDetourOrBuilder()

publicabstractDurationOrBuildergetDetourOrBuilder()

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

publicabstractbooleangetIsPickup()

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)

publicabstractMap<String,Shipment.Load>getLoadDemands()

Use #getLoadDemandsMap() instead.

Returns
Type Description
Map<String,Load>

getLoadDemandsCount()

publicabstractintgetLoadDemandsCount()

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

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

publicabstractShipment.LoadgetLoadDemandsOrDefault(Stringkey,Shipment.LoaddefaultValue)

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)

publicabstractShipment.LoadgetLoadDemandsOrThrow(Stringkey)

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

getShipmentIndex()

publicabstractintgetShipmentIndex()

Index of the shipments field in the source ShipmentModel.

int32 shipment_index = 1;

Returns
Type Description
int

The shipmentIndex.

getShipmentLabel()

publicabstractStringgetShipmentLabel()

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

string shipment_label = 7;

Returns
Type Description
String

The shipmentLabel.

getShipmentLabelBytes()

publicabstractByteStringgetShipmentLabelBytes()

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

string shipment_label = 7;

Returns
Type Description
ByteString

The bytes for shipmentLabel.

getStartTime()

publicabstractTimestampgetStartTime()

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.

getStartTimeOrBuilder()

publicabstractTimestampOrBuildergetStartTimeOrBuilder()

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

publicabstractStringgetVisitLabel()

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

string visit_label = 8;

Returns
Type Description
String

The visitLabel.

getVisitLabelBytes()

publicabstractByteStringgetVisitLabelBytes()

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

string visit_label = 8;

Returns
Type Description
ByteString

The bytes for visitLabel.

getVisitRequestIndex()

publicabstractintgetVisitRequestIndex()

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)

publicabstractbooleanhasDelayBeforeStart()

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

publicabstractbooleanhasDetour()

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

publicabstractbooleanhasStartTime()

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.

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

Last updated 2025年10月30日 UTC.