Struct google_api_proto::google::cloud::optimization::v1::shipment_route::Visit
source · pub struct Visit {
pub shipment_index: i32,
pub is_pickup: bool,
pub visit_request_index: i32,
pub start_time: Option<Timestamp>,
pub load_demands: BTreeMap<String, Load>,
pub detour: Option<Duration>,
pub shipment_label: String,
pub visit_label: String,
pub arrival_loads: Vec<CapacityQuantity>,
pub delay_before_start: Option<Delay>,
pub demands: Vec<CapacityQuantity>,
}
Expand description
A visit performed during a route. This visit corresponds to a pickup or a
delivery of a Shipment
.
Fields§
§shipment_index: i32
Index of the shipments
field in the source
[ShipmentModel][google.cloud.optimization.v1.ShipmentModel].
is_pickup: bool
If true the visit corresponds to a pickup of a Shipment
. Otherwise, it
corresponds to a delivery.
visit_request_index: i32
Index of VisitRequest
in either the pickup or delivery field of the
Shipment
(see is_pickup
).
start_time: Option<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
.
load_demands: BTreeMap<String, 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][google.cloud.optimization.v1.ShipmentRoute.Transition]
(see this field).
detour: Option<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.
shipment_label: String
Copy of the corresponding Shipment.label
, if specified in the
Shipment
.
visit_label: String
Copy of the corresponding
[VisitRequest.label][google.cloud.optimization.v1.Shipment.VisitRequest.label],
if specified in the VisitRequest
.
arrival_loads: Vec<CapacityQuantity>
Deprecated: Use
[Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]
instead. Vehicle loads upon arrival at the visit location, for each type
specified in
[Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities],
start_load_intervals
, end_load_intervals
or demands
.
Exception: we omit loads for quantity types unconstrained by intervals and that don’t have any non-zero demand on the route.
delay_before_start: Option<Delay>
Deprecated: Use [ShipmentRoute.Transition.delay_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.delay_duration] instead. Delay occurring before the visit starts.
demands: Vec<CapacityQuantity>
Deprecated: Use [Visit.load_demands][google.cloud.optimization.v1.ShipmentRoute.Visit.load_demands] instead.
Trait Implementations§
source§impl Message for Visit
impl Message for Visit
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Visit
impl PartialEq for Visit
impl StructuralPartialEq for Visit
Auto Trait Implementations§
impl Freeze for Visit
impl RefUnwindSafe for Visit
impl Send for Visit
impl Sync for Visit
impl Unpin for Visit
impl UnwindSafe for Visit
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request