#[repr(i32)]pub enum SolvingMode {
DefaultSolve = 0,
ValidateOnly = 1,
DetectSomeInfeasibleShipments = 2,
}
Expand description
Defines how the solver should handle the request. In all modes but
VALIDATE_ONLY
, if the request is invalid, you will receive an
INVALID_REQUEST
error. See
[max_validation_errors][google.cloud.optimization.v1.OptimizeToursRequest.max_validation_errors]
to cap the number of errors returned.
Variants§
DefaultSolve = 0
Solve the model.
ValidateOnly = 1
Only validates the model without solving it: populates as many [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] as possible.
DetectSomeInfeasibleShipments = 2
Only populates
[OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
or
[OptimizeToursResponse.skipped_shipments][google.cloud.optimization.v1.OptimizeToursResponse.skipped_shipments],
and doesn’t actually solve the rest of the request (status
and routes
are unset in the response).
If infeasibilities in injected_solution_constraint
routes are detected
they are populated in the
[OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]
field and
[OptimizeToursResponse.skipped_shipments][google.cloud.optimization.v1.OptimizeToursResponse.skipped_shipments]
is left empty.
IMPORTANT: not all infeasible shipments are returned here, but only the ones that are detected as infeasible during preprocessing.
Implementations§
source§impl SolvingMode
impl SolvingMode
source§impl SolvingMode
impl SolvingMode
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 Clone for SolvingMode
impl Clone for SolvingMode
source§fn clone(&self) -> SolvingMode
fn clone(&self) -> SolvingMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SolvingMode
impl Debug for SolvingMode
source§impl Default for SolvingMode
impl Default for SolvingMode
source§fn default() -> SolvingMode
fn default() -> SolvingMode
source§impl From<SolvingMode> for i32
impl From<SolvingMode> for i32
source§fn from(value: SolvingMode) -> i32
fn from(value: SolvingMode) -> i32
source§impl Hash for SolvingMode
impl Hash for SolvingMode
source§impl Ord for SolvingMode
impl Ord for SolvingMode
source§fn cmp(&self, other: &SolvingMode) -> Ordering
fn cmp(&self, other: &SolvingMode) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for SolvingMode
impl PartialEq for SolvingMode
source§fn eq(&self, other: &SolvingMode) -> bool
fn eq(&self, other: &SolvingMode) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SolvingMode
impl PartialOrd for SolvingMode
source§fn partial_cmp(&self, other: &SolvingMode) -> Option<Ordering>
fn partial_cmp(&self, other: &SolvingMode) -> Option<Ordering>
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 SolvingMode
impl TryFrom<i32> for SolvingMode
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
source§fn try_from(value: i32) -> Result<SolvingMode, UnknownEnumValue>
fn try_from(value: i32) -> Result<SolvingMode, UnknownEnumValue>
impl Copy for SolvingMode
impl Eq for SolvingMode
impl StructuralPartialEq for SolvingMode
Auto Trait Implementations§
impl Freeze for SolvingMode
impl RefUnwindSafe for SolvingMode
impl Send for SolvingMode
impl Sync for SolvingMode
impl Unpin for SolvingMode
impl UnwindSafe for SolvingMode
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