Class: Google::Cloud::Optimization::V1::Shipment
- Inherits:
-
Object
- Object
- Google::Cloud::Optimization::V1::Shipment
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/optimization/v1/fleet_routing.rb
Overview
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).
Defined Under Namespace
Classes: Load, LoadDemandsEntry, VisitRequest
Instance Attribute Summary collapse
-
#allowed_vehicle_indices ⇒ ::Array<::Integer>
The set of vehicles that may perform this shipment.
-
#costs_per_vehicle ⇒ ::Array<::Float>
Specifies the cost that is incurred when this shipment is delivered by each vehicle.
-
#costs_per_vehicle_indices ⇒ ::Array<::Integer>
Indices of the vehicles to which
costs_per_vehicle
applies. -
#deliveries ⇒ ::Array<::Google::Cloud::Optimization::V1::Shipment::VisitRequest>
Set of delivery alternatives associated to the shipment.
-
#demands ⇒ ::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>
deprecated
Deprecated.
This field is deprecated and may be removed in the next major version update.
-
#ignore ⇒ ::Boolean
If true, skip this shipment, but don't apply a
penalty_cost
. -
#label ⇒ ::String
Specifies a label for this shipment.
-
#load_demands ⇒ ::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}
Load demands of the shipment (for example weight, volume, number of pallets etc).
-
#penalty_cost ⇒ ::Float
If the shipment is not completed, this penalty is added to the overall cost of the routes.
-
#pickup_to_delivery_absolute_detour_limit ⇒ ::Google::Protobuf::Duration
Specifies the maximum absolute detour time compared to the shortest path from pickup to delivery.
-
#pickup_to_delivery_relative_detour_limit ⇒ ::Float
Specifies the maximum relative detour time compared to the shortest path from pickup to delivery.
-
#pickup_to_delivery_time_limit ⇒ ::Google::Protobuf::Duration
Specifies the maximum duration from start of pickup to start of delivery of a shipment.
-
#pickups ⇒ ::Array<::Google::Cloud::Optimization::V1::Shipment::VisitRequest>
Set of pickup alternatives associated to the shipment.
-
#shipment_type ⇒ ::String
Non-empty string specifying a "type" for this shipment.
Instance Attribute Details
#allowed_vehicle_indices ⇒ ::Array<::Integer>
Returns 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.
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 913 class Shipment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Request 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). # @!attribute [rw] arrival_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_location` must not be specified. # @!attribute [rw] arrival_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_waypoint` must not be specified. # @!attribute [rw] departure_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_location`. # If the shipment model has duration distance matrices, # `departure_location` must not be specified. # @!attribute [rw] departure_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. # If the shipment model has duration distance matrices, # `departure_waypoint` must not be specified. # @!attribute [rw] tags # @return [::Array<::String>] # Specifies tags attached to the visit request. # Empty or duplicate strings are not allowed. # @!attribute [rw] time_windows # @return [::Array<::Google::Cloud::Optimization::V1::TimeWindow>] # Time windows which constrain the arrival time at a visit. # Note that a vehicle may depart outside of the arrival time window, i.e. # arrival time + duration do not need to be inside a time window. This can # result in waiting time if the vehicle arrives before # {::Google::Cloud::Optimization::V1::TimeWindow#start_time TimeWindow.start_time}. # # The absence of `TimeWindow` means that the vehicle can perform this visit # at any time. # # Time windows must be disjoint, i.e. no time window must overlap with or # be adjacent to another, and they must be in increasing order. # # `cost_per_hour_after_soft_end_time` and `soft_end_time` can only # be set if there is a single time window. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of the visit, i.e. time spent by the vehicle between arrival # and departure (to be added to the possible waiting time; see # `time_windows`). # @!attribute [rw] cost # @return [::Float] # Cost to service this visit request on a vehicle route. This can be used # to pay different costs for each alternative pickup or delivery of a # shipment. This cost must be in the same unit as `Shipment.penalty_cost` # and must not be negative. # @!attribute [rw] load_demands # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}] # Load demands of this visit request. This is just like # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands} # field, except that it only applies to this # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest VisitRequest} # instead of the whole {::Google::Cloud::Optimization::V1::Shipment Shipment}. # The demands listed here are added to the demands listed in # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands}. # @!attribute [rw] visit_types # @return [::Array<::String>] # Specifies the types of the visit. This may be used to allocate additional # time required for a vehicle to complete this visit (see # {::Google::Cloud::Optimization::V1::Vehicle#extra_visit_duration_for_visit_type Vehicle.extra_visit_duration_for_visit_type}). # # A type can only appear once. # @!attribute [rw] label # @return [::String] # Specifies a label for this `VisitRequest`. This label is reported in the # response as `visit_label` in the corresponding # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit ShipmentRoute.Visit}. # @!attribute [rw] demands # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>] # Deprecated: Use # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest#load_demands VisitRequest.load_demands} # instead. class VisitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # When 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. This message # defines such amount. See # {::Google::Cloud::Optimization::V1::Shipment#load_demands load_demands}. # @!attribute [rw] amount # @return [::Integer] # The amount by which the load of the vehicle performing the corresponding # visit will vary. Since it is an integer, users are advised to choose an # appropriate unit to avoid loss of precision. Must be ≥ 0. class Load include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#costs_per_vehicle ⇒ ::Array<::Float>
Returns 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 vehiclecosts_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.
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 913 class Shipment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Request 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). # @!attribute [rw] arrival_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_location` must not be specified. # @!attribute [rw] arrival_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_waypoint` must not be specified. # @!attribute [rw] departure_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_location`. # If the shipment model has duration distance matrices, # `departure_location` must not be specified. # @!attribute [rw] departure_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. # If the shipment model has duration distance matrices, # `departure_waypoint` must not be specified. # @!attribute [rw] tags # @return [::Array<::String>] # Specifies tags attached to the visit request. # Empty or duplicate strings are not allowed. # @!attribute [rw] time_windows # @return [::Array<::Google::Cloud::Optimization::V1::TimeWindow>] # Time windows which constrain the arrival time at a visit. # Note that a vehicle may depart outside of the arrival time window, i.e. # arrival time + duration do not need to be inside a time window. This can # result in waiting time if the vehicle arrives before # {::Google::Cloud::Optimization::V1::TimeWindow#start_time TimeWindow.start_time}. # # The absence of `TimeWindow` means that the vehicle can perform this visit # at any time. # # Time windows must be disjoint, i.e. no time window must overlap with or # be adjacent to another, and they must be in increasing order. # # `cost_per_hour_after_soft_end_time` and `soft_end_time` can only # be set if there is a single time window. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of the visit, i.e. time spent by the vehicle between arrival # and departure (to be added to the possible waiting time; see # `time_windows`). # @!attribute [rw] cost # @return [::Float] # Cost to service this visit request on a vehicle route. This can be used # to pay different costs for each alternative pickup or delivery of a # shipment. This cost must be in the same unit as `Shipment.penalty_cost` # and must not be negative. # @!attribute [rw] load_demands # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}] # Load demands of this visit request. This is just like # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands} # field, except that it only applies to this # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest VisitRequest} # instead of the whole {::Google::Cloud::Optimization::V1::Shipment Shipment}. # The demands listed here are added to the demands listed in # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands}. # @!attribute [rw] visit_types # @return [::Array<::String>] # Specifies the types of the visit. This may be used to allocate additional # time required for a vehicle to complete this visit (see # {::Google::Cloud::Optimization::V1::Vehicle#extra_visit_duration_for_visit_type Vehicle.extra_visit_duration_for_visit_type}). # # A type can only appear once. # @!attribute [rw] label # @return [::String] # Specifies a label for this `VisitRequest`. This label is reported in the # response as `visit_label` in the corresponding # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit ShipmentRoute.Visit}. # @!attribute [rw] demands # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>] # Deprecated: Use # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest#load_demands VisitRequest.load_demands} # instead. class VisitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # When 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. This message # defines such amount. See # {::Google::Cloud::Optimization::V1::Shipment#load_demands load_demands}. # @!attribute [rw] amount # @return [::Integer] # The amount by which the load of the vehicle performing the corresponding # visit will vary. Since it is an integer, users are advised to choose an # appropriate unit to avoid loss of precision. Must be ≥ 0. class Load include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#costs_per_vehicle_indices ⇒ ::Array<::Integer>
Returns 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.
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 913 class Shipment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Request 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). # @!attribute [rw] arrival_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_location` must not be specified. # @!attribute [rw] arrival_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_waypoint` must not be specified. # @!attribute [rw] departure_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_location`. # If the shipment model has duration distance matrices, # `departure_location` must not be specified. # @!attribute [rw] departure_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. # If the shipment model has duration distance matrices, # `departure_waypoint` must not be specified. # @!attribute [rw] tags # @return [::Array<::String>] # Specifies tags attached to the visit request. # Empty or duplicate strings are not allowed. # @!attribute [rw] time_windows # @return [::Array<::Google::Cloud::Optimization::V1::TimeWindow>] # Time windows which constrain the arrival time at a visit. # Note that a vehicle may depart outside of the arrival time window, i.e. # arrival time + duration do not need to be inside a time window. This can # result in waiting time if the vehicle arrives before # {::Google::Cloud::Optimization::V1::TimeWindow#start_time TimeWindow.start_time}. # # The absence of `TimeWindow` means that the vehicle can perform this visit # at any time. # # Time windows must be disjoint, i.e. no time window must overlap with or # be adjacent to another, and they must be in increasing order. # # `cost_per_hour_after_soft_end_time` and `soft_end_time` can only # be set if there is a single time window. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of the visit, i.e. time spent by the vehicle between arrival # and departure (to be added to the possible waiting time; see # `time_windows`). # @!attribute [rw] cost # @return [::Float] # Cost to service this visit request on a vehicle route. This can be used # to pay different costs for each alternative pickup or delivery of a # shipment. This cost must be in the same unit as `Shipment.penalty_cost` # and must not be negative. # @!attribute [rw] load_demands # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}] # Load demands of this visit request. This is just like # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands} # field, except that it only applies to this # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest VisitRequest} # instead of the whole {::Google::Cloud::Optimization::V1::Shipment Shipment}. # The demands listed here are added to the demands listed in # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands}. # @!attribute [rw] visit_types # @return [::Array<::String>] # Specifies the types of the visit. This may be used to allocate additional # time required for a vehicle to complete this visit (see # {::Google::Cloud::Optimization::V1::Vehicle#extra_visit_duration_for_visit_type Vehicle.extra_visit_duration_for_visit_type}). # # A type can only appear once. # @!attribute [rw] label # @return [::String] # Specifies a label for this `VisitRequest`. This label is reported in the # response as `visit_label` in the corresponding # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit ShipmentRoute.Visit}. # @!attribute [rw] demands # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>] # Deprecated: Use # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest#load_demands VisitRequest.load_demands} # instead. class VisitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # When 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. This message # defines such amount. See # {::Google::Cloud::Optimization::V1::Shipment#load_demands load_demands}. # @!attribute [rw] amount # @return [::Integer] # The amount by which the load of the vehicle performing the corresponding # visit will vary. Since it is an integer, users are advised to choose an # appropriate unit to avoid loss of precision. Must be ≥ 0. class Load include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#deliveries ⇒ ::Array<::Google::Cloud::Optimization::V1::Shipment::VisitRequest>
Returns Set of delivery alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the pickups.
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 913 class Shipment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Request 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). # @!attribute [rw] arrival_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_location` must not be specified. # @!attribute [rw] arrival_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_waypoint` must not be specified. # @!attribute [rw] departure_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_location`. # If the shipment model has duration distance matrices, # `departure_location` must not be specified. # @!attribute [rw] departure_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. # If the shipment model has duration distance matrices, # `departure_waypoint` must not be specified. # @!attribute [rw] tags # @return [::Array<::String>] # Specifies tags attached to the visit request. # Empty or duplicate strings are not allowed. # @!attribute [rw] time_windows # @return [::Array<::Google::Cloud::Optimization::V1::TimeWindow>] # Time windows which constrain the arrival time at a visit. # Note that a vehicle may depart outside of the arrival time window, i.e. # arrival time + duration do not need to be inside a time window. This can # result in waiting time if the vehicle arrives before # {::Google::Cloud::Optimization::V1::TimeWindow#start_time TimeWindow.start_time}. # # The absence of `TimeWindow` means that the vehicle can perform this visit # at any time. # # Time windows must be disjoint, i.e. no time window must overlap with or # be adjacent to another, and they must be in increasing order. # # `cost_per_hour_after_soft_end_time` and `soft_end_time` can only # be set if there is a single time window. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of the visit, i.e. time spent by the vehicle between arrival # and departure (to be added to the possible waiting time; see # `time_windows`). # @!attribute [rw] cost # @return [::Float] # Cost to service this visit request on a vehicle route. This can be used # to pay different costs for each alternative pickup or delivery of a # shipment. This cost must be in the same unit as `Shipment.penalty_cost` # and must not be negative. # @!attribute [rw] load_demands # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}] # Load demands of this visit request. This is just like # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands} # field, except that it only applies to this # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest VisitRequest} # instead of the whole {::Google::Cloud::Optimization::V1::Shipment Shipment}. # The demands listed here are added to the demands listed in # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands}. # @!attribute [rw] visit_types # @return [::Array<::String>] # Specifies the types of the visit. This may be used to allocate additional # time required for a vehicle to complete this visit (see # {::Google::Cloud::Optimization::V1::Vehicle#extra_visit_duration_for_visit_type Vehicle.extra_visit_duration_for_visit_type}). # # A type can only appear once. # @!attribute [rw] label # @return [::String] # Specifies a label for this `VisitRequest`. This label is reported in the # response as `visit_label` in the corresponding # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit ShipmentRoute.Visit}. # @!attribute [rw] demands # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>] # Deprecated: Use # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest#load_demands VisitRequest.load_demands} # instead. class VisitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # When 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. This message # defines such amount. See # {::Google::Cloud::Optimization::V1::Shipment#load_demands load_demands}. # @!attribute [rw] amount # @return [::Integer] # The amount by which the load of the vehicle performing the corresponding # visit will vary. Since it is an integer, users are advised to choose an # appropriate unit to avoid loss of precision. Must be ≥ 0. class Load include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#demands ⇒ ::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>
This field is deprecated and may be removed in the next major version update.
Returns Deprecated: Use Shipment.load_demands instead.
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 913 class Shipment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Request 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). # @!attribute [rw] arrival_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_location` must not be specified. # @!attribute [rw] arrival_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_waypoint` must not be specified. # @!attribute [rw] departure_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_location`. # If the shipment model has duration distance matrices, # `departure_location` must not be specified. # @!attribute [rw] departure_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. # If the shipment model has duration distance matrices, # `departure_waypoint` must not be specified. # @!attribute [rw] tags # @return [::Array<::String>] # Specifies tags attached to the visit request. # Empty or duplicate strings are not allowed. # @!attribute [rw] time_windows # @return [::Array<::Google::Cloud::Optimization::V1::TimeWindow>] # Time windows which constrain the arrival time at a visit. # Note that a vehicle may depart outside of the arrival time window, i.e. # arrival time + duration do not need to be inside a time window. This can # result in waiting time if the vehicle arrives before # {::Google::Cloud::Optimization::V1::TimeWindow#start_time TimeWindow.start_time}. # # The absence of `TimeWindow` means that the vehicle can perform this visit # at any time. # # Time windows must be disjoint, i.e. no time window must overlap with or # be adjacent to another, and they must be in increasing order. # # `cost_per_hour_after_soft_end_time` and `soft_end_time` can only # be set if there is a single time window. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of the visit, i.e. time spent by the vehicle between arrival # and departure (to be added to the possible waiting time; see # `time_windows`). # @!attribute [rw] cost # @return [::Float] # Cost to service this visit request on a vehicle route. This can be used # to pay different costs for each alternative pickup or delivery of a # shipment. This cost must be in the same unit as `Shipment.penalty_cost` # and must not be negative. # @!attribute [rw] load_demands # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}] # Load demands of this visit request. This is just like # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands} # field, except that it only applies to this # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest VisitRequest} # instead of the whole {::Google::Cloud::Optimization::V1::Shipment Shipment}. # The demands listed here are added to the demands listed in # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands}. # @!attribute [rw] visit_types # @return [::Array<::String>] # Specifies the types of the visit. This may be used to allocate additional # time required for a vehicle to complete this visit (see # {::Google::Cloud::Optimization::V1::Vehicle#extra_visit_duration_for_visit_type Vehicle.extra_visit_duration_for_visit_type}). # # A type can only appear once. # @!attribute [rw] label # @return [::String] # Specifies a label for this `VisitRequest`. This label is reported in the # response as `visit_label` in the corresponding # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit ShipmentRoute.Visit}. # @!attribute [rw] demands # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>] # Deprecated: Use # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest#load_demands VisitRequest.load_demands} # instead. class VisitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # When 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. This message # defines such amount. See # {::Google::Cloud::Optimization::V1::Shipment#load_demands load_demands}. # @!attribute [rw] amount # @return [::Integer] # The amount by which the load of the vehicle performing the corresponding # visit will vary. Since it is an integer, users are advised to choose an # appropriate unit to avoid loss of precision. Must be ≥ 0. class Load include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#ignore ⇒ ::Boolean
Returns 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.
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 913 class Shipment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Request 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). # @!attribute [rw] arrival_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_location` must not be specified. # @!attribute [rw] arrival_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_waypoint` must not be specified. # @!attribute [rw] departure_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_location`. # If the shipment model has duration distance matrices, # `departure_location` must not be specified. # @!attribute [rw] departure_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. # If the shipment model has duration distance matrices, # `departure_waypoint` must not be specified. # @!attribute [rw] tags # @return [::Array<::String>] # Specifies tags attached to the visit request. # Empty or duplicate strings are not allowed. # @!attribute [rw] time_windows # @return [::Array<::Google::Cloud::Optimization::V1::TimeWindow>] # Time windows which constrain the arrival time at a visit. # Note that a vehicle may depart outside of the arrival time window, i.e. # arrival time + duration do not need to be inside a time window. This can # result in waiting time if the vehicle arrives before # {::Google::Cloud::Optimization::V1::TimeWindow#start_time TimeWindow.start_time}. # # The absence of `TimeWindow` means that the vehicle can perform this visit # at any time. # # Time windows must be disjoint, i.e. no time window must overlap with or # be adjacent to another, and they must be in increasing order. # # `cost_per_hour_after_soft_end_time` and `soft_end_time` can only # be set if there is a single time window. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of the visit, i.e. time spent by the vehicle between arrival # and departure (to be added to the possible waiting time; see # `time_windows`). # @!attribute [rw] cost # @return [::Float] # Cost to service this visit request on a vehicle route. This can be used # to pay different costs for each alternative pickup or delivery of a # shipment. This cost must be in the same unit as `Shipment.penalty_cost` # and must not be negative. # @!attribute [rw] load_demands # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}] # Load demands of this visit request. This is just like # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands} # field, except that it only applies to this # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest VisitRequest} # instead of the whole {::Google::Cloud::Optimization::V1::Shipment Shipment}. # The demands listed here are added to the demands listed in # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands}. # @!attribute [rw] visit_types # @return [::Array<::String>] # Specifies the types of the visit. This may be used to allocate additional # time required for a vehicle to complete this visit (see # {::Google::Cloud::Optimization::V1::Vehicle#extra_visit_duration_for_visit_type Vehicle.extra_visit_duration_for_visit_type}). # # A type can only appear once. # @!attribute [rw] label # @return [::String] # Specifies a label for this `VisitRequest`. This label is reported in the # response as `visit_label` in the corresponding # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit ShipmentRoute.Visit}. # @!attribute [rw] demands # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>] # Deprecated: Use # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest#load_demands VisitRequest.load_demands} # instead. class VisitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # When 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. This message # defines such amount. See # {::Google::Cloud::Optimization::V1::Shipment#load_demands load_demands}. # @!attribute [rw] amount # @return [::Integer] # The amount by which the load of the vehicle performing the corresponding # visit will vary. Since it is an integer, users are advised to choose an # appropriate unit to avoid loss of precision. Must be ≥ 0. class Load include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#label ⇒ ::String
Returns Specifies a label for this shipment. This label is reported in the response
in the shipment_label
of the corresponding
ShipmentRoute.Visit.
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 913 class Shipment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Request 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). # @!attribute [rw] arrival_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_location` must not be specified. # @!attribute [rw] arrival_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_waypoint` must not be specified. # @!attribute [rw] departure_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_location`. # If the shipment model has duration distance matrices, # `departure_location` must not be specified. # @!attribute [rw] departure_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. # If the shipment model has duration distance matrices, # `departure_waypoint` must not be specified. # @!attribute [rw] tags # @return [::Array<::String>] # Specifies tags attached to the visit request. # Empty or duplicate strings are not allowed. # @!attribute [rw] time_windows # @return [::Array<::Google::Cloud::Optimization::V1::TimeWindow>] # Time windows which constrain the arrival time at a visit. # Note that a vehicle may depart outside of the arrival time window, i.e. # arrival time + duration do not need to be inside a time window. This can # result in waiting time if the vehicle arrives before # {::Google::Cloud::Optimization::V1::TimeWindow#start_time TimeWindow.start_time}. # # The absence of `TimeWindow` means that the vehicle can perform this visit # at any time. # # Time windows must be disjoint, i.e. no time window must overlap with or # be adjacent to another, and they must be in increasing order. # # `cost_per_hour_after_soft_end_time` and `soft_end_time` can only # be set if there is a single time window. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of the visit, i.e. time spent by the vehicle between arrival # and departure (to be added to the possible waiting time; see # `time_windows`). # @!attribute [rw] cost # @return [::Float] # Cost to service this visit request on a vehicle route. This can be used # to pay different costs for each alternative pickup or delivery of a # shipment. This cost must be in the same unit as `Shipment.penalty_cost` # and must not be negative. # @!attribute [rw] load_demands # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}] # Load demands of this visit request. This is just like # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands} # field, except that it only applies to this # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest VisitRequest} # instead of the whole {::Google::Cloud::Optimization::V1::Shipment Shipment}. # The demands listed here are added to the demands listed in # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands}. # @!attribute [rw] visit_types # @return [::Array<::String>] # Specifies the types of the visit. This may be used to allocate additional # time required for a vehicle to complete this visit (see # {::Google::Cloud::Optimization::V1::Vehicle#extra_visit_duration_for_visit_type Vehicle.extra_visit_duration_for_visit_type}). # # A type can only appear once. # @!attribute [rw] label # @return [::String] # Specifies a label for this `VisitRequest`. This label is reported in the # response as `visit_label` in the corresponding # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit ShipmentRoute.Visit}. # @!attribute [rw] demands # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>] # Deprecated: Use # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest#load_demands VisitRequest.load_demands} # instead. class VisitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # When 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. This message # defines such amount. See # {::Google::Cloud::Optimization::V1::Shipment#load_demands load_demands}. # @!attribute [rw] amount # @return [::Integer] # The amount by which the load of the vehicle performing the corresponding # visit will vary. Since it is an integer, users are advised to choose an # appropriate unit to avoid loss of precision. Must be ≥ 0. class Load include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#load_demands ⇒ ::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}
Returns 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.
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 913 class Shipment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Request 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). # @!attribute [rw] arrival_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_location` must not be specified. # @!attribute [rw] arrival_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_waypoint` must not be specified. # @!attribute [rw] departure_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_location`. # If the shipment model has duration distance matrices, # `departure_location` must not be specified. # @!attribute [rw] departure_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. # If the shipment model has duration distance matrices, # `departure_waypoint` must not be specified. # @!attribute [rw] tags # @return [::Array<::String>] # Specifies tags attached to the visit request. # Empty or duplicate strings are not allowed. # @!attribute [rw] time_windows # @return [::Array<::Google::Cloud::Optimization::V1::TimeWindow>] # Time windows which constrain the arrival time at a visit. # Note that a vehicle may depart outside of the arrival time window, i.e. # arrival time + duration do not need to be inside a time window. This can # result in waiting time if the vehicle arrives before # {::Google::Cloud::Optimization::V1::TimeWindow#start_time TimeWindow.start_time}. # # The absence of `TimeWindow` means that the vehicle can perform this visit # at any time. # # Time windows must be disjoint, i.e. no time window must overlap with or # be adjacent to another, and they must be in increasing order. # # `cost_per_hour_after_soft_end_time` and `soft_end_time` can only # be set if there is a single time window. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of the visit, i.e. time spent by the vehicle between arrival # and departure (to be added to the possible waiting time; see # `time_windows`). # @!attribute [rw] cost # @return [::Float] # Cost to service this visit request on a vehicle route. This can be used # to pay different costs for each alternative pickup or delivery of a # shipment. This cost must be in the same unit as `Shipment.penalty_cost` # and must not be negative. # @!attribute [rw] load_demands # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}] # Load demands of this visit request. This is just like # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands} # field, except that it only applies to this # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest VisitRequest} # instead of the whole {::Google::Cloud::Optimization::V1::Shipment Shipment}. # The demands listed here are added to the demands listed in # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands}. # @!attribute [rw] visit_types # @return [::Array<::String>] # Specifies the types of the visit. This may be used to allocate additional # time required for a vehicle to complete this visit (see # {::Google::Cloud::Optimization::V1::Vehicle#extra_visit_duration_for_visit_type Vehicle.extra_visit_duration_for_visit_type}). # # A type can only appear once. # @!attribute [rw] label # @return [::String] # Specifies a label for this `VisitRequest`. This label is reported in the # response as `visit_label` in the corresponding # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit ShipmentRoute.Visit}. # @!attribute [rw] demands # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>] # Deprecated: Use # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest#load_demands VisitRequest.load_demands} # instead. class VisitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # When 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. This message # defines such amount. See # {::Google::Cloud::Optimization::V1::Shipment#load_demands load_demands}. # @!attribute [rw] amount # @return [::Integer] # The amount by which the load of the vehicle performing the corresponding # visit will vary. Since it is an integer, users are advised to choose an # appropriate unit to avoid loss of precision. Must be ≥ 0. class Load include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#penalty_cost ⇒ ::Float
Returns 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.
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 913 class Shipment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Request 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). # @!attribute [rw] arrival_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_location` must not be specified. # @!attribute [rw] arrival_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_waypoint` must not be specified. # @!attribute [rw] departure_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_location`. # If the shipment model has duration distance matrices, # `departure_location` must not be specified. # @!attribute [rw] departure_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. # If the shipment model has duration distance matrices, # `departure_waypoint` must not be specified. # @!attribute [rw] tags # @return [::Array<::String>] # Specifies tags attached to the visit request. # Empty or duplicate strings are not allowed. # @!attribute [rw] time_windows # @return [::Array<::Google::Cloud::Optimization::V1::TimeWindow>] # Time windows which constrain the arrival time at a visit. # Note that a vehicle may depart outside of the arrival time window, i.e. # arrival time + duration do not need to be inside a time window. This can # result in waiting time if the vehicle arrives before # {::Google::Cloud::Optimization::V1::TimeWindow#start_time TimeWindow.start_time}. # # The absence of `TimeWindow` means that the vehicle can perform this visit # at any time. # # Time windows must be disjoint, i.e. no time window must overlap with or # be adjacent to another, and they must be in increasing order. # # `cost_per_hour_after_soft_end_time` and `soft_end_time` can only # be set if there is a single time window. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of the visit, i.e. time spent by the vehicle between arrival # and departure (to be added to the possible waiting time; see # `time_windows`). # @!attribute [rw] cost # @return [::Float] # Cost to service this visit request on a vehicle route. This can be used # to pay different costs for each alternative pickup or delivery of a # shipment. This cost must be in the same unit as `Shipment.penalty_cost` # and must not be negative. # @!attribute [rw] load_demands # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}] # Load demands of this visit request. This is just like # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands} # field, except that it only applies to this # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest VisitRequest} # instead of the whole {::Google::Cloud::Optimization::V1::Shipment Shipment}. # The demands listed here are added to the demands listed in # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands}. # @!attribute [rw] visit_types # @return [::Array<::String>] # Specifies the types of the visit. This may be used to allocate additional # time required for a vehicle to complete this visit (see # {::Google::Cloud::Optimization::V1::Vehicle#extra_visit_duration_for_visit_type Vehicle.extra_visit_duration_for_visit_type}). # # A type can only appear once. # @!attribute [rw] label # @return [::String] # Specifies a label for this `VisitRequest`. This label is reported in the # response as `visit_label` in the corresponding # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit ShipmentRoute.Visit}. # @!attribute [rw] demands # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>] # Deprecated: Use # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest#load_demands VisitRequest.load_demands} # instead. class VisitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # When 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. This message # defines such amount. See # {::Google::Cloud::Optimization::V1::Shipment#load_demands load_demands}. # @!attribute [rw] amount # @return [::Integer] # The amount by which the load of the vehicle performing the corresponding # visit will vary. Since it is an integer, users are advised to choose an # appropriate unit to avoid loss of precision. Must be ≥ 0. class Load include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#pickup_to_delivery_absolute_detour_limit ⇒ ::Google::Protobuf::Duration
Returns 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.
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 913 class Shipment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Request 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). # @!attribute [rw] arrival_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_location` must not be specified. # @!attribute [rw] arrival_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_waypoint` must not be specified. # @!attribute [rw] departure_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_location`. # If the shipment model has duration distance matrices, # `departure_location` must not be specified. # @!attribute [rw] departure_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. # If the shipment model has duration distance matrices, # `departure_waypoint` must not be specified. # @!attribute [rw] tags # @return [::Array<::String>] # Specifies tags attached to the visit request. # Empty or duplicate strings are not allowed. # @!attribute [rw] time_windows # @return [::Array<::Google::Cloud::Optimization::V1::TimeWindow>] # Time windows which constrain the arrival time at a visit. # Note that a vehicle may depart outside of the arrival time window, i.e. # arrival time + duration do not need to be inside a time window. This can # result in waiting time if the vehicle arrives before # {::Google::Cloud::Optimization::V1::TimeWindow#start_time TimeWindow.start_time}. # # The absence of `TimeWindow` means that the vehicle can perform this visit # at any time. # # Time windows must be disjoint, i.e. no time window must overlap with or # be adjacent to another, and they must be in increasing order. # # `cost_per_hour_after_soft_end_time` and `soft_end_time` can only # be set if there is a single time window. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of the visit, i.e. time spent by the vehicle between arrival # and departure (to be added to the possible waiting time; see # `time_windows`). # @!attribute [rw] cost # @return [::Float] # Cost to service this visit request on a vehicle route. This can be used # to pay different costs for each alternative pickup or delivery of a # shipment. This cost must be in the same unit as `Shipment.penalty_cost` # and must not be negative. # @!attribute [rw] load_demands # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}] # Load demands of this visit request. This is just like # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands} # field, except that it only applies to this # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest VisitRequest} # instead of the whole {::Google::Cloud::Optimization::V1::Shipment Shipment}. # The demands listed here are added to the demands listed in # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands}. # @!attribute [rw] visit_types # @return [::Array<::String>] # Specifies the types of the visit. This may be used to allocate additional # time required for a vehicle to complete this visit (see # {::Google::Cloud::Optimization::V1::Vehicle#extra_visit_duration_for_visit_type Vehicle.extra_visit_duration_for_visit_type}). # # A type can only appear once. # @!attribute [rw] label # @return [::String] # Specifies a label for this `VisitRequest`. This label is reported in the # response as `visit_label` in the corresponding # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit ShipmentRoute.Visit}. # @!attribute [rw] demands # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>] # Deprecated: Use # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest#load_demands VisitRequest.load_demands} # instead. class VisitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # When 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. This message # defines such amount. See # {::Google::Cloud::Optimization::V1::Shipment#load_demands load_demands}. # @!attribute [rw] amount # @return [::Integer] # The amount by which the load of the vehicle performing the corresponding # visit will vary. Since it is an integer, users are advised to choose an # appropriate unit to avoid loss of precision. Must be ≥ 0. class Load include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#pickup_to_delivery_relative_detour_limit ⇒ ::Float
Returns 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.
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 913 class Shipment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Request 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). # @!attribute [rw] arrival_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_location` must not be specified. # @!attribute [rw] arrival_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_waypoint` must not be specified. # @!attribute [rw] departure_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_location`. # If the shipment model has duration distance matrices, # `departure_location` must not be specified. # @!attribute [rw] departure_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. # If the shipment model has duration distance matrices, # `departure_waypoint` must not be specified. # @!attribute [rw] tags # @return [::Array<::String>] # Specifies tags attached to the visit request. # Empty or duplicate strings are not allowed. # @!attribute [rw] time_windows # @return [::Array<::Google::Cloud::Optimization::V1::TimeWindow>] # Time windows which constrain the arrival time at a visit. # Note that a vehicle may depart outside of the arrival time window, i.e. # arrival time + duration do not need to be inside a time window. This can # result in waiting time if the vehicle arrives before # {::Google::Cloud::Optimization::V1::TimeWindow#start_time TimeWindow.start_time}. # # The absence of `TimeWindow` means that the vehicle can perform this visit # at any time. # # Time windows must be disjoint, i.e. no time window must overlap with or # be adjacent to another, and they must be in increasing order. # # `cost_per_hour_after_soft_end_time` and `soft_end_time` can only # be set if there is a single time window. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of the visit, i.e. time spent by the vehicle between arrival # and departure (to be added to the possible waiting time; see # `time_windows`). # @!attribute [rw] cost # @return [::Float] # Cost to service this visit request on a vehicle route. This can be used # to pay different costs for each alternative pickup or delivery of a # shipment. This cost must be in the same unit as `Shipment.penalty_cost` # and must not be negative. # @!attribute [rw] load_demands # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}] # Load demands of this visit request. This is just like # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands} # field, except that it only applies to this # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest VisitRequest} # instead of the whole {::Google::Cloud::Optimization::V1::Shipment Shipment}. # The demands listed here are added to the demands listed in # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands}. # @!attribute [rw] visit_types # @return [::Array<::String>] # Specifies the types of the visit. This may be used to allocate additional # time required for a vehicle to complete this visit (see # {::Google::Cloud::Optimization::V1::Vehicle#extra_visit_duration_for_visit_type Vehicle.extra_visit_duration_for_visit_type}). # # A type can only appear once. # @!attribute [rw] label # @return [::String] # Specifies a label for this `VisitRequest`. This label is reported in the # response as `visit_label` in the corresponding # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit ShipmentRoute.Visit}. # @!attribute [rw] demands # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>] # Deprecated: Use # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest#load_demands VisitRequest.load_demands} # instead. class VisitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # When 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. This message # defines such amount. See # {::Google::Cloud::Optimization::V1::Shipment#load_demands load_demands}. # @!attribute [rw] amount # @return [::Integer] # The amount by which the load of the vehicle performing the corresponding # visit will vary. Since it is an integer, users are advised to choose an # appropriate unit to avoid loss of precision. Must be ≥ 0. class Load include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#pickup_to_delivery_time_limit ⇒ ::Google::Protobuf::Duration
Returns 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.
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 913 class Shipment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Request 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). # @!attribute [rw] arrival_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_location` must not be specified. # @!attribute [rw] arrival_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_waypoint` must not be specified. # @!attribute [rw] departure_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_location`. # If the shipment model has duration distance matrices, # `departure_location` must not be specified. # @!attribute [rw] departure_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. # If the shipment model has duration distance matrices, # `departure_waypoint` must not be specified. # @!attribute [rw] tags # @return [::Array<::String>] # Specifies tags attached to the visit request. # Empty or duplicate strings are not allowed. # @!attribute [rw] time_windows # @return [::Array<::Google::Cloud::Optimization::V1::TimeWindow>] # Time windows which constrain the arrival time at a visit. # Note that a vehicle may depart outside of the arrival time window, i.e. # arrival time + duration do not need to be inside a time window. This can # result in waiting time if the vehicle arrives before # {::Google::Cloud::Optimization::V1::TimeWindow#start_time TimeWindow.start_time}. # # The absence of `TimeWindow` means that the vehicle can perform this visit # at any time. # # Time windows must be disjoint, i.e. no time window must overlap with or # be adjacent to another, and they must be in increasing order. # # `cost_per_hour_after_soft_end_time` and `soft_end_time` can only # be set if there is a single time window. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of the visit, i.e. time spent by the vehicle between arrival # and departure (to be added to the possible waiting time; see # `time_windows`). # @!attribute [rw] cost # @return [::Float] # Cost to service this visit request on a vehicle route. This can be used # to pay different costs for each alternative pickup or delivery of a # shipment. This cost must be in the same unit as `Shipment.penalty_cost` # and must not be negative. # @!attribute [rw] load_demands # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}] # Load demands of this visit request. This is just like # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands} # field, except that it only applies to this # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest VisitRequest} # instead of the whole {::Google::Cloud::Optimization::V1::Shipment Shipment}. # The demands listed here are added to the demands listed in # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands}. # @!attribute [rw] visit_types # @return [::Array<::String>] # Specifies the types of the visit. This may be used to allocate additional # time required for a vehicle to complete this visit (see # {::Google::Cloud::Optimization::V1::Vehicle#extra_visit_duration_for_visit_type Vehicle.extra_visit_duration_for_visit_type}). # # A type can only appear once. # @!attribute [rw] label # @return [::String] # Specifies a label for this `VisitRequest`. This label is reported in the # response as `visit_label` in the corresponding # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit ShipmentRoute.Visit}. # @!attribute [rw] demands # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>] # Deprecated: Use # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest#load_demands VisitRequest.load_demands} # instead. class VisitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # When 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. This message # defines such amount. See # {::Google::Cloud::Optimization::V1::Shipment#load_demands load_demands}. # @!attribute [rw] amount # @return [::Integer] # The amount by which the load of the vehicle performing the corresponding # visit will vary. Since it is an integer, users are advised to choose an # appropriate unit to avoid loss of precision. Must be ≥ 0. class Load include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#pickups ⇒ ::Array<::Google::Cloud::Optimization::V1::Shipment::VisitRequest>
Returns Set of pickup alternatives associated to the shipment. If not specified, the vehicle only needs to visit a location corresponding to the deliveries.
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 913 class Shipment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Request 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). # @!attribute [rw] arrival_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_location` must not be specified. # @!attribute [rw] arrival_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_waypoint` must not be specified. # @!attribute [rw] departure_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_location`. # If the shipment model has duration distance matrices, # `departure_location` must not be specified. # @!attribute [rw] departure_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. # If the shipment model has duration distance matrices, # `departure_waypoint` must not be specified. # @!attribute [rw] tags # @return [::Array<::String>] # Specifies tags attached to the visit request. # Empty or duplicate strings are not allowed. # @!attribute [rw] time_windows # @return [::Array<::Google::Cloud::Optimization::V1::TimeWindow>] # Time windows which constrain the arrival time at a visit. # Note that a vehicle may depart outside of the arrival time window, i.e. # arrival time + duration do not need to be inside a time window. This can # result in waiting time if the vehicle arrives before # {::Google::Cloud::Optimization::V1::TimeWindow#start_time TimeWindow.start_time}. # # The absence of `TimeWindow` means that the vehicle can perform this visit # at any time. # # Time windows must be disjoint, i.e. no time window must overlap with or # be adjacent to another, and they must be in increasing order. # # `cost_per_hour_after_soft_end_time` and `soft_end_time` can only # be set if there is a single time window. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of the visit, i.e. time spent by the vehicle between arrival # and departure (to be added to the possible waiting time; see # `time_windows`). # @!attribute [rw] cost # @return [::Float] # Cost to service this visit request on a vehicle route. This can be used # to pay different costs for each alternative pickup or delivery of a # shipment. This cost must be in the same unit as `Shipment.penalty_cost` # and must not be negative. # @!attribute [rw] load_demands # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}] # Load demands of this visit request. This is just like # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands} # field, except that it only applies to this # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest VisitRequest} # instead of the whole {::Google::Cloud::Optimization::V1::Shipment Shipment}. # The demands listed here are added to the demands listed in # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands}. # @!attribute [rw] visit_types # @return [::Array<::String>] # Specifies the types of the visit. This may be used to allocate additional # time required for a vehicle to complete this visit (see # {::Google::Cloud::Optimization::V1::Vehicle#extra_visit_duration_for_visit_type Vehicle.extra_visit_duration_for_visit_type}). # # A type can only appear once. # @!attribute [rw] label # @return [::String] # Specifies a label for this `VisitRequest`. This label is reported in the # response as `visit_label` in the corresponding # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit ShipmentRoute.Visit}. # @!attribute [rw] demands # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>] # Deprecated: Use # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest#load_demands VisitRequest.load_demands} # instead. class VisitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # When 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. This message # defines such amount. See # {::Google::Cloud::Optimization::V1::Shipment#load_demands load_demands}. # @!attribute [rw] amount # @return [::Integer] # The amount by which the load of the vehicle performing the corresponding # visit will vary. Since it is an integer, users are advised to choose an # appropriate unit to avoid loss of precision. Must be ≥ 0. class Load include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#shipment_type ⇒ ::String
Returns 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
.
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'proto_docs/google/cloud/optimization/v1/fleet_routing.rb', line 913 class Shipment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Request 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). # @!attribute [rw] arrival_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_location` must not be specified. # @!attribute [rw] arrival_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle arrives when performing this # `VisitRequest`. If the shipment model has duration distance matrices, # `arrival_waypoint` must not be specified. # @!attribute [rw] departure_location # @return [::Google::Type::LatLng] # The geo-location where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_location`. # If the shipment model has duration distance matrices, # `departure_location` must not be specified. # @!attribute [rw] departure_waypoint # @return [::Google::Cloud::Optimization::V1::Waypoint] # The waypoint where the vehicle departs after completing this # `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. # If the shipment model has duration distance matrices, # `departure_waypoint` must not be specified. # @!attribute [rw] tags # @return [::Array<::String>] # Specifies tags attached to the visit request. # Empty or duplicate strings are not allowed. # @!attribute [rw] time_windows # @return [::Array<::Google::Cloud::Optimization::V1::TimeWindow>] # Time windows which constrain the arrival time at a visit. # Note that a vehicle may depart outside of the arrival time window, i.e. # arrival time + duration do not need to be inside a time window. This can # result in waiting time if the vehicle arrives before # {::Google::Cloud::Optimization::V1::TimeWindow#start_time TimeWindow.start_time}. # # The absence of `TimeWindow` means that the vehicle can perform this visit # at any time. # # Time windows must be disjoint, i.e. no time window must overlap with or # be adjacent to another, and they must be in increasing order. # # `cost_per_hour_after_soft_end_time` and `soft_end_time` can only # be set if there is a single time window. # @!attribute [rw] duration # @return [::Google::Protobuf::Duration] # Duration of the visit, i.e. time spent by the vehicle between arrival # and departure (to be added to the possible waiting time; see # `time_windows`). # @!attribute [rw] cost # @return [::Float] # Cost to service this visit request on a vehicle route. This can be used # to pay different costs for each alternative pickup or delivery of a # shipment. This cost must be in the same unit as `Shipment.penalty_cost` # and must not be negative. # @!attribute [rw] load_demands # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}] # Load demands of this visit request. This is just like # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands} # field, except that it only applies to this # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest VisitRequest} # instead of the whole {::Google::Cloud::Optimization::V1::Shipment Shipment}. # The demands listed here are added to the demands listed in # {::Google::Cloud::Optimization::V1::Shipment#load_demands Shipment.load_demands}. # @!attribute [rw] visit_types # @return [::Array<::String>] # Specifies the types of the visit. This may be used to allocate additional # time required for a vehicle to complete this visit (see # {::Google::Cloud::Optimization::V1::Vehicle#extra_visit_duration_for_visit_type Vehicle.extra_visit_duration_for_visit_type}). # # A type can only appear once. # @!attribute [rw] label # @return [::String] # Specifies a label for this `VisitRequest`. This label is reported in the # response as `visit_label` in the corresponding # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit ShipmentRoute.Visit}. # @!attribute [rw] demands # @deprecated This field is deprecated and may be removed in the next major version update. # @return [::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>] # Deprecated: Use # {::Google::Cloud::Optimization::V1::Shipment::VisitRequest#load_demands VisitRequest.load_demands} # instead. class VisitRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # When 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. This message # defines such amount. See # {::Google::Cloud::Optimization::V1::Shipment#load_demands load_demands}. # @!attribute [rw] amount # @return [::Integer] # The amount by which the load of the vehicle performing the corresponding # visit will vary. Since it is an integer, users are advised to choose an # appropriate unit to avoid loss of precision. Must be ≥ 0. class Load include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::Optimization::V1::Shipment::Load] class LoadDemandsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |