warning in the outpout

914 views
Skip to first unread message

Hossein Haghighat

unread,
Oct 9, 2016, 5:45:15 PM10/9/16
to Gurobi Optimization
hello,
I solve my MIP model with gurobi. in the output, I get the following warning. I am wondering if I can accept the solution as optimal? 



Warning: Model contains large matrix coefficient range
         Consider reformulating model or setting NumericFocus parameter
         to avoid numerical issues.
Iteration    Objective       Primal Inf.    Dual Inf.      Time
       0      handle free variables                          0s
    1197    2.0926911e+11   0.000000e+00   0.000000e+00      0s

Solved in 1197 iterations and 0.03 seconds
Optimal objective  2.092691130e+11
Warning: unscaled primal violation = 5.06986e+08 and residual = 498485
Warning: unscaled dual violation = 0.00257111 and residual = 0.00257111
Gurobi 6.5.0: optimal solution; objective 2.09269113e+11
8241 simplex iterations
187 branch-and-cut nodes 
plus 1197 simplex iterations for intbasis 

Sonja Mars

unread,
Oct 10, 2016, 7:20:45 AM10/10/16
to gur...@googlegroups.com
Hi,

Can you please post the full log file? This just seems to be a part of it.

Thanks and best regards,
Sonja


----
Dr. Sonja Mars
Gurobi Optimization - Technical Support




Hossein Haghighat

unread,
Oct 11, 2016, 12:31:03 AM10/11/16
to Gurobi Optimization
hello,
here is the complete output:

Presolve eliminates 943 constraints and 420 variables.
Adjusted problem:
5319 variables:
        1900 binary variables
        3419 linear variables
5718 constraints, all linear; 16525 nonzeros
        1531 equality constraints
        4187 inequality constraints
1 linear objective; 144 nonzeros.

Gurobi 6.5.0: threads=4
outlev=1
Optimize a model with 5718 rows, 5319 columns and 16525 nonzeros
Coefficient statistics:
  Matrix range    [4e-01, 8e+20]
  Objective range [3e+06, 8e+09]
  Bounds range    [2e-02, 4e+00]
  RHS range       [9e-13, 8e+20]

Warning: Model contains large matrix coefficient range
         Consider reformulating model or setting NumericFocus parameter
         to avoid numerical issues.
Presolve removed 4149 rows and 4256 columns
Presolve time: 0.03s
Presolved: 1569 rows, 1063 columns, 5089 nonzeros
Variable types: 1010 continuous, 53 integer (53 binary)

Root relaxation: objective 3.818849e+09, 772 iterations, 0.03 seconds

    Nodes    |    Current Node    |     Objective Bounds      |     Work
 Expl Unexpl |  Obj  Depth IntInf | Incumbent    BestBd   Gap | It/Node Time

     0     0 3.8188e+09    0   12          - 3.8188e+09      -     -    0s
H    0     0                    4.070584e+09 3.8188e+09  6.18%     -    0s
     0     0 3.8222e+09    0   12 4.0706e+09 3.8222e+09  6.10%     -    0s
     0     0 3.8222e+09    0   13 4.0706e+09 3.8222e+09  6.10%     -    0s
     0     0 3.8223e+09    0   12 4.0706e+09 3.8223e+09  6.10%     -    0s
     0     0 3.8223e+09    0   12 4.0706e+09 3.8223e+09  6.10%     -    0s
     0     2 3.8223e+09    0   12 4.0706e+09 3.8223e+09  6.10%     -    0s
*  133   121              30    4.019485e+09 3.9100e+09  2.72%  36.1    0s
*  156   114              31    3.984210e+09 3.9100e+09  1.86%  34.4    0s
H  174   122                    3.982389e+09 3.9100e+09  1.82%  33.8    0s
*  518   317              40    3.979538e+09 3.9179e+09  1.55%  28.7    0s
* 1542   681              51    3.978015e+09 3.9216e+09  1.42%  28.0    1s
* 1653   699              43    3.977556e+09 3.9243e+09  1.34%  27.6    1s
* 1654   670              41    3.975792e+09 3.9243e+09  1.29%  27.7    1s
* 2320   784              43    3.973347e+09 3.9314e+09  1.05%  26.4    2s
H 2757   925                    3.972356e+09 3.9334e+09  0.98%  26.1    2s
* 2854   963              41    3.972345e+09 3.9338e+09  0.97%  25.9    2s
H 5670  2096                    3.971839e+09 3.9411e+09  0.77%  23.9    4s
H 6368  2302                    3.971824e+09 3.9426e+09  0.74%  23.9    4s
  6897  2509 3.9439e+09   20    8 3.9718e+09 3.9434e+09  0.72%  23.9    5s
*10292  3634              38    3.971530e+09 3.9472e+09  0.61%  23.6    7s
*12409  4286              37    3.971350e+09 3.9487e+09  0.57%  23.5    8s
 15553  5054     cutoff   32      3.9714e+09 3.9502e+09  0.53%  23.4   10s
 24709  6971 3.9634e+09   28    3 3.9714e+09 3.9537e+09  0.44%  23.5   15s
 33777  8397 3.9683e+09   34    6 3.9714e+09 3.9562e+09  0.38%  23.5   20s
 42931  9146 3.9696e+09   36    6 3.9714e+09 3.9583e+09  0.33%  23.7   25s
 50740  9503     cutoff   30      3.9714e+09 3.9599e+09  0.29%  23.6   30s
 59921  9425     cutoff   35      3.9714e+09 3.9615e+09  0.25%  23.5   35s
 67724  9034 3.9638e+09   31    5 3.9714e+09 3.9629e+09  0.21%  23.2   40s
 77255  8087 3.9655e+09   28    5 3.9714e+09 3.9647e+09  0.17%  23.0   45s
 85792  6351     cutoff   29      3.9714e+09 3.9664e+09  0.12%  22.8   50s
 93456  3825 3.9684e+09   32    5 3.9714e+09 3.9684e+09  0.08%  22.5   55s

Explored 100119 nodes (2225888 simplex iterations) in 58.35 seconds
Thread count was 4 (of 64 available processors)

Optimal solution found (tolerance 1.00e-04)
Warning: max constraint violation (8.2575e+06) exceeds tolerance
         (possibly due to large matrix coefficients)
Best objective 3.971350049716e+09, best bound 3.971012346796e+09, gap 0.0085%
Optimize a model with 5718 rows, 5319 columns and 16525 nonzeros
Coefficient statistics:
  Matrix range    [4e-01, 8e+20]
  Objective range [3e+06, 8e+09]
  Bounds range    [2e-02, 4e+00]
  RHS range       [9e-13, 8e+20]

Warning: Model contains large matrix coefficient range
         Consider reformulating model or setting NumericFocus parameter
         to avoid numerical issues.
Iteration    Objective       Primal Inf.    Dual Inf.      Time
       0      handle free variables                          0s
    1495    3.9713500e+09   0.000000e+00   0.000000e+00      0s

Solved in 1495 iterations and 0.06 seconds
Optimal objective  3.971350050e+09
Warning: unscaled primal violation = 8.51968e+06 and residual = 8.51968e+06
Warning: unscaled dual violation = 7.62939e-06 and residual = 7.62939e-06
Gurobi 6.5.0: optimal solution; objective 3971350050
2225888 simplex iterations
100119 branch-and-cut nodes
plus 1495 simplex iterations for intbasis

Sonja Mars

unread,
Oct 11, 2016, 2:32:51 AM10/11/16
to gur...@googlegroups.com
Hi,

Thanks for posting the complete log.

This model has severe numerical issues as the warning messages state. The range of matrix coefficients is pretty large. Additionally, the largest coefficients in the objective and RHS are very large.
> Coefficient statistics:
> Matrix range [4e-01, 8e+20]
> Objective range [3e+06, 8e+09]
> Bounds range [2e-02, 4e+00]
> RHS range [9e-13, 8e+20]
> Warning: Model contains large matrix coefficient range
> Consider reformulating model or setting NumericFocus parameter
> to avoid numerical issues.

Gurobi has a hard time solving. You can see this warning after the MIP was solved:
> Warning: max constraint violation (8.2575e+06) exceeds tolerance
> (possibly due to large matrix coefficients)

This is a huge violation. You should consider rescaling or reformulating your model.

Best regards,

Hossein Haghighat

unread,
Oct 15, 2016, 6:53:46 AM10/15/16
to Gurobi Optimization
hello,
after reformulating, the model takes a very long time to run (it is not finished). I have attached the gurobi outlog. could you please tell me why this happen and how to reduce the solution time. I have tried many option settings but it seems they have no effect on the time. 
outlog.txt

Sonja Mars

unread,
Oct 17, 2016, 1:34:13 AM10/17/16
to gur...@googlegroups.com
Hi,

Can you post a log file with the default parameters?

We do not recommend to change these two parameters:
opttol 1e-3
intfeastol 1e-3

Additionally, it looks like Gurobi has a hard time finding the first feasible solution. So setting MIPFocus=2 might not be the best choice. I would start with the defaults and if this is not finding a first feasible quickly, I would try MIPFocus=1.

Additionally, we have three heuristics for finding a first feasible. I would also try those:
Feasibility Pump: http://www.gurobi.com/documentation/6.5/refman/pumppasses.html#parameter:PumpPasses
Minimum Relaxation Heuristic: http://www.gurobi.com/documentation/6.5/refman/minrelnodes.html#parameter:MinRelNodes
Zero Objective Heuristic: http://www.gurobi.com/documentation/6.5/refman/zeroobjnodes.html#parameter:ZeroObjNodes
Reply all
Reply to author
Forward
0 new messages