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: f64Primal 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: f64Dual feasibility tolerance used by the default solve attempt.
Same composition rules as primal_feasibility_tolerance.
simplex_iteration_limit: u32Per-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: u32Per-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
impl Clone for SolveProfile
Source§fn clone(&self) -> SolveProfile
fn clone(&self) -> SolveProfile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SolveProfile
impl Debug for SolveProfile
Source§impl Default for SolveProfile
impl Default for SolveProfile
Source§fn default() -> Self
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.
| Field | Value |
|---|---|
primal_feasibility_tolerance | 1e-9 |
dual_feasibility_tolerance | 1e-9 |
simplex_iteration_limit | 0 (use heuristic — see sentinel) |
ipm_iteration_limit | 10_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
impl PartialEq for SolveProfile
Source§fn eq(&self, other: &SolveProfile) -> bool
fn eq(&self, other: &SolveProfile) -> bool
self and other values to be equal, and is used by ==.