how to overcome numerical trouble?

388 views
Skip to first unread message

Rashesh Mehta

unread,
Apr 22, 2015, 8:14:51 AM4/22/15
to gur...@googlegroups.com
I am running a lp model in matlab by Gurobi
I get following error message.


Optimize a model with 189 rows, 541 columns and 2168 nonzeros
Presolve removed 141 rows and 540 columns
Presolve time: 0.00s
Ordering time: 0.00s

Barrier statistics:
 Dense cols : 2
 AA' NZ     : 1.365e+03
 Factor NZ  : 2.664e+03
 Factor Ops : 4.757e+04 (less than 1 second per iteration)
 Threads    : 1

                  Objective                Residual
Iter       Primal          Dual         Primal    Dual     Compl     Time
   0   1.00285862e+03  0.00000000e+00  4.00e+04 0.00e+00  1.00e+06     0s
   1   1.27333695e+03  1.23446211e+05  2.28e+04 1.05e+02  5.27e+05     0s
   2   1.37245397e+03  3.58825834e+04  5.54e+03 2.51e+01  1.28e+05     0s
   3   1.29947787e+03 -3.39345601e+05  9.46e+02 3.61e+00  2.19e+04     0s
   4   1.30634207e+04 -9.32526865e+05  5.30e+03 1.98e+01  1.23e+06     0s
   5   6.83417740e+03 -4.77629331e+05  1.24e+03 4.39e+00  1.48e+05     0s
   6   6.82951418e+04  5.07245784e+04  1.83e+03 1.63e+02  2.19e+06     0s
   7   6.43025146e+04  4.81480001e+04  2.05e+02 8.23e+01  2.32e+05     0s
   8*  2.11169401e+05  8.56998881e+05  5.66e+00 7.11e+00  9.70e+01     0s
   9*  2.04061601e+06  5.25251304e+06  5.66e-01 1.20e+01  9.73e+00     0s
  10*  2.04000392e+07  4.95050215e+07  5.67e-02 7.84e+00  9.73e-01     0s
  11*  2.01077760e+08  4.84268006e+08  5.67e-03 1.17e+01  9.75e-02     0s
  12*  2.01075804e+09  4.77003350e+09  5.67e-04 4.84e+00  9.61e-03     0s
  13*  2.01162122e+10  4.83946596e+10  5.67e-05 2.37e+01  9.63e-04     0s
  14*  2.01150035e+11  4.84394120e+11  5.67e-06 2.23e+00  9.63e-05     0s
  15*  1.77281340e+12  4.23963011e+12  5.67e-07 7.17e+00  9.69e-06     0s
  16*  1.77280641e+13  4.23646571e+13  5.67e-08 8.37e+00  9.69e-07     0s
  17*  1.77244929e+14  4.23866200e+14  5.67e-09 1.20e+01  9.71e-08     0s
  18*  1.77202885e+15  4.23953505e+15  5.67e-10 1.93e+00  9.72e-09     0s
  19*  1.77201750e+16  4.23842027e+16  5.67e-11 1.42e+01  9.72e-10     0s
  20*  1.77201651e+17  4.23830935e+17  5.69e-12 5.04e+00  9.72e-11     0s
  21*  1.77201494e+18  4.23829612e+18  7.26e-13 8.87e+01  9.72e-12     0s
  22*  1.77052933e+19  4.24030455e+19  5.66e-14 2.95e+01  9.74e-13     0s
  23*  1.77049558e+20  4.24021137e+20  5.66e-15 2.54e-01  9.75e-14     0s
  24*  1.77047621e+21  4.23985611e+21  5.66e-16 7.63e+00  9.75e-15     0s
  25*  1.76953804e+22  4.24210067e+22  5.67e-17 1.23e+01  9.78e-16     0s
  26*  1.76897665e+23  4.24222037e+23  5.67e-18 4.77e-01  9.80e-17     0s
  27*  1.76896398e+24  4.24077519e+24  5.67e-19 1.90e+01  9.90e-18     0s
  28*  1.76896002e+25  4.24062396e+25  5.67e-20 1.50e+02  1.04e-18     0s
  29*  1.76895999e+26  4.24058552e+26  5.67e-21 2.54e+01  1.04e-19     0s
  30*  1.76869469e+27  4.24280231e+27  5.67e-22 9.50e+00  1.04e-20     0s
  31*  1.76649089e+28  4.24410530e+28  5.67e-23 8.72e+00  1.05e-21     0s

Barrier performed 31 iterations in 0.09 seconds
Numerical trouble encountered

Iteration    Objective       Primal Inf.    Dual Inf.      Time
       0    0.0000000e+00   1.525879e-05   0.000000e+00      0s

Solved in 9 iterations and 0.10 seconds
Infeasible model

result =

          status: 'INFEASIBLE'
     versioninfo: [1x1 struct]
      farkasdual: [189x1 double]
     farkasproof: 7.0551e-05
       itercount: 9
    baritercount: 31
       nodecount: 0

INFEASIBLE


I want to know reasons for numerical trouble and solutions. I have tried increasing NumericFocus upto 3.

Also why - too many rows are removed in presolve. Those are all equality constraaints.

I am calling gurobi from MATLAB.
I prepare constraint matrix A, b and c in MATLAB.


T.

unread,
Apr 22, 2015, 10:32:28 AM4/22/15
to gur...@googlegroups.com
Could you export your model and post it?

Rashesh Mehta

unread,
Apr 24, 2015, 2:13:46 AM4/24/15
to gur...@googlegroups.com
On furhter investigation and trials, I found mistake in my data from which model was prepared. On correcting that, I could get the results using gurobi (academic license)  in matlab.
Reply all
Reply to author
Forward
0 new messages