Expand description
§Chapter 5.0 — Errors
§Purpose
Two kinds of failure are reported, never panicked on. The containers
(Chapter 5.8) validate outside data — triplets, raw compressed arrays —
and report the first violation found as a SparseError, which names
the offending array, position and value; every check_invariants() of
the crate returns the same type. The factorization reports a singular
basis, an inconsistent basis description, or an update called without
its spike, as an LuError carrying what the caller needs to recover.
Since L1.5 two more kinds join them: the symmetric (KKT) solvers of
Chapter 5.14 report a KktError — structure, symmetry, a zero pivot
or the wrong inertia (S6) — and the dense kernels of Chapter 5.16 a
DenseError.
xingo-core converts both into its CoreError (From impls there):
a SparseError maps variant by variant onto the CoreError that the
first edition reported, so the messages the solver prints are
unchanged.
§Invariants
(E1) Singular { rank_deficiency, cols, rows } has
rank_deficiency = cols.len() = rows.len() ≥ 1. Replacing, for
every k, the basis column at position cols[k] by the logical
column of row rows[k] yields a basis whose factorization succeeds
(tested in Chapter 5.3); this is the classic basis repair of the
simplex method (Koberstein 2005, §8.2.3; HiGHS
HFactor::buildSimple rank deficiency handling).
(E2) Errors are reported, never repaired silently: a constructor either
returns a structure satisfying all of its invariants or an error.
Enums§
- Dense
Error - Error raised by a
crate::DenseKernel(Chapter 5.16). - KktError
- Error raised by a
crate::KktSolver(Chapter 5.14). - LuError
- Error raised by
crate::LuFactor::factorizeandcrate::LuFactor::update. - Sparse
Error - Structural error of the containers: invariants (C1)–(C4) of Chapter 5.8 or (V1)–(V3) of Chapter 5.8.3 violated by the input, or the basis references of Chapter 5.1 out of range.