Class ShipmentRoute.Visit (1.66.0)

publicstaticfinalclass ShipmentRoute.VisitextendsGeneratedMessageV3implementsShipmentRoute.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

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

ARRIVAL_LOADS_FIELD_NUMBER

publicstaticfinalintARRIVAL_LOADS_FIELD_NUMBER
Field Value
Type Description
int

DELAY_BEFORE_START_FIELD_NUMBER

publicstaticfinalintDELAY_BEFORE_START_FIELD_NUMBER
Field Value
Type Description
int

DEMANDS_FIELD_NUMBER

publicstaticfinalintDEMANDS_FIELD_NUMBER
Field Value
Type Description
int

DETOUR_FIELD_NUMBER

publicstaticfinalintDETOUR_FIELD_NUMBER
Field Value
Type Description
int

IS_PICKUP_FIELD_NUMBER

publicstaticfinalintIS_PICKUP_FIELD_NUMBER
Field Value
Type Description
int

LOAD_DEMANDS_FIELD_NUMBER

publicstaticfinalintLOAD_DEMANDS_FIELD_NUMBER
Field Value
Type Description
int

SHIPMENT_INDEX_FIELD_NUMBER

publicstaticfinalintSHIPMENT_INDEX_FIELD_NUMBER
Field Value
Type Description
int

SHIPMENT_LABEL_FIELD_NUMBER

publicstaticfinalintSHIPMENT_LABEL_FIELD_NUMBER
Field Value
Type Description
int

START_TIME_FIELD_NUMBER

publicstaticfinalintSTART_TIME_FIELD_NUMBER
Field Value
Type Description
int

VISIT_LABEL_FIELD_NUMBER

publicstaticfinalintVISIT_LABEL_FIELD_NUMBER
Field Value
Type Description
int

VISIT_REQUEST_INDEX_FIELD_NUMBER

publicstaticfinalintVISIT_REQUEST_INDEX_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticShipmentRoute.VisitgetDefaultInstance()
Returns
Type Description
ShipmentRoute.Visit

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticShipmentRoute.Visit.BuildernewBuilder()
Returns
Type Description
ShipmentRoute.Visit.Builder

newBuilder(ShipmentRoute.Visit prototype)

publicstaticShipmentRoute.Visit.BuildernewBuilder(ShipmentRoute.Visitprototype)
Parameter
Name Description
prototype ShipmentRoute.Visit
Returns
Type Description
ShipmentRoute.Visit.Builder

parseDelimitedFrom(InputStream input)

publicstaticShipmentRoute.VisitparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
ShipmentRoute.Visit
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentRoute.VisitparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ShipmentRoute.Visit
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticShipmentRoute.VisitparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
ShipmentRoute.Visit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentRoute.VisitparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ShipmentRoute.Visit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticShipmentRoute.VisitparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
ShipmentRoute.Visit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentRoute.VisitparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ShipmentRoute.Visit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticShipmentRoute.VisitparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ShipmentRoute.Visit
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentRoute.VisitparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ShipmentRoute.Visit
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticShipmentRoute.VisitparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
ShipmentRoute.Visit
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentRoute.VisitparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ShipmentRoute.Visit
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticShipmentRoute.VisitparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ShipmentRoute.Visit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentRoute.VisitparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ShipmentRoute.Visit
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<ShipmentRoute.Visit>parser()
Returns
Type Description
Parser<Visit>

Methods

containsLoadDemands(String key)

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

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getArrivalLoads(int index) (deprecated)

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

publicintgetArrivalLoadsCount()

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)

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

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

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

getDefaultInstanceForType()

publicShipmentRoute.VisitgetDefaultInstanceForType()
Returns
Type Description
ShipmentRoute.Visit

getDelayBeforeStart() (deprecated)

publicShipmentRoute.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)

publicShipmentRoute.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)

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

publicintgetDemandsCount()

Deprecated: Use Visit.load_demands instead.

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

Returns
Type Description
int

getDemandsList() (deprecated)

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

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

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

publicDurationgetDetour()

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

publicDurationOrBuildergetDetourOrBuilder()

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

publicbooleangetIsPickup()

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)

publicMap<String,Shipment.Load>getLoadDemands()

Use #getLoadDemandsMap() instead.

Returns
Type Description
Map<String,Load>

getLoadDemandsCount()

publicintgetLoadDemandsCount()

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

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

publicShipment.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)

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

getParserForType()

publicParser<ShipmentRoute.Visit>getParserForType()
Returns
Type Description
Parser<Visit>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getShipmentIndex()

publicintgetShipmentIndex()

Index of the shipments field in the source ShipmentModel.

int32 shipment_index = 1;

Returns
Type Description
int

The shipmentIndex.

getShipmentLabel()

publicStringgetShipmentLabel()

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

string shipment_label = 7;

Returns
Type Description
String

The shipmentLabel.

getShipmentLabelBytes()

publicByteStringgetShipmentLabelBytes()

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

string shipment_label = 7;

Returns
Type Description
ByteString

The bytes for shipmentLabel.

getStartTime()

publicTimestampgetStartTime()

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

publicTimestampOrBuildergetStartTimeOrBuilder()

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

publicStringgetVisitLabel()

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

string visit_label = 8;

Returns
Type Description
String

The visitLabel.

getVisitLabelBytes()

publicByteStringgetVisitLabelBytes()

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

string visit_label = 8;

Returns
Type Description
ByteString

The bytes for visitLabel.

getVisitRequestIndex()

publicintgetVisitRequestIndex()

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)

publicbooleanhasDelayBeforeStart()

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

publicbooleanhasDetour()

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

publicbooleanhasStartTime()

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.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

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

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicShipmentRoute.Visit.BuildernewBuilderForType()
Returns
Type Description
ShipmentRoute.Visit.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedShipmentRoute.Visit.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ShipmentRoute.Visit.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicShipmentRoute.Visit.BuildertoBuilder()
Returns
Type Description
ShipmentRoute.Visit.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

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.