public final class Shipment extends GeneratedMessageV3 implements ShipmentOrBuilder
The shipment of a single item, from one of its pickups to one of its
deliveries. For the shipment to be considered as performed, a unique vehicle
must visit one of its pickup locations (and decrease its spare capacities
accordingly), then visit one of its delivery locations later on (and
therefore re-increase its spare capacities accordingly).
Protobuf type google.cloud.optimization.v1.Shipment
Static Fields
ALLOWED_VEHICLE_INDICES_FIELD_NUMBER
public static final int ALLOWED_VEHICLE_INDICES_FIELD_NUMBER
Field Value
COSTS_PER_VEHICLE_FIELD_NUMBER
public static final int COSTS_PER_VEHICLE_FIELD_NUMBER
Field Value
COSTS_PER_VEHICLE_INDICES_FIELD_NUMBER
public static final int COSTS_PER_VEHICLE_INDICES_FIELD_NUMBER
Field Value
DELIVERIES_FIELD_NUMBER
public static final int DELIVERIES_FIELD_NUMBER
Field Value
DEMANDS_FIELD_NUMBER
public static final int DEMANDS_FIELD_NUMBER
Field Value
IGNORE_FIELD_NUMBER
public static final int IGNORE_FIELD_NUMBER
Field Value
LABEL_FIELD_NUMBER
public static final int LABEL_FIELD_NUMBER
Field Value
LOAD_DEMANDS_FIELD_NUMBER
public static final int LOAD_DEMANDS_FIELD_NUMBER
Field Value
PENALTY_COST_FIELD_NUMBER
public static final int PENALTY_COST_FIELD_NUMBER
Field Value
PICKUPS_FIELD_NUMBER
public static final int PICKUPS_FIELD_NUMBER
Field Value
PICKUP_TO_DELIVERY_ABSOLUTE_DETOUR_LIMIT_FIELD_NUMBER
public static final int PICKUP_TO_DELIVERY_ABSOLUTE_DETOUR_LIMIT_FIELD_NUMBER
Field Value
PICKUP_TO_DELIVERY_RELATIVE_DETOUR_LIMIT_FIELD_NUMBER
public static final int PICKUP_TO_DELIVERY_RELATIVE_DETOUR_LIMIT_FIELD_NUMBER
Field Value
PICKUP_TO_DELIVERY_TIME_LIMIT_FIELD_NUMBER
public static final int PICKUP_TO_DELIVERY_TIME_LIMIT_FIELD_NUMBER
Field Value
SHIPMENT_TYPE_FIELD_NUMBER
public static final int SHIPMENT_TYPE_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static Shipment getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static Shipment.Builder newBuilder()
Returns
newBuilder(Shipment prototype)
public static Shipment.Builder newBuilder(Shipment prototype)
Parameter
Returns
public static Shipment parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Shipment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Shipment parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Shipment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Shipment parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Shipment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Shipment parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Shipment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Shipment parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Shipment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Shipment parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Shipment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Shipment> parser()
Returns
Methods
containsLoadDemands(String key)
public boolean containsLoadDemands(String key)
Load demands of the shipment (for example weight, volume, number of
pallets etc). The keys in the map should be identifiers describing the type
of the corresponding load, ideally also including the units.
For example: "weight_kg", "volume_gallons", "pallet_count", etc.
If a given key does not appear in the map, the corresponding load is
considered as null.
map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 14;
Parameter
Returns
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getAllowedVehicleIndices(int index)
public int getAllowedVehicleIndices(int index)
The set of vehicles that may perform this shipment. If empty, all vehicles
may perform it. Vehicles are given by their index in the ShipmentModel
's
vehicles
list.
repeated int32 allowed_vehicle_indices = 5;
Parameter
Name | Description |
index | int
The index of the element to return.
|
Returns
Type | Description |
int | The allowedVehicleIndices at the given index.
|
getAllowedVehicleIndicesCount()
public int getAllowedVehicleIndicesCount()
The set of vehicles that may perform this shipment. If empty, all vehicles
may perform it. Vehicles are given by their index in the ShipmentModel
's
vehicles
list.
repeated int32 allowed_vehicle_indices = 5;
Returns
Type | Description |
int | The count of allowedVehicleIndices.
|
getAllowedVehicleIndicesList()
public List<Integer> getAllowedVehicleIndicesList()
The set of vehicles that may perform this shipment. If empty, all vehicles
may perform it. Vehicles are given by their index in the ShipmentModel
's
vehicles
list.
repeated int32 allowed_vehicle_indices = 5;
Returns
Type | Description |
List<Integer> | A list containing the allowedVehicleIndices.
|
getCostsPerVehicle(int index)
public double getCostsPerVehicle(int index)
Specifies the cost that is incurred when this shipment is delivered by each
vehicle. If specified, it must have EITHER:
- the same number of elements as
costs_per_vehicle_indices
.
costs_per_vehicle[i]
corresponds to vehicle
costs_per_vehicle_indices[i]
of the model.
- the same number of elements as there are vehicles in the model. The
i-th element corresponds to vehicle #i of the model.
These costs must be in the same unit as
penalty_cost
and must not be
negative. Leave this field empty, if there are no such costs.
repeated double costs_per_vehicle = 6;
Parameter
Name | Description |
index | int
The index of the element to return.
|
Returns
Type | Description |
double | The costsPerVehicle at the given index.
|
getCostsPerVehicleCount()
public int getCostsPerVehicleCount()
Specifies the cost that is incurred when this shipment is delivered by each
vehicle. If specified, it must have EITHER:
- the same number of elements as
costs_per_vehicle_indices
.
costs_per_vehicle[i]
corresponds to vehicle
costs_per_vehicle_indices[i]
of the model.
- the same number of elements as there are vehicles in the model. The
i-th element corresponds to vehicle #i of the model.
These costs must be in the same unit as
penalty_cost
and must not be
negative. Leave this field empty, if there are no such costs.
repeated double costs_per_vehicle = 6;
Returns
Type | Description |
int | The count of costsPerVehicle.
|
getCostsPerVehicleIndices(int index)
public int getCostsPerVehicleIndices(int index)
Indices of the vehicles to which costs_per_vehicle
applies. If non-empty,
it must have the same number of elements as costs_per_vehicle
. A vehicle
index may not be specified more than once. If a vehicle is excluded from
costs_per_vehicle_indices
, its cost is zero.
repeated int32 costs_per_vehicle_indices = 7;
Parameter
Name | Description |
index | int
The index of the element to return.
|
Returns
Type | Description |
int | The costsPerVehicleIndices at the given index.
|
getCostsPerVehicleIndicesCount()
public int getCostsPerVehicleIndicesCount()
Indices of the vehicles to which costs_per_vehicle
applies. If non-empty,
it must have the same number of elements as costs_per_vehicle
. A vehicle
index may not be specified more than once. If a vehicle is excluded from
costs_per_vehicle_indices
, its cost is zero.
repeated int32 costs_per_vehicle_indices = 7;
Returns
Type | Description |
int | The count of costsPerVehicleIndices.
|
getCostsPerVehicleIndicesList()
public List<Integer> getCostsPerVehicleIndicesList()
Indices of the vehicles to which costs_per_vehicle
applies. If non-empty,
it must have the same number of elements as costs_per_vehicle
. A vehicle
index may not be specified more than once. If a vehicle is excluded from
costs_per_vehicle_indices
, its cost is zero.
repeated int32 costs_per_vehicle_indices = 7;
Returns
Type | Description |
List<Integer> | A list containing the costsPerVehicleIndices.
|
getCostsPerVehicleList()
public List<Double> getCostsPerVehicleList()
Specifies the cost that is incurred when this shipment is delivered by each
vehicle. If specified, it must have EITHER:
- the same number of elements as
costs_per_vehicle_indices
.
costs_per_vehicle[i]
corresponds to vehicle
costs_per_vehicle_indices[i]
of the model.
- the same number of elements as there are vehicles in the model. The
i-th element corresponds to vehicle #i of the model.
These costs must be in the same unit as
penalty_cost
and must not be
negative. Leave this field empty, if there are no such costs.
repeated double costs_per_vehicle = 6;
Returns
Type | Description |
List<Double> | A list containing the costsPerVehicle.
|
getDefaultInstanceForType()
public Shipment getDefaultInstanceForType()
Returns
getDeliveries(int index)
public Shipment.VisitRequest getDeliveries(int index)
Set of delivery alternatives associated to the shipment. If not specified,
the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
Parameter
Returns
getDeliveriesCount()
public int getDeliveriesCount()
Set of delivery alternatives associated to the shipment. If not specified,
the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
Returns
getDeliveriesList()
public List<Shipment.VisitRequest> getDeliveriesList()
Set of delivery alternatives associated to the shipment. If not specified,
the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
Returns
getDeliveriesOrBuilder(int index)
public Shipment.VisitRequestOrBuilder getDeliveriesOrBuilder(int index)
Set of delivery alternatives associated to the shipment. If not specified,
the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
Parameter
Returns
getDeliveriesOrBuilderList()
public List<? extends Shipment.VisitRequestOrBuilder> getDeliveriesOrBuilderList()
Set of delivery alternatives associated to the shipment. If not specified,
the vehicle only needs to visit a location corresponding to the pickups.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2;
Returns
Type | Description |
List<? extends com.google.cloud.optimization.v1.Shipment.VisitRequestOrBuilder> | |
getDemands(int index)
public CapacityQuantity getDemands(int index)
Deprecated: Use [Shipment.load_demands][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
Parameter
Returns
getDemandsCount()
public int getDemandsCount()
Deprecated: Use [Shipment.load_demands][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
Returns
getDemandsList()
public List<CapacityQuantity> getDemandsList()
Deprecated: Use [Shipment.load_demands][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
Returns
getDemandsOrBuilder(int index)
public CapacityQuantityOrBuilder getDemandsOrBuilder(int index)
Deprecated: Use [Shipment.load_demands][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
Parameter
Returns
getDemandsOrBuilderList()
public List<? extends CapacityQuantityOrBuilder> getDemandsOrBuilderList()
Deprecated: Use [Shipment.load_demands][] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];
Returns
Type | Description |
List<? extends com.google.cloud.optimization.v1.CapacityQuantityOrBuilder> | |
getIgnore()
public boolean getIgnore()
If true, skip this shipment, but don't apply a penalty_cost
.
Ignoring a shipment results in a validation error when there are any
shipment_type_requirements
in the model.
Ignoring a shipment that is performed in injected_first_solution_routes
or injected_solution_constraint
is permitted; the solver removes the
related pickup/delivery visits from the performing route.
precedence_rules
that reference ignored shipments will also be ignored.
bool ignore = 13;
Returns
getLabel()
Specifies a label for this shipment. This label is reported in the response
in the shipment_label
of the corresponding ShipmentRoute.Visit.
string label = 12;
Returns
Type | Description |
String | The label.
|
getLabelBytes()
public ByteString getLabelBytes()
Specifies a label for this shipment. This label is reported in the response
in the shipment_label
of the corresponding ShipmentRoute.Visit.
string label = 12;
Returns
getLoadDemands()
public Map<String,Shipment.Load> getLoadDemands()
Returns
getLoadDemandsCount()
public int getLoadDemandsCount()
Load demands of the shipment (for example weight, volume, number of
pallets etc). The keys in the map should be identifiers describing the type
of the corresponding load, ideally also including the units.
For example: "weight_kg", "volume_gallons", "pallet_count", etc.
If a given key does not appear in the map, the corresponding load is
considered as null.
map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 14;
Returns
getLoadDemandsMap()
public Map<String,Shipment.Load> getLoadDemandsMap()
Load demands of the shipment (for example weight, volume, number of
pallets etc). The keys in the map should be identifiers describing the type
of the corresponding load, ideally also including the units.
For example: "weight_kg", "volume_gallons", "pallet_count", etc.
If a given key does not appear in the map, the corresponding load is
considered as null.
map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 14;
Returns
getLoadDemandsOrDefault(String key, Shipment.Load defaultValue)
public Shipment.Load getLoadDemandsOrDefault(String key, Shipment.Load defaultValue)
Load demands of the shipment (for example weight, volume, number of
pallets etc). The keys in the map should be identifiers describing the type
of the corresponding load, ideally also including the units.
For example: "weight_kg", "volume_gallons", "pallet_count", etc.
If a given key does not appear in the map, the corresponding load is
considered as null.
map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 14;
Parameters
Returns
getLoadDemandsOrThrow(String key)
public Shipment.Load getLoadDemandsOrThrow(String key)
Load demands of the shipment (for example weight, volume, number of
pallets etc). The keys in the map should be identifiers describing the type
of the corresponding load, ideally also including the units.
For example: "weight_kg", "volume_gallons", "pallet_count", etc.
If a given key does not appear in the map, the corresponding load is
considered as null.
map<string, .google.cloud.optimization.v1.Shipment.Load> load_demands = 14;
Parameter
Returns
getParserForType()
public Parser<Shipment> getParserForType()
Returns
Overrides
getPenaltyCost()
public double getPenaltyCost()
If the shipment is not completed, this penalty is added to the overall
cost of the routes. A shipment is considered completed if one of its pickup
and delivery alternatives is visited. The cost may be expressed in the
same unit used for all other cost-related fields in the model and must be
positive.
IMPORTANT: If this penalty is not specified, it is considered infinite,
i.e. the shipment must be completed.
optional double penalty_cost = 4;
Returns
Type | Description |
double | The penaltyCost.
|
getPickupToDeliveryAbsoluteDetourLimit()
public Duration getPickupToDeliveryAbsoluteDetourLimit()
Specifies the maximum absolute detour time compared to the shortest path
from pickup to delivery. If specified, it must be nonnegative, and the
shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_absolute_detour_limit
enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
t + pickup_to_delivery_absolute_detour_limit
</code></code>
If both relative and absolute limits are specified on the same shipment,
the more constraining limit is used for each possible pickup/delivery pair.
As of 2017/10, detours are only supported when travel durations do not
depend on vehicles.
.google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9;
Returns
Type | Description |
Duration | The pickupToDeliveryAbsoluteDetourLimit.
|
getPickupToDeliveryAbsoluteDetourLimitOrBuilder()
public DurationOrBuilder getPickupToDeliveryAbsoluteDetourLimitOrBuilder()
Specifies the maximum absolute detour time compared to the shortest path
from pickup to delivery. If specified, it must be nonnegative, and the
shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_absolute_detour_limit
enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
t + pickup_to_delivery_absolute_detour_limit
</code></code>
If both relative and absolute limits are specified on the same shipment,
the more constraining limit is used for each possible pickup/delivery pair.
As of 2017/10, detours are only supported when travel durations do not
depend on vehicles.
.google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9;
Returns
getPickupToDeliveryRelativeDetourLimit()
public double getPickupToDeliveryRelativeDetourLimit()
Specifies the maximum relative detour time compared to the shortest path
from pickup to delivery. If specified, it must be nonnegative, and the
shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_relative_detour_limit
enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit))
</code></code>
If both relative and absolute limits are specified on the same shipment,
the more constraining limit is used for each possible pickup/delivery pair.
As of 2017/10, detours are only supported when travel durations do not
depend on vehicles.
optional double pickup_to_delivery_relative_detour_limit = 8;
Returns
Type | Description |
double | The pickupToDeliveryRelativeDetourLimit.
|
getPickupToDeliveryTimeLimit()
public Duration getPickupToDeliveryTimeLimit()
Specifies the maximum duration from start of pickup to start of delivery of
a shipment. If specified, it must be nonnegative, and the shipment must
contain at least a pickup and a delivery. This does not depend on which
alternatives are selected for pickup and delivery, nor on vehicle speed.
This can be specified alongside maximum detour constraints: the solution
will respect both specifications.
.google.protobuf.Duration pickup_to_delivery_time_limit = 10;
Returns
Type | Description |
Duration | The pickupToDeliveryTimeLimit.
|
getPickupToDeliveryTimeLimitOrBuilder()
public DurationOrBuilder getPickupToDeliveryTimeLimitOrBuilder()
Specifies the maximum duration from start of pickup to start of delivery of
a shipment. If specified, it must be nonnegative, and the shipment must
contain at least a pickup and a delivery. This does not depend on which
alternatives are selected for pickup and delivery, nor on vehicle speed.
This can be specified alongside maximum detour constraints: the solution
will respect both specifications.
.google.protobuf.Duration pickup_to_delivery_time_limit = 10;
Returns
getPickups(int index)
public Shipment.VisitRequest getPickups(int index)
Set of pickup alternatives associated to the shipment. If not specified,
the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
Parameter
Returns
getPickupsCount()
public int getPickupsCount()
Set of pickup alternatives associated to the shipment. If not specified,
the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
Returns
getPickupsList()
public List<Shipment.VisitRequest> getPickupsList()
Set of pickup alternatives associated to the shipment. If not specified,
the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
Returns
getPickupsOrBuilder(int index)
public Shipment.VisitRequestOrBuilder getPickupsOrBuilder(int index)
Set of pickup alternatives associated to the shipment. If not specified,
the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
Parameter
Returns
getPickupsOrBuilderList()
public List<? extends Shipment.VisitRequestOrBuilder> getPickupsOrBuilderList()
Set of pickup alternatives associated to the shipment. If not specified,
the vehicle only needs to visit a location corresponding to the deliveries.
repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1;
Returns
Type | Description |
List<? extends com.google.cloud.optimization.v1.Shipment.VisitRequestOrBuilder> | |
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getShipmentType()
public String getShipmentType()
Non-empty string specifying a "type" for this shipment.
This feature can be used to define incompatibilities or requirements
between shipment_types
(see shipment_type_incompatibilities
and
shipment_type_requirements
in ShipmentModel
).
Differs from visit_types
which is specified for a single visit: All
pickup/deliveries belonging to the same shipment share the same
shipment_type
.
string shipment_type = 11;
Returns
Type | Description |
String | The shipmentType.
|
getShipmentTypeBytes()
public ByteString getShipmentTypeBytes()
Non-empty string specifying a "type" for this shipment.
This feature can be used to define incompatibilities or requirements
between shipment_types
(see shipment_type_incompatibilities
and
shipment_type_requirements
in ShipmentModel
).
Differs from visit_types
which is specified for a single visit: All
pickup/deliveries belonging to the same shipment share the same
shipment_type
.
string shipment_type = 11;
Returns
Type | Description |
ByteString | The bytes for shipmentType.
|
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hasPenaltyCost()
public boolean hasPenaltyCost()
If the shipment is not completed, this penalty is added to the overall
cost of the routes. A shipment is considered completed if one of its pickup
and delivery alternatives is visited. The cost may be expressed in the
same unit used for all other cost-related fields in the model and must be
positive.
IMPORTANT: If this penalty is not specified, it is considered infinite,
i.e. the shipment must be completed.
optional double penalty_cost = 4;
Returns
Type | Description |
boolean | Whether the penaltyCost field is set.
|
hasPickupToDeliveryAbsoluteDetourLimit()
public boolean hasPickupToDeliveryAbsoluteDetourLimit()
Specifies the maximum absolute detour time compared to the shortest path
from pickup to delivery. If specified, it must be nonnegative, and the
shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_absolute_detour_limit
enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
t + pickup_to_delivery_absolute_detour_limit
</code></code>
If both relative and absolute limits are specified on the same shipment,
the more constraining limit is used for each possible pickup/delivery pair.
As of 2017/10, detours are only supported when travel durations do not
depend on vehicles.
.google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9;
Returns
Type | Description |
boolean | Whether the pickupToDeliveryAbsoluteDetourLimit field is set.
|
hasPickupToDeliveryRelativeDetourLimit()
public boolean hasPickupToDeliveryRelativeDetourLimit()
Specifies the maximum relative detour time compared to the shortest path
from pickup to delivery. If specified, it must be nonnegative, and the
shipment must contain at least a pickup and a delivery.
For example, let t be the shortest time taken to go from the selected
pickup alternative directly to the selected delivery alternative. Then
setting pickup_to_delivery_relative_detour_limit
enforces:
<code><code>
start_time(delivery) - start_time(pickup) <=
std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit))
</code></code>
If both relative and absolute limits are specified on the same shipment,
the more constraining limit is used for each possible pickup/delivery pair.
As of 2017/10, detours are only supported when travel durations do not
depend on vehicles.
optional double pickup_to_delivery_relative_detour_limit = 8;
Returns
Type | Description |
boolean | Whether the pickupToDeliveryRelativeDetourLimit field is set.
|
hasPickupToDeliveryTimeLimit()
public boolean hasPickupToDeliveryTimeLimit()
Specifies the maximum duration from start of pickup to start of delivery of
a shipment. If specified, it must be nonnegative, and the shipment must
contain at least a pickup and a delivery. This does not depend on which
alternatives are selected for pickup and delivery, nor on vehicle speed.
This can be specified alongside maximum detour constraints: the solution
will respect both specifications.
.google.protobuf.Duration pickup_to_delivery_time_limit = 10;
Returns
Type | Description |
boolean | Whether the pickupToDeliveryTimeLimit field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public Shipment.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Shipment.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public Shipment.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions