Enum google_api_proto::google::cloud::optimization::v1::skipped_shipment::reason::Code
source · #[repr(i32)]pub enum Code {
Unspecified = 0,
NoVehicle = 1,
DemandExceedsVehicleCapacity = 2,
CannotBePerformedWithinVehicleDistanceLimit = 3,
CannotBePerformedWithinVehicleDurationLimit = 4,
CannotBePerformedWithinVehicleTravelDurationLimit = 5,
CannotBePerformedWithinVehicleTimeWindows = 6,
VehicleNotAllowed = 7,
}
Expand description
Code identifying the reason type. The order here is meaningless. In particular, it gives no indication of whether a given reason will appear before another in the solution, if both apply.
Variants§
Unspecified = 0
This should never be used. If we are unable to understand why a shipment was skipped, we simply return an empty set of reasons.
NoVehicle = 1
There is no vehicle in the model making all shipments infeasible.
DemandExceedsVehicleCapacity = 2
The demand of the shipment exceeds a vehicle’s capacity for some
capacity types, one of which is example_exceeded_capacity_type
.
CannotBePerformedWithinVehicleDistanceLimit = 3
The minimum distance necessary to perform this shipment, i.e. from
the vehicle’s start_location
to the shipment’s pickup and/or delivery
locations and to the vehicle’s end location exceeds the vehicle’s
route_distance_limit
.
Note that for this computation we use the geodesic distances.
CannotBePerformedWithinVehicleDurationLimit = 4
The minimum time necessary to perform this shipment, including travel
time, wait time and service time exceeds the vehicle’s
route_duration_limit
.
Note: travel time is computed in the best-case scenario, namely as geodesic distance x 36 m/s (roughly 130 km/hour).
CannotBePerformedWithinVehicleTravelDurationLimit = 5
Same as above but we only compare minimum travel time and the
vehicle’s travel_duration_limit
.
CannotBePerformedWithinVehicleTimeWindows = 6
The vehicle cannot perform this shipment in the best-case scenario
(see CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT
for time
computation) if it starts at its earliest start time: the total time
would make the vehicle end after its latest end time.
VehicleNotAllowed = 7
The allowed_vehicle_indices
field of the shipment is not empty and
this vehicle does not belong to it.
Implementations§
source§impl Code
impl Code
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Ord for Code
impl Ord for Code
source§impl PartialEq for Code
impl PartialEq for Code
source§impl PartialOrd for Code
impl PartialOrd for Code
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for Code
impl TryFrom<i32> for Code
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
impl Copy for Code
impl Eq for Code
impl StructuralPartialEq for Code
Auto Trait Implementations§
impl Freeze for Code
impl RefUnwindSafe for Code
impl Send for Code
impl Sync for Code
impl Unpin for Code
impl UnwindSafe for Code
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§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