Barrier Convergence Tolerance not met
回答済みDear Support Team,
I wish to solve large-scale optimization models. As I do not need an exact solution, I do not need Gurobi to solve it with default tolerances but getting a solution with a 1% optimality gap is sufficient.
To achieve this, I solved my models with the Barrier algorithm without Crossover and set the BarConvTol Parameter to 1e-2 to yield the desired optimality gap. I am working with Gurobi 11.0.3.
Looking at the log file of some of the models I am surprised as the final gap between dual and primal objective is far above 1e-2. It seems to be 1e-1, which is obviously an entire magnitude higher of what I would have expected when setting the BarConvTol parameter to 1e-2.
Now I am wondering if the BarConvTol only applies if I activate Crossover and if so, if there is any other parameter to solve the Barrier algorithm to a desired optimality gap? Or am I missing another relevant parameter during the solve?
Thanks,
Lene
Gurobi 11.0.3 (win64) logging started Sat Apr 26 13:19:51 2025
Set parameter Method to value 2
Set parameter Crossover to value 0
Set parameter Threads to value 16
Set parameter BarConvTol to value 0.01
Gurobi Optimizer version 11.0.3 build v11.0.3rc0 (win64 - Windows Server 2022.0 (20348.2))
CPU model: AMD EPYC 9354 32-Core Processor, instruction set [SSE2|AVX|AVX2|AVX512]
Thread count: 32 physical cores, 64 logical processors, using up to 16 threads
Optimize a model with 34870073 rows, 28249856 columns and 85191583 nonzeros
Model fingerprint: 0x4e3fd885
Coefficient statistics:
Matrix range [1e+00, 2e+03]
Objective range [2e-05, 8e+02]
Bounds range [2e-04, 1e+06]
RHS range [3e-03, 1e+05]
Presolve removed 0 rows and 0 columns (presolve time = 5s) ...
Presolve removed 15538765 rows and 2651605 columns (presolve time = 17s) ...
Presolve removed 15538765 rows and 2651605 columns (presolve time = 21s) ...
Presolve removed 15538765 rows and 2651605 columns (presolve time = 25s) ...
Presolve removed 15538765 rows and 2651605 columns (presolve time = 30s) ...
Presolve removed 15538765 rows and 5097685 columns (presolve time = 37s) ...
Presolve removed 15538765 rows and 5097685 columns (presolve time = 42s) ...
Presolve removed 15541080 rows and 5100000 columns (presolve time = 49s) ...
Presolve removed 15871080 rows and 5430000 columns (presolve time = 50s) ...
Presolve removed 16193657 rows and 5738471 columns (presolve time = 61s) ...
Presolve removed 16193657 rows and 5738471 columns (presolve time = 65s) ...
Presolve removed 16193657 rows and 5738471 columns (presolve time = 71s) ...
Presolve removed 16193657 rows and 5738471 columns (presolve time = 77s) ...
Presolve removed 16193657 rows and 5738471 columns (presolve time = 82s) ...
Presolve removed 16193657 rows and 5738471 columns (presolve time = 85s) ...
Presolve removed 16193956 rows and 5738471 columns (presolve time = 93s) ...
Presolve removed 16193956 rows and 5738471 columns (presolve time = 97s) ...
Presolve removed 16193956 rows and 5738471 columns (presolve time = 100s) ...
Presolve removed 16193956 rows and 5738471 columns (presolve time = 108s) ...
Presolve removed 16193956 rows and 5738471 columns (presolve time = 110s) ...
Presolve removed 16193956 rows and 5738471 columns (presolve time = 119s) ...
Presolve removed 16193956 rows and 5738471 columns
Presolve time: 121.60s
Presolved: 18676117 rows, 22511385 columns, 67966959 nonzeros
Elapsed ordering time = 13s
Elapsed ordering time = 15s
Elapsed ordering time = 20s
Elapsed ordering time = 79s
Elapsed ordering time = 81s
Elapsed ordering time = 85s
Elapsed ordering time = 90s
Elapsed ordering time = 95s
Elapsed ordering time = 100s
Ordering time: 156.02s
Barrier statistics:
Dense cols : 2728
AA' NZ : 5.242e+07
Factor NZ : 8.164e+08 (roughly 23.0 GB of memory)
Factor Ops : 1.320e+12 (roughly 9 seconds per iteration)
Threads : 16
Objective Residual
Iter Primal Dual Primal Dual Compl Time
0 7.51842792e+12 -1.22835972e+14 9.76e+04 5.68e-14 6.00e+06 335s
1 7.14406152e+12 -5.07354589e+13 8.37e+04 1.89e+02 2.92e+06 351s
2 6.94418890e+12 -1.82384103e+13 7.78e+04 5.37e+01 1.94e+06 369s
3 4.94037504e+12 -1.87310411e+12 3.36e+04 1.70e+02 7.17e+05 391s
4 1.14071281e+12 -8.64164109e+11 7.00e+03 8.59e+02 1.58e+05 409s
5 1.75089098e+11 -4.78022984e+11 1.04e+03 7.65e+02 2.90e+04 424s
6 2.45508466e+10 -1.49866636e+11 1.33e+02 1.72e+03 4.89e+03 442s
7 6.93340745e+09 -3.28069926e+10 3.20e+01 2.09e+02 1.01e+03 464s
8 3.57326244e+09 -9.65679566e+09 1.61e+01 4.72e+01 3.46e+02 485s
9 1.99243039e+09 -3.99830712e+09 9.14e+00 1.59e+01 1.57e+02 502s
10 1.32718202e+09 -1.67196305e+09 6.24e+00 5.05e+00 7.97e+01 519s
11 9.56912095e+08 -9.03094611e+08 4.66e+00 2.19e+00 4.90e+01 540s
12 6.78564775e+08 -4.93320975e+08 3.43e+00 9.58e-01 3.05e+01 565s
13 5.18598409e+08 -2.68136301e+08 2.68e+00 4.12e-01 2.03e+01 588s
14 3.51559607e+08 -1.46303355e+08 1.81e+00 1.68e-01 1.26e+01 608s
15 2.43936748e+08 -6.53875708e+07 1.28e+00 5.34e-02 7.72e+00 628s
16 3.16620502e+07 -2.62046596e+07 2.32e-01 5.11e-02 1.31e+00 653s
17 2.51556134e+06 -9.37561708e+06 1.59e-02 1.38e-02 2.48e-01 673s
18 1.02217789e+06 -5.07970881e+06 5.56e-03 7.08e-03 1.26e-01 689s
19 4.83636818e+05 -2.73320692e+06 2.09e-03 3.67e-03 6.59e-02 706s
20 2.06110602e+05 -1.21182057e+06 4.55e-04 1.54e-03 2.90e-02 726s
21 1.29559747e+05 -5.10813207e+05 1.94e-04 6.03e-04 1.31e-02 750s
22 9.71519154e+04 -2.76707587e+05 1.09e-04 3.25e-04 7.63e-03 770s
23 8.16688729e+04 -1.77275337e+05 7.76e-05 2.17e-04 5.28e-03 786s
24 7.27391277e+04 -1.16475399e+05 6.25e-05 1.51e-04 3.86e-03 803s
25 6.23518461e+04 -7.20702574e+04 4.66e-05 1.03e-04 2.74e-03 823s
26 4.27755613e+04 -5.64836643e+04 1.88e-05 8.44e-05 2.03e-03 847s
27 3.80659481e+04 -2.23889885e+04 1.33e-05 4.76e-05 1.23e-03 876s
28 3.38354529e+04 -5.31737561e+03 9.20e-06 2.94e-05 7.99e-04 909s
29 3.14324648e+04 -7.00055455e+02 7.20e-06 2.46e-05 6.56e-04 938s
30 2.91926148e+04 2.22203628e+03 5.55e-06 2.14e-05 5.50e-04 961s
31 2.87751831e+04 4.75180514e+03 5.27e-06 1.84e-05 4.90e-04 982s
32 2.66267328e+04 6.32619045e+03 3.85e-06 1.67e-05 4.14e-04 1015s
33 2.63209908e+04 7.48713120e+03 3.66e-06 1.53e-05 3.84e-04 1049s
34 2.60514847e+04 8.45778828e+03 3.50e-06 1.41e-05 3.59e-04 1070s
35 2.59131242e+04 8.96786829e+03 3.41e-06 1.35e-05 3.46e-04 1096s
36 2.57290273e+04 9.34198070e+03 3.30e-06 1.30e-05 3.34e-04 1121s
37 2.55941103e+04 1.03770707e+04 3.22e-06 1.18e-05 3.11e-04 1151s
38 2.53849459e+04 1.08618042e+04 3.10e-06 1.12e-05 2.96e-04 1176s
39 2.48177763e+04 1.17610033e+04 2.77e-06 1.02e-05 2.66e-04 1211s
40 2.47443273e+04 1.20563713e+04 2.73e-06 9.81e-06 2.59e-04 1236s
41 2.45790705e+04 1.25092285e+04 2.64e-06 9.26e-06 2.46e-04 1269s
42 2.44165396e+04 1.27623103e+04 2.55e-06 8.94e-06 2.38e-04 1295s
43 2.38642907e+04 1.35737164e+04 2.25e-06 7.95e-06 2.10e-04 1329s
44 2.36928957e+04 1.40554525e+04 2.16e-06 7.33e-06 1.97e-04 1363s
45 2.36056941e+04 1.42374086e+04 2.11e-06 7.09e-06 1.91e-04 1383s
46 2.32375897e+04 1.45471303e+04 1.92e-06 6.68e-06 1.77e-04 1417s
47 2.27551844e+04 1.49925045e+04 1.66e-06 6.10e-06 1.58e-04 1451s
48 2.24386479e+04 1.52204700e+04 1.50e-06 5.79e-06 1.47e-04 1485s
49 2.23249640e+04 1.54484296e+04 1.44e-06 5.49e-06 1.40e-04 1519s
50 2.22681137e+04 1.56974068e+04 1.41e-06 5.16e-06 1.34e-04 1554s
51 2.21412919e+04 1.60072078e+04 1.35e-06 4.74e-06 1.25e-04 1588s
52 2.20380577e+04 1.61037733e+04 1.30e-06 4.60e-06 1.21e-04 1613s
53 2.19027260e+04 1.63437687e+04 1.23e-06 4.26e-06 1.13e-04 1647s
54 2.18147925e+04 1.65829974e+04 1.19e-06 3.93e-06 1.07e-04 1682s
55 2.16372667e+04 1.67357177e+04 1.11e-06 3.71e-06 1.00e-04 1715s
56 2.15481897e+04 1.68963807e+04 1.06e-06 3.49e-06 9.49e-05 1749s
57 2.14862170e+04 1.69860498e+04 1.04e-06 3.35e-06 9.18e-05 1774s
58 2.13898458e+04 1.71080994e+04 9.91e-07 3.18e-06 8.74e-05 1808s
59 2.12277816e+04 1.72206725e+04 9.16e-07 3.01e-06 8.18e-05 1842s
60 2.10686623e+04 1.73475513e+04 8.41e-07 2.82e-06 7.59e-05 1877s
61 2.09675040e+04 1.74964839e+04 7.95e-07 2.61e-06 7.08e-05 1910s
62 2.08705248e+04 1.75933710e+04 7.51e-07 2.46e-06 6.69e-05 1944s
63 2.08204684e+04 1.76808145e+04 7.28e-07 2.33e-06 6.41e-05 1977s
64 2.08184072e+04 1.77054180e+04 7.27e-07 2.29e-06 6.35e-05 1998s
65 2.07828226e+04 1.77500347e+04 7.11e-07 2.22e-06 6.19e-05 2037s
66 2.07564943e+04 1.77614334e+04 7.00e-07 4.37e-13 6.11e-05 2058s
67 2.06711222e+04 1.78416413e+04 6.61e-07 3.97e-13 5.77e-05 2091s
68 2.06138005e+04 1.78726811e+04 6.36e-07 4.86e-13 5.59e-05 2125s
69 2.05543677e+04 1.79499767e+04 6.10e-07 4.40e-13 5.31e-05 2154s
70 2.05200704e+04 1.80056229e+04 5.94e-07 5.97e-13 5.13e-05 2180s
71 2.04345293e+04 1.80481274e+04 5.56e-07 5.77e-13 4.87e-05 2214s
72 2.03555592e+04 1.80895101e+04 5.21e-07 6.54e-13 4.62e-05 2244s
73 2.03102049e+04 1.81504423e+04 5.01e-07 5.93e-13 4.41e-05 2269s
74 2.02682375e+04 1.81941736e+04 4.83e-07 5.94e-13 4.23e-05 2294s
75 2.02152730e+04 1.82682034e+04 4.60e-07 6.66e-13 3.97e-05 2328s
Barrier solved model in 75 iterations and 2328.32 seconds (1691.94 work units)
Optimal objective 2.02152730e+04
-
Hi Lene,
In general, we say that the barrier converges when the normalized duality gap and normalized complementary slackness are within the BarConvTol parameter value. However, the actual termination criteria used to terminate the barrier algorithm is more involved and uses the information from the presolved model which is not available to a Gurobi user in the log file.
Setting the BarConvTol parameter to 1e-2 seems a bit too relaxed to me. If an absolute gap of 1e-2 is acceptable for your application, I would suggest to experiment with BarConvTol= 1e-6.
Best regards,
Maliheh
0
サインインしてコメントを残してください。
コメント
1件のコメント