Package com.google.cloud.optimization.v1
Class Shipment
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.optimization.v1.Shipment
-
- All Implemented Interfaces:
ShipmentOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
public final class Shipment extends com.google.protobuf.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 typegoogle.cloud.optimization.v1.Shipment- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classShipment.BuilderThe shipment of a single item, from one of its pickups to one of its deliveries.static classShipment.LoadWhen performing a visit, a predefined amount may be added to the vehicle load if it's a pickup, or subtracted if it's a delivery.static interfaceShipment.LoadOrBuilderstatic classShipment.VisitRequestRequest for a visit which can be done by a vehicle: it has a geo-location (or two, see below), opening and closing times represented by time windows, and a service duration time (time spent by the vehicle once it has arrived to pickup or drop off goods).static interfaceShipment.VisitRequestOrBuilder-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intALLOWED_VEHICLE_INDICES_FIELD_NUMBERstatic intCOSTS_PER_VEHICLE_FIELD_NUMBERstatic intCOSTS_PER_VEHICLE_INDICES_FIELD_NUMBERstatic intDELIVERIES_FIELD_NUMBERstatic intDEMANDS_FIELD_NUMBERstatic intIGNORE_FIELD_NUMBERstatic intLABEL_FIELD_NUMBERstatic intLOAD_DEMANDS_FIELD_NUMBERstatic intPENALTY_COST_FIELD_NUMBERstatic intPICKUP_TO_DELIVERY_ABSOLUTE_DETOUR_LIMIT_FIELD_NUMBERstatic intPICKUP_TO_DELIVERY_RELATIVE_DETOUR_LIMIT_FIELD_NUMBERstatic intPICKUP_TO_DELIVERY_TIME_LIMIT_FIELD_NUMBERstatic intPICKUPS_FIELD_NUMBERstatic intSHIPMENT_TYPE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancontainsLoadDemands(String key)Load demands of the shipment (for example weight, volume, number of pallets etc).booleanequals(Object obj)intgetAllowedVehicleIndices(int index)The set of vehicles that may perform this shipment.intgetAllowedVehicleIndicesCount()The set of vehicles that may perform this shipment.List<Integer>getAllowedVehicleIndicesList()The set of vehicles that may perform this shipment.doublegetCostsPerVehicle(int index)Specifies the cost that is incurred when this shipment is delivered by each vehicle.intgetCostsPerVehicleCount()Specifies the cost that is incurred when this shipment is delivered by each vehicle.intgetCostsPerVehicleIndices(int index)Indices of the vehicles to which `costs_per_vehicle` applies.intgetCostsPerVehicleIndicesCount()Indices of the vehicles to which `costs_per_vehicle` applies.List<Integer>getCostsPerVehicleIndicesList()Indices of the vehicles to which `costs_per_vehicle` applies.List<Double>getCostsPerVehicleList()Specifies the cost that is incurred when this shipment is delivered by each vehicle.static ShipmentgetDefaultInstance()ShipmentgetDefaultInstanceForType()Shipment.VisitRequestgetDeliveries(int index)Set of delivery alternatives associated to the shipment.intgetDeliveriesCount()Set of delivery alternatives associated to the shipment.List<Shipment.VisitRequest>getDeliveriesList()Set of delivery alternatives associated to the shipment.Shipment.VisitRequestOrBuildergetDeliveriesOrBuilder(int index)Set of delivery alternatives associated to the shipment.List<? extends Shipment.VisitRequestOrBuilder>getDeliveriesOrBuilderList()Set of delivery alternatives associated to the shipment.CapacityQuantitygetDemands(int index)Deprecated.intgetDemandsCount()Deprecated.List<CapacityQuantity>getDemandsList()Deprecated.CapacityQuantityOrBuildergetDemandsOrBuilder(int index)Deprecated.List<? extends CapacityQuantityOrBuilder>getDemandsOrBuilderList()Deprecated.static com.google.protobuf.Descriptors.DescriptorgetDescriptor()booleangetIgnore()If true, skip this shipment, but don't apply a `penalty_cost`.StringgetLabel()Specifies a label for this shipment.com.google.protobuf.ByteStringgetLabelBytes()Specifies a label for this shipment.Map<String,Shipment.Load>getLoadDemands()Deprecated.intgetLoadDemandsCount()Load demands of the shipment (for example weight, volume, number of pallets etc).Map<String,Shipment.Load>getLoadDemandsMap()Load demands of the shipment (for example weight, volume, number of pallets etc).Shipment.LoadgetLoadDemandsOrDefault(String key, Shipment.Load defaultValue)Load demands of the shipment (for example weight, volume, number of pallets etc).Shipment.LoadgetLoadDemandsOrThrow(String key)Load demands of the shipment (for example weight, volume, number of pallets etc).com.google.protobuf.Parser<Shipment>getParserForType()doublegetPenaltyCost()If the shipment is not completed, this penalty is added to the overall cost of the routes.Shipment.VisitRequestgetPickups(int index)Set of pickup alternatives associated to the shipment.intgetPickupsCount()Set of pickup alternatives associated to the shipment.List<Shipment.VisitRequest>getPickupsList()Set of pickup alternatives associated to the shipment.Shipment.VisitRequestOrBuildergetPickupsOrBuilder(int index)Set of pickup alternatives associated to the shipment.List<? extends Shipment.VisitRequestOrBuilder>getPickupsOrBuilderList()Set of pickup alternatives associated to the shipment.com.google.protobuf.DurationgetPickupToDeliveryAbsoluteDetourLimit()Specifies the maximum absolute detour time compared to the shortest path from pickup to delivery.com.google.protobuf.DurationOrBuildergetPickupToDeliveryAbsoluteDetourLimitOrBuilder()Specifies the maximum absolute detour time compared to the shortest path from pickup to delivery.doublegetPickupToDeliveryRelativeDetourLimit()Specifies the maximum relative detour time compared to the shortest path from pickup to delivery.com.google.protobuf.DurationgetPickupToDeliveryTimeLimit()Specifies the maximum duration from start of pickup to start of delivery of a shipment.com.google.protobuf.DurationOrBuildergetPickupToDeliveryTimeLimitOrBuilder()Specifies the maximum duration from start of pickup to start of delivery of a shipment.intgetSerializedSize()StringgetShipmentType()Non-empty string specifying a "type" for this shipment.com.google.protobuf.ByteStringgetShipmentTypeBytes()Non-empty string specifying a "type" for this shipment.inthashCode()booleanhasPenaltyCost()If the shipment is not completed, this penalty is added to the overall cost of the routes.booleanhasPickupToDeliveryAbsoluteDetourLimit()Specifies the maximum absolute detour time compared to the shortest path from pickup to delivery.booleanhasPickupToDeliveryRelativeDetourLimit()Specifies the maximum relative detour time compared to the shortest path from pickup to delivery.booleanhasPickupToDeliveryTimeLimit()Specifies the maximum duration from start of pickup to start of delivery of a shipment.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()protected com.google.protobuf.MapFieldinternalGetMapField(int number)booleanisInitialized()static Shipment.BuildernewBuilder()static Shipment.BuildernewBuilder(Shipment prototype)Shipment.BuildernewBuilderForType()protected Shipment.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static ShipmentparseDelimitedFrom(InputStream input)static ShipmentparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ShipmentparseFrom(byte[] data)static ShipmentparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ShipmentparseFrom(com.google.protobuf.ByteString data)static ShipmentparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ShipmentparseFrom(com.google.protobuf.CodedInputStream input)static ShipmentparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ShipmentparseFrom(InputStream input)static ShipmentparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static ShipmentparseFrom(ByteBuffer data)static ShipmentparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<Shipment>parser()Shipment.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
PICKUPS_FIELD_NUMBER
public static final int PICKUPS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DELIVERIES_FIELD_NUMBER
public static final int DELIVERIES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LOAD_DEMANDS_FIELD_NUMBER
public static final int LOAD_DEMANDS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PENALTY_COST_FIELD_NUMBER
public static final int PENALTY_COST_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ALLOWED_VEHICLE_INDICES_FIELD_NUMBER
public static final int ALLOWED_VEHICLE_INDICES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
COSTS_PER_VEHICLE_FIELD_NUMBER
public static final int COSTS_PER_VEHICLE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
COSTS_PER_VEHICLE_INDICES_FIELD_NUMBER
public static final int COSTS_PER_VEHICLE_INDICES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PICKUP_TO_DELIVERY_RELATIVE_DETOUR_LIMIT_FIELD_NUMBER
public static final int PICKUP_TO_DELIVERY_RELATIVE_DETOUR_LIMIT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PICKUP_TO_DELIVERY_ABSOLUTE_DETOUR_LIMIT_FIELD_NUMBER
public static final int PICKUP_TO_DELIVERY_ABSOLUTE_DETOUR_LIMIT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PICKUP_TO_DELIVERY_TIME_LIMIT_FIELD_NUMBER
public static final int PICKUP_TO_DELIVERY_TIME_LIMIT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SHIPMENT_TYPE_FIELD_NUMBER
public static final int SHIPMENT_TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LABEL_FIELD_NUMBER
public static final int LABEL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
IGNORE_FIELD_NUMBER
public static final int IGNORE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DEMANDS_FIELD_NUMBER
public static final int DEMANDS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapFieldin classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
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;- Specified by:
getPickupsListin interfaceShipmentOrBuilder
-
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;- Specified by:
getPickupsOrBuilderListin interfaceShipmentOrBuilder
-
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;- Specified by:
getPickupsCountin interfaceShipmentOrBuilder
-
getPickups
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;- Specified by:
getPickupsin interfaceShipmentOrBuilder
-
getPickupsOrBuilder
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;- Specified by:
getPickupsOrBuilderin interfaceShipmentOrBuilder
-
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;- Specified by:
getDeliveriesListin interfaceShipmentOrBuilder
-
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;- Specified by:
getDeliveriesOrBuilderListin interfaceShipmentOrBuilder
-
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;- Specified by:
getDeliveriesCountin interfaceShipmentOrBuilder
-
getDeliveries
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;- Specified by:
getDeliveriesin interfaceShipmentOrBuilder
-
getDeliveriesOrBuilder
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;- Specified by:
getDeliveriesOrBuilderin interfaceShipmentOrBuilder
-
getLoadDemandsCount
public int getLoadDemandsCount()
Description copied from interface:ShipmentOrBuilderLoad 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;- Specified by:
getLoadDemandsCountin interfaceShipmentOrBuilder
-
containsLoadDemands
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;- Specified by:
containsLoadDemandsin interfaceShipmentOrBuilder
-
getLoadDemands
@Deprecated public Map<String,Shipment.Load> getLoadDemands()
Deprecated.UsegetLoadDemandsMap()instead.- Specified by:
getLoadDemandsin interfaceShipmentOrBuilder
-
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;- Specified by:
getLoadDemandsMapin interfaceShipmentOrBuilder
-
getLoadDemandsOrDefault
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;- Specified by:
getLoadDemandsOrDefaultin interfaceShipmentOrBuilder
-
getLoadDemandsOrThrow
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;- Specified by:
getLoadDemandsOrThrowin interfaceShipmentOrBuilder
-
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;- Specified by:
hasPenaltyCostin interfaceShipmentOrBuilder- Returns:
- Whether the penaltyCost field is set.
-
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;- Specified by:
getPenaltyCostin interfaceShipmentOrBuilder- Returns:
- The penaltyCost.
-
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;- Specified by:
getAllowedVehicleIndicesListin interfaceShipmentOrBuilder- Returns:
- A list containing the allowedVehicleIndices.
-
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;- Specified by:
getAllowedVehicleIndicesCountin interfaceShipmentOrBuilder- Returns:
- The count of allowedVehicleIndices.
-
getAllowedVehicleIndices
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;- Specified by:
getAllowedVehicleIndicesin interfaceShipmentOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The allowedVehicleIndices at the given index.
-
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;- Specified by:
getCostsPerVehicleListin interfaceShipmentOrBuilder- Returns:
- A list containing the costsPerVehicle.
-
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;- Specified by:
getCostsPerVehicleCountin interfaceShipmentOrBuilder- Returns:
- The count of costsPerVehicle.
-
getCostsPerVehicle
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;- Specified by:
getCostsPerVehiclein interfaceShipmentOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The costsPerVehicle at the given index.
-
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;- Specified by:
getCostsPerVehicleIndicesListin interfaceShipmentOrBuilder- Returns:
- A list containing the costsPerVehicleIndices.
-
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;- Specified by:
getCostsPerVehicleIndicesCountin interfaceShipmentOrBuilder- Returns:
- The count of costsPerVehicleIndices.
-
getCostsPerVehicleIndices
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;- Specified by:
getCostsPerVehicleIndicesin interfaceShipmentOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The costsPerVehicleIndices at the given index.
-
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: ``` start_time(delivery) - start_time(pickup) <= std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) ``` 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;- Specified by:
hasPickupToDeliveryRelativeDetourLimitin interfaceShipmentOrBuilder- Returns:
- Whether the pickupToDeliveryRelativeDetourLimit field is set.
-
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: ``` start_time(delivery) - start_time(pickup) <= std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) ``` 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;- Specified by:
getPickupToDeliveryRelativeDetourLimitin interfaceShipmentOrBuilder- Returns:
- The pickupToDeliveryRelativeDetourLimit.
-
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: ``` start_time(delivery) - start_time(pickup) <= t + pickup_to_delivery_absolute_detour_limit ``` 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;- Specified by:
hasPickupToDeliveryAbsoluteDetourLimitin interfaceShipmentOrBuilder- Returns:
- Whether the pickupToDeliveryAbsoluteDetourLimit field is set.
-
getPickupToDeliveryAbsoluteDetourLimit
public com.google.protobuf.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: ``` start_time(delivery) - start_time(pickup) <= t + pickup_to_delivery_absolute_detour_limit ``` 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;- Specified by:
getPickupToDeliveryAbsoluteDetourLimitin interfaceShipmentOrBuilder- Returns:
- The pickupToDeliveryAbsoluteDetourLimit.
-
getPickupToDeliveryAbsoluteDetourLimitOrBuilder
public com.google.protobuf.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: ``` start_time(delivery) - start_time(pickup) <= t + pickup_to_delivery_absolute_detour_limit ``` 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;- Specified by:
getPickupToDeliveryAbsoluteDetourLimitOrBuilderin interfaceShipmentOrBuilder
-
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;- Specified by:
hasPickupToDeliveryTimeLimitin interfaceShipmentOrBuilder- Returns:
- Whether the pickupToDeliveryTimeLimit field is set.
-
getPickupToDeliveryTimeLimit
public com.google.protobuf.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;- Specified by:
getPickupToDeliveryTimeLimitin interfaceShipmentOrBuilder- Returns:
- The pickupToDeliveryTimeLimit.
-
getPickupToDeliveryTimeLimitOrBuilder
public com.google.protobuf.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;- Specified by:
getPickupToDeliveryTimeLimitOrBuilderin interfaceShipmentOrBuilder
-
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;- Specified by:
getShipmentTypein interfaceShipmentOrBuilder- Returns:
- The shipmentType.
-
getShipmentTypeBytes
public com.google.protobuf.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;- Specified by:
getShipmentTypeBytesin interfaceShipmentOrBuilder- Returns:
- The bytes for shipmentType.
-
getLabel
public String getLabel()
Specifies a label for this shipment. This label is reported in the response in the `shipment_label` of the corresponding [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit].
string label = 12;- Specified by:
getLabelin interfaceShipmentOrBuilder- Returns:
- The label.
-
getLabelBytes
public com.google.protobuf.ByteString getLabelBytes()
Specifies a label for this shipment. This label is reported in the response in the `shipment_label` of the corresponding [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit].
string label = 12;- Specified by:
getLabelBytesin interfaceShipmentOrBuilder- Returns:
- The bytes for label.
-
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;- Specified by:
getIgnorein interfaceShipmentOrBuilder- Returns:
- The ignore.
-
getDemandsList
@Deprecated public List<CapacityQuantity> getDemandsList()
Deprecated.Deprecated: Use [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];- Specified by:
getDemandsListin interfaceShipmentOrBuilder
-
getDemandsOrBuilderList
@Deprecated public List<? extends CapacityQuantityOrBuilder> getDemandsOrBuilderList()
Deprecated.Deprecated: Use [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];- Specified by:
getDemandsOrBuilderListin interfaceShipmentOrBuilder
-
getDemandsCount
@Deprecated public int getDemandsCount()
Deprecated.Deprecated: Use [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];- Specified by:
getDemandsCountin interfaceShipmentOrBuilder
-
getDemands
@Deprecated public CapacityQuantity getDemands(int index)
Deprecated.Deprecated: Use [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];- Specified by:
getDemandsin interfaceShipmentOrBuilder
-
getDemandsOrBuilder
@Deprecated public CapacityQuantityOrBuilder getDemandsOrBuilder(int index)
Deprecated.Deprecated: Use [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] instead.
repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true];- Specified by:
getDemandsOrBuilderin interfaceShipmentOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Shipment parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Shipment parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Shipment parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Shipment parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Shipment parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Shipment parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Shipment parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Shipment parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Shipment parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Shipment parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static Shipment parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Shipment parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public Shipment.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Shipment.Builder newBuilder()
-
newBuilder
public static Shipment.Builder newBuilder(Shipment prototype)
-
toBuilder
public Shipment.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Shipment.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Shipment getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Shipment> parser()
-
getParserForType
public com.google.protobuf.Parser<Shipment> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Shipment getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-