#[non_exhaustive]pub enum SolveError {
Infeasible {
routable: Objective,
required: Objective,
},
Overflow(Overflow),
OperationBudgetExhausted {
budget: u64,
scaling_phases: u32,
},
SelfCertificationFailed(VerifyError),
InvariantViolated {
what: &'static str,
},
}Expand description
Solving failed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Infeasible
No flow satisfies the supplies and capacities simultaneously.
A property of the instance, established before the scaling loop by an independent max-flow feasibility test, so an infeasible instance is always reported as infeasible and never as a bogus optimum.
Fields
Overflow(Overflow)
A working quantity left integer range.
Cost scaling multiplies costs by n + 1; very large costs on very
large networks can exceed Cost. Reduce the cost range or split the
instance — the result is not approximated.
OperationBudgetExhausted
The caller’s operation budget was exhausted before the solve finished.
Fields
SelfCertificationFailed(VerifyError)
The solve produced a flow that failed its own certification.
Only reachable with the certify-on-solve feature. It always indicates
a defect in this crate, and it is surfaced rather than swallowed: a
solver that cannot prove its own answer has no business returning it.
InvariantViolated
A solver invariant did not hold. This is a defect in this crate.
Reported rather than panicked because the crate’s no-panic rule applies to product code: the caller gets a bad-news value, not an aborted process.
Trait Implementations§
Source§impl Clone for SolveError
impl Clone for SolveError
Source§impl Debug for SolveError
impl Debug for SolveError
Source§impl Display for SolveError
impl Display for SolveError
impl Eq for SolveError
Source§impl Error for SolveError
impl Error for SolveError
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()