pub enum SolverError {
Infeasible,
Unbounded,
NumericalDifficulty {
message: String,
},
TimeLimitExceeded {
elapsed_seconds: f64,
},
IterationLimit {
iterations: u64,
},
InternalError {
message: String,
error_code: Option<i32>,
},
Unsupported(&'static str),
BasisInconsistent {
num_row: i64,
total_basic: i64,
col_basic: i64,
row_basic: i64,
},
BasisRowCountMismatch {
lp_rows: usize,
basis_rows: usize,
},
}Expand description
Terminal LP solve error returned after all retry attempts are exhausted.
The calling algorithm uses the variant to determine its response:
hard stop (Infeasible, Unbounded, InternalError) or terminate
with a diagnostic error (NumericalDifficulty, TimeLimitExceeded,
IterationLimit).
The six variants correspond to the error categories defined in Solver Abstraction SS6. Solver-internal errors (e.g., factorization failures) are resolved by retry logic before reaching this level.
Variants§
Infeasible
The LP has no feasible solution.
Indicates a data error (inconsistent bounds or constraints) or a modeling error. The calling algorithm should perform a hard stop.
Unbounded
The LP objective is unbounded below.
Indicates a modeling error (missing bounds, incorrect objective sign). The calling algorithm should perform a hard stop.
NumericalDifficulty
Solver encountered numerical difficulties that persisted through all retry attempts.
The calling algorithm should log the error and perform a hard stop.
TimeLimitExceeded
Per-solve wall-clock time budget exhausted.
IterationLimit
Solver simplex iteration limit reached.
InternalError
Unrecoverable solver-internal failure.
Covers FFI panics, memory allocation failures within the solver, corrupted internal state, or any error not classifiable into the above categories. The calling algorithm should log the error and perform a hard stop.
Fields
Unsupported(&'static str)
The backend does not implement the requested operation.
The caller should fall back to an alternate code path (e.g.,
reset + load_model).
BasisInconsistent
The offered basis was rejected by the solver because the total number of basic variables did not match the row count.
Indicates that the reconstructed basis violates the fundamental LP
basis consistency invariant (col_basic + row_basic == num_row).
The calling algorithm should perform a hard stop; this is not a
recoverable solver-internal condition.
Fields
BasisRowCountMismatch
The offered warm-start basis has fewer row entries than the loaded LP
has rows. The basis predates an add_rows growth and cannot be padded
soundly (a BASIC pad is wrong for inequality-row slacks), so it is
rejected; the caller should fall back to a cold solve.
Trait Implementations§
Source§impl Debug for SolverError
impl Debug for SolverError
Source§impl Display for SolverError
impl Display for SolverError
Source§impl Error for SolverError
impl Error for SolverError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()