Cloud Optimization V1 API - Class Google::Cloud::Optimization::V1::ShipmentRoute::Visit (v0.2.1)

Reference documentation and code samples for the Cloud Optimization V1 API class Google::Cloud::Optimization::V1::ShipmentRoute::Visit.

A visit performed during a route. This visit corresponds to a pickup or a delivery of a Shipment.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#arrival_loads

def arrival_loads() -> ::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>
Returns

#arrival_loads=

def arrival_loads=(value) -> ::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>
Parameter
Returns

#delay_before_start

def delay_before_start() -> ::Google::Cloud::Optimization::V1::ShipmentRoute::Delay
Returns

#delay_before_start=

def delay_before_start=(value) -> ::Google::Cloud::Optimization::V1::ShipmentRoute::Delay
Parameter
Returns

#demands

def demands() -> ::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>
Returns

#demands=

def demands=(value) -> ::Array<::Google::Cloud::Optimization::V1::CapacityQuantity>
Parameter
Returns

#detour

def detour() -> ::Google::Protobuf::Duration
Returns
  • (::Google::Protobuf::Duration) —

    Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ``` start_time(delivery) - start_time(pickup)

    • (duration(pickup) + travel duration from the pickup location to the delivery location). Otherwise, it is computed from the vehicle `start_location` and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. ```

#detour=

def detour=(value) -> ::Google::Protobuf::Duration
Parameter
  • value (::Google::Protobuf::Duration) —

    Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ``` start_time(delivery) - start_time(pickup)

    • (duration(pickup) + travel duration from the pickup location to the delivery location). Otherwise, it is computed from the vehicle `start_location` and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. ```
Returns
  • (::Google::Protobuf::Duration) —

    Extra detour time due to the shipments visited on the route before the visit and to the potential waiting time induced by time windows. If the visit is a delivery, the detour is computed from the corresponding pickup visit and is equal to: ``` start_time(delivery) - start_time(pickup)

    • (duration(pickup) + travel duration from the pickup location to the delivery location). Otherwise, it is computed from the vehicle `start_location` and is equal to: start_time - vehicle_start_time - travel duration from the vehicle's start_location to the visit. ```

#is_pickup

def is_pickup() -> ::Boolean
Returns
  • (::Boolean) — If true the visit corresponds to a pickup of a Shipment. Otherwise, it corresponds to a delivery.

#is_pickup=

def is_pickup=(value) -> ::Boolean
Parameter
  • value (::Boolean) — If true the visit corresponds to a pickup of a Shipment. Otherwise, it corresponds to a delivery.
Returns
  • (::Boolean) — If true the visit corresponds to a pickup of a Shipment. Otherwise, it corresponds to a delivery.

#load_demands

def load_demands() -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}
Returns
  • (::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}) — Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

#load_demands=

def load_demands=(value) -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}
Parameter
  • value (::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}) — Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).
Returns
  • (::Google::Protobuf::Map{::String => ::Google::Cloud::Optimization::V1::Shipment::Load}) — Total visit load demand as the sum of the shipment and the visit request load_demands. The values are negative if the visit is a delivery. Demands are reported for the same types as the Transition.loads (see this field).

#shipment_index

def shipment_index() -> ::Integer
Returns
  • (::Integer) — Index of the shipments field in the source ShipmentModel.

#shipment_index=

def shipment_index=(value) -> ::Integer
Parameter
  • value (::Integer) — Index of the shipments field in the source ShipmentModel.
Returns
  • (::Integer) — Index of the shipments field in the source ShipmentModel.

#shipment_label

def shipment_label() -> ::String
Returns
  • (::String) — Copy of the corresponding Shipment.label, if specified in the Shipment.

#shipment_label=

def shipment_label=(value) -> ::String
Parameter
  • value (::String) — Copy of the corresponding Shipment.label, if specified in the Shipment.
Returns
  • (::String) — Copy of the corresponding Shipment.label, if specified in the Shipment.

#start_time

def start_time() -> ::Google::Protobuf::Timestamp
Returns
  • (::Google::Protobuf::Timestamp) — Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

#start_time=

def start_time=(value) -> ::Google::Protobuf::Timestamp
Parameter
  • value (::Google::Protobuf::Timestamp) — Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.
Returns
  • (::Google::Protobuf::Timestamp) — Time at which the visit starts. Note that the vehicle may arrive earlier than this at the visit location. Times are consistent with the ShipmentModel.

#visit_label

def visit_label() -> ::String
Returns
  • (::String) — Copy of the corresponding VisitRequest.label, if specified in the VisitRequest.

#visit_label=

def visit_label=(value) -> ::String
Parameter
  • value (::String) — Copy of the corresponding VisitRequest.label, if specified in the VisitRequest.
Returns
  • (::String) — Copy of the corresponding VisitRequest.label, if specified in the VisitRequest.

#visit_request_index

def visit_request_index() -> ::Integer
Returns
  • (::Integer) — Index of VisitRequest in either the pickup or delivery field of the Shipment (see is_pickup).

#visit_request_index=

def visit_request_index=(value) -> ::Integer
Parameter
  • value (::Integer) — Index of VisitRequest in either the pickup or delivery field of the Shipment (see is_pickup).
Returns
  • (::Integer) — Index of VisitRequest in either the pickup or delivery field of the Shipment (see is_pickup).