Skip to main content

SolveOptions

Struct SolveOptions 

Source
#[non_exhaustive]
pub struct SolveOptions { pub time_limit: Option<Duration>, pub node_limit: Option<u64>, pub mip_gap: f64, pub int_tol: f64, pub warm_start: Option<Vec<(Variable, f64)>>, pub tolerances: Tolerances, }
Expand description

Options controlling a solve. Construct with SolveOptions::default and mutate the fields you need.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§time_limit: Option<Duration>

Wall-clock budget for this call (None = unlimited). On expiry the search stops cleanly and can be resumed.

§node_limit: Option<u64>

Maximum number of branch & bound nodes to solve in this call (None = unlimited). Deterministic alternative to time_limit; the budget applies per call, so each resume gets a fresh budget. The root relaxation does not count as a node.

§mip_gap: f64

Relative MIP gap at which the search stops and reports Status::Optimal. Must be finite and non-negative. Default 0.0 (prove exact optimality).

§int_tol: f64

Integrality tolerance: a value within this distance of an integer counts as integral. Default 1e-6. Loosening it does not loosen final feasibility: a rounded candidate must still pass the absolute tolerances.feasibility per-row/bound check (default 1e-7) before it is accepted, so a very loose int_tol mainly causes extra exact-fixing branching rather than admitting an infeasible point. Must be finite and in the half-open range [0, 0.5).

§warm_start: Option<Vec<(Variable, f64)>>

Optional (partial) starting assignment used to seed the incumbent. Advisory: an infeasible or incomplete hint is ignored. Default None.

§tolerances: Tolerances

Expert-level numeric tolerances (see Tolerances). Most callers should leave this at Tolerances::default; override an individual field only once you understand the correctness/permissiveness trade-off documented on it.

Trait Implementations§

Source§

impl Clone for SolveOptions

Source§

fn clone(&self) -> SolveOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SolveOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SolveOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.