pub struct SolvingMode(/* private fields */);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
to cap the number of errors returned.
Implementations§
Source§impl SolvingMode
impl SolvingMode
Sourcepub const DEFAULT_SOLVE: SolvingMode
pub const DEFAULT_SOLVE: SolvingMode
Solve the model.
Sourcepub const VALIDATE_ONLY: SolvingMode
pub const VALIDATE_ONLY: SolvingMode
Only validates the model without solving it: populates as many OptimizeToursResponse.validation_errors as possible.
Sourcepub const DETECT_SOME_INFEASIBLE_SHIPMENTS: SolvingMode
pub const DETECT_SOME_INFEASIBLE_SHIPMENTS: SolvingMode
Only populates
OptimizeToursResponse.validation_errors
or
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
field and
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.
Sourcepub fn as_str_name(&self) -> Cow<'static, str>
pub fn as_str_name(&self) -> Cow<'static, str>
Gets the enum value as a string.
Sourcepub fn from_str_name(name: &str) -> Option<Self>
pub fn from_str_name(name: &str) -> Option<Self>
Creates an enum value from the value name.
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 more