Struct google_api_proto::google::cloud::optimization::v1::TransitionAttributes
source · pub struct TransitionAttributes {
pub src_tag: String,
pub excluded_src_tag: String,
pub dst_tag: String,
pub excluded_dst_tag: String,
pub cost: f64,
pub cost_per_kilometer: f64,
pub distance_limit: Option<DistanceLimit>,
pub delay: Option<Duration>,
}
Expand description
Specifies attributes of transitions between two consecutive visits on a
route. Several TransitionAttributes
may apply to the same transition: in
that case, all extra costs add up and the strictest constraint or limit
applies (following natural “AND” semantics).
Fields§
§src_tag: String
Tags defining the set of (src->dst) transitions these attributes apply to.
A source visit or vehicle start matches iff its
[VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]
either contains src_tag
or does not contain excluded_src_tag
(depending
on which of these two fields is non-empty).
excluded_src_tag: String
See src_tag
. Exactly one of src_tag
and excluded_src_tag
must be
non-empty.
dst_tag: String
A destination visit or vehicle end matches iff its
[VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags]
or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either
contains dst_tag
or does not contain excluded_dst_tag
(depending on
which of these two fields is non-empty).
excluded_dst_tag: String
See dst_tag
. Exactly one of dst_tag
and excluded_dst_tag
must be
non-empty.
cost: f64
Specifies a cost for performing this transition. This is in the same unit as all other costs in the model and must not be negative. It is applied on top of all other existing costs.
cost_per_kilometer: f64
Specifies a cost per kilometer applied to the distance traveled while performing this transition. It adds up to any [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] specified on vehicles.
distance_limit: Option<DistanceLimit>
Specifies a limit on the distance traveled while performing this transition.
As of 2021/06, only soft limits are supported.
delay: Option<Duration>
Specifies a delay incurred when performing this transition.
This delay always occurs after finishing the source visit and before starting the destination visit.
Trait Implementations§
source§impl Clone for TransitionAttributes
impl Clone for TransitionAttributes
source§fn clone(&self) -> TransitionAttributes
fn clone(&self) -> TransitionAttributes
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TransitionAttributes
impl Debug for TransitionAttributes
source§impl Default for TransitionAttributes
impl Default for TransitionAttributes
source§impl Message for TransitionAttributes
impl Message for TransitionAttributes
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 TransitionAttributes
impl PartialEq for TransitionAttributes
source§fn eq(&self, other: &TransitionAttributes) -> bool
fn eq(&self, other: &TransitionAttributes) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TransitionAttributes
Auto Trait Implementations§
impl Freeze for TransitionAttributes
impl RefUnwindSafe for TransitionAttributes
impl Send for TransitionAttributes
impl Sync for TransitionAttributes
impl Unpin for TransitionAttributes
impl UnwindSafe for TransitionAttributes
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