OR 2023 – Hamburg
computeIIS
)Definition of condition number \(\kappa\) of a square matrix \(B\) for solving \(Bx=b\)
\(\kappa(B) = \|B\|\cdot\|B^{-1}\|\) provides upper bound on input error amplification in the solution of a linear system \(Bx=b\). It is the normed reciprocal of the distance to singularity.
\[\frac{\|\delta x\|}{\|x\|} \leq \kappa(B) \cdot \frac{\|\delta b\|}{\|b\|}\]
Double precision
Default feasibility tolerance
FeasRelax
to minimize the sum of infeasibilities of:\[ \begin{align} B^Ty = 0 \\ e^Ty = 1 \\ y \; \text{free} \end{align} \]
\[ \begin{align} By = 0 \\ e^Ty = 1 \\ y \; \text{free} \end{align} \]
Third case: Examine angles of pairs of matrix rows and columns
NumericFocus=3
and ScaleFlag=2
if row and column ratios are largePRM
fileEspecially rows and columns with common intersection
Example: \[\begin{align} & B=\begin{pmatrix} 1 & 0\\ M & 1 \end{pmatrix} \text{ has inverse } B^{-1}=\begin{pmatrix} 1 & 0\\ -M & 1 \end{pmatrix}\\ & \Rightarrow \|B\| \geq M \text{ and } \|B^{-1}\| \geq M\\ & \Rightarrow \kappa(B) = \|B\|\cdot\|B^{-1}\| \color{red}{\geq M^2} \end{align}\]
Remedies:
big M
valuesc306: 0.416666667 x80 – 100 x90 = 0 [...] c11360: 0.416666666 x80 – 100 x90 = 0
->
bigger perturbation than necessaryInstallation: python -m pip install gurobi-modelanalyzer
Basic usage:
afiro
kappa_explain()
will generate a new LP or MPS file, containing the ill-conditioning certificate:afiro_kappaexplain.lp
:Minimize
0 X36 + 0 X04 + 0 X15 + 0 X16 + 0 X26 + 0 X38 + 0 X37
Subject To
GRB_Combined_Row: 0.0303868836044176 X23 + 4.80518e-10 X01
- 4.65661e-10 X03 = 0
(mult=2696322.968477607)R09x: - 0.9999999000000001 X01 + X03 = 0
(mult=-2696322.6896988587)R09: - X01 + X03 = 0
(mult=0.2787787486643817)X46: - X03 + 0.109 X22 <= 0
(mult=0.030386883604417606)R19: X23 - X22 + X24 + X25 = 0
(mult=0.030386883604417606)X45: - X25 <= 0
(mult=0.030386883604417606)X48: 0.301 X01 - X24 <= 0
Bounds
End
afiro
Instanceangle_explain()
returns a list of tuples:
neos-1603965
(MIPLIB 2017)model.relax()
to relax integrality conditions1.60000000016e+21
(original model)angle_explain()
does not reveal any almost parallel rows or columnsSubject To
GRB_Combined_Row: = 1.000000015655
(mult=0.999999999815)R24991: C8008 - C8009 >= 0
(mult=9.9999999981499e-11)R9004: - 1e+10 C8008 <= 0
(mult=9.9999999981499e-11)R13004: - 0.15 C7002 + 1e+10 C8009 <= 1e+10
(mult=1.4999999997225e-11)R1030: C3030 - C7001 <= 0
(mult=-1.4999999997225e-11)R1966: C3966 - C7001 <= 0
(mult=-1.4999999997225e-11)R2966: C4966 - C7002 <= 0
(mult=-1.4999999997225e-11)R28014: C0030 + C3030 = 7165
(mult=1.4999999997225e-11)R28950: C0966 + C3966 + C4966 = 8221
(mult=1.12499999982e-11)R0030: 1.3333333333 C0030 = 0
(mult=-1.12499999982e-11)R0966: 1.3333333333 C0966 = 0
big M
values of \(10^{10}\) are the issue hereconverttofractions()
:
matrix_bitmap()
:
spy()
(matplotlib
) to inspect sparsity patternTrack down reasons for numerical issues
Open-source (Apache-2.0) on GitHub:
Install via pip:
python -m pip install gurobi-modelanalyzer
Currently only supports LPs (use model.relax()
to inspect root LP of MIPs)
Still in pre-release stage (version 0.2.0)
Get involved and share your feedback and ideas!
©️ Gurobi Optimization