Skip to main content

SolveProfile

Struct SolveProfile 

Source
pub struct SolveProfile {
    pub primal_feasibility_tolerance: f64,
    pub dual_feasibility_tolerance: f64,
    pub simplex_iteration_limit: u32,
    pub ipm_iteration_limit: u32,
}
Expand description

LP-solver configuration values applied at the start of each phase.

SolveProfile is a struct of tuning values that callers swap in via ProfiledSolver::set_profile at phase boundaries. The profile defines the configuration of the default solve attempt and the per-attempt iteration cap; the retry ladder layers additional behavior on top.

All fields are absolute, not relative to defaults. Callers construct profiles either via Default::default() (matching the historical hardcoded behavior) or as const values for compile-time profile libraries.

SolveProfile is Copy and PartialEq so the caller can compare the desired profile against the currently-applied profile and skip FFI calls when nothing has changed.

Fields§

§primal_feasibility_tolerance: f64

Primal feasibility tolerance used by the default solve attempt.

Smaller values are stricter. The retry ladder applies max(profile_value, level_default) when it overrides this field, so a strict profile is never silently relaxed by an early retry level.

§dual_feasibility_tolerance: f64

Dual feasibility tolerance used by the default solve attempt.

Same composition rules as primal_feasibility_tolerance.

§simplex_iteration_limit: u32

Per-attempt simplex iteration cap, applied to the default attempt and every retry level.

A value of DEFAULT_PROFILE_HEURISTIC_SENTINEL (0) signals that the solver should fall back to its historical heuristic (num_cols * 50 max 100_000 for HighsSolver). Any non-zero value is applied verbatim.

Tighter values cause attempts to bail to the next retry strategy faster, bounding worst-case wall time per attempt at the cost of occasional escalation. Correctness is preserved as long as some retry level eventually solves the LP.

§ipm_iteration_limit: u32

Per-attempt IPM iteration cap.

Applies to retry levels that invoke the interior-point solver. A value of 0 is treated as “unbounded” (no cap). Any positive value is applied verbatim.

Trait Implementations§

Source§

impl Clone for SolveProfile

Source§

fn clone(&self) -> SolveProfile

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 SolveProfile

Source§

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

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

impl Default for SolveProfile

Source§

fn default() -> Self

Returns defaults that match the historical hardcoded behavior bit-for-bit, so that callers that never touch profiles see no behavioral change.

FieldValue
primal_feasibility_tolerance1e-9
dual_feasibility_tolerance1e-9
simplex_iteration_limit0 (use heuristic — see sentinel)
ipm_iteration_limit10_000

The sentinel value 0 for simplex_iteration_limit causes HighsSolver to compute the historical per-call heuristic num_cols * 50 max 100_000 rather than applying a flat cap.

Source§

impl PartialEq for SolveProfile

Source§

fn eq(&self, other: &SolveProfile) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for SolveProfile

Source§

impl StructuralPartialEq for SolveProfile

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.