Improving solving (gap closing) time
AnsweredHi!
I have a task scheduling problem that I'm trying to solve using a MILP model. It closely resembles a VRPTW (Vehicle Routing Problem with Time Windows). I use binary decision variable \(x_{ijk}\), which is 1 if vehicle \(k\) travels from task \(i\) to \(j\), and binary decision variable \(y_{ik}\), which is 1 if vehicle \(k\) performs task \(i\). I have set a TimeLimit of 600, and I'm trying to obtain the best possible solution within those 10 minutes. To speed up the problem-solving process, I have already done several things:
-
I only create decision variables that are "feasible." This has reduced the number of ij combinations by more than 90% (from 2,223,081 to 177,454). Additionally, there are many tasks that can only be performed by specific vehicles, which further reduces the number of ijk combinations by more than 95% (from 12,421,780 to 72,850). So, I have tried to make the model as "dense" as possible.
-
I have tightly defined the lb and ub values of the continuous variables and the big M values used.
-
I have tried to limit the coefficient statistics ranges. I believe these ranges are acceptable. However, the lb of the matrix range and objective range are slightly negative, whereas I expected a lb of 0 everywhere. I haven't been able to determine the cause of this yet. I set the IntegralityFocus parameter to 1 because, in some cases, a binary decision variable approached 0.999..., which didn't affect the objective value in the solution but did affect reading the variables afterward.
-
I have written a heuristic to provide Gurobi with an initial feasible solution. It works well because it always produces an initial solution with a gap. However, it takes quite a long time to close that gap.
-
I have varied the MIPFocus parameter (1, 2, and 3), but it doesn't make much of a difference. After 10 minutes, it doesn't result in more than a 1% difference in the gap.
Below, I have included the Gurobi log. I was wondering if anyone notices anything in the log that stands out or has suggestions for what I could do to speed up the solving process / gap closing?
During the solving of the root node, my computer is running at approximately 15-20% CPU usage and 20% RAM (6/32 GB). It doesn't seem to be the limiting factor. After solving the root node, CPU usage increases to varying levels between 50% and 100%, and RAM usage increases to 8.0 GB (25%).
Set parameter IntegralityFocus to value 1
Set parameter TimeLimit to value 600
Gurobi Optimizer version 10.0.1 build v10.0.1rc0 (win64)
CPU model: 11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz, instruction set [SSE2|AVX|AVX2|AVX512]
Thread count: 8 physical cores, 16 logical processors, using up to 16 threads
Academic license - for non-commercial use only - registered to [...]
Optimize a model with 448041 rows, 165160 columns and 1632757 nonzeros
Model fingerprint: 0x9adce2cd
Variable types: 17940 continuous, 147220 integer (147220 binary)
Coefficient statistics:
Matrix range [3e-01, 1e+03]
Objective range [4e-01, 2e+02]
Bounds range [1e+00, 6e+02]
RHS range [1e+00, 2e+03]
Warning: Completing partial solution with 147116 unfixed non-continuous variables out of 147220
User MIP start produced solution with objective 16113.4 (1.28s)
User MIP start produced solution with objective 15976.6 (1.31s)
User MIP start produced solution with objective 15885.4 (1.79s)
User MIP start produced solution with objective 15793.9 (2.03s)
User MIP start produced solution with objective 15520.3 (2.26s)
User MIP start produced solution with objective 15425.7 (2.42s)
User MIP start produced solution with objective 15238.5 (3.01s)
User MIP start produced solution with objective 15010.3 (3.09s)
User MIP start produced solution with objective 14918.8 (3.18s)
User MIP start produced solution with objective 11972.5 (3.22s)
User MIP start produced solution with objective 11926.9 (3.31s)
User MIP start produced solution with objective 11920.5 (3.40s)
User MIP start produced solution with objective 11874.9 (3.91s)
User MIP start produced solution with objective 11869.1 (4.11s)
User MIP start produced solution with objective 11855.8 (4.32s)
User MIP start produced solution with objective 11855.8 (4.43s)
Loaded user MIP start with objective 11855.8
Processed MIP start in 4.43 seconds (4.39 work units)
Presolve removed 314558 rows and 124487 columns (presolve time = 5s) ...
Presolve removed 346168 rows and 137568 columns
Presolve time: 7.73s
Presolved: 101873 rows, 27592 columns, 756795 nonzeros
Variable types: 9980 continuous, 17612 integer (17588 binary)
Deterministic concurrent LP optimizer: primal simplex, dual simplex, and barrier
Showing barrier log only...
Root barrier log...
Ordering time: 3.74s
Barrier statistics:
Dense cols : 1
AA' NZ : 8.347e+06
Factor NZ : 7.953e+07 (roughly 700 MB of memory)
Factor Ops : 8.681e+10 (roughly 1 second per iteration)
Threads : 6
Objective Residual
Iter Primal Dual Primal Dual Compl Time
0 1.60237074e+06 -9.14336501e+05 1.15e+04 1.11e+00 3.49e+02 19s
1 9.61125017e+05 -1.58838518e+06 6.94e+03 3.36e+00 1.92e+02 19s
2 4.74942636e+05 -2.15345397e+06 3.35e+03 3.96e-01 8.86e+01 20s
3 1.13003525e+05 -1.35985557e+06 6.92e+02 7.12e-13 2.05e+01 21s
4 2.98269526e+04 -4.08891749e+05 1.06e+02 4.75e-13 3.74e+00 22s
5 1.06150785e+04 -6.93610387e+04 8.57e+00 4.55e-13 5.60e-01 23s
6 6.19254334e+03 -1.46660857e+04 1.32e+00 4.55e-13 1.40e-01 24s
7 5.02695393e+03 -4.63263751e+03 7.35e-01 3.39e-13 6.48e-02 25s
8 4.53794584e+03 -3.63807528e+02 5.29e-01 2.29e-13 3.28e-02 26s
9 4.28559121e+03 4.83829777e+02 4.18e-01 3.53e-13 2.54e-02 27s
10 4.19804627e+03 1.03706008e+03 3.77e-01 3.27e-13 2.11e-02 27s
11 3.87457855e+03 2.00585246e+03 2.37e-01 3.47e-13 1.25e-02 28s
12 3.74777556e+03 2.60206837e+03 1.81e-01 2.42e-13 7.63e-03 29s
13 3.58752064e+03 2.98259375e+03 1.10e-01 2.36e-13 4.02e-03 30s
14 3.48197452e+03 3.17579897e+03 6.00e-02 3.33e-13 2.04e-03 31s
15 3.44443566e+03 3.23784357e+03 4.48e-02 2.67e-13 1.37e-03 32s
16 3.43564158e+03 3.24870029e+03 4.05e-02 2.31e-13 1.24e-03 33s
17 3.39618455e+03 3.27990990e+03 2.32e-02 2.71e-13 7.73e-04 34s
18 3.36884508e+03 3.33006412e+03 9.36e-03 4.04e-13 2.58e-04 35s
19 3.36123905e+03 3.34739752e+03 5.79e-03 3.02e-13 9.18e-05 36s
20 3.35320374e+03 3.34881649e+03 1.66e-03 3.38e-13 2.91e-05 37s
21 3.35050757e+03 3.34900661e+03 2.88e-04 3.03e-13 9.98e-06 38s
22 3.35000302e+03 3.34955246e+03 4.02e-05 3.03e-13 3.00e-06 39s
23 3.34991944e+03 3.34991594e+03 5.27e-08 3.17e-13 2.33e-08 39s
24 3.34991931e+03 3.34991912e+03 1.90e-07 3.71e-13 1.24e-09 40s
25 3.34991920e+03 3.34991920e+03 4.12e-09 3.60e-13 1.44e-12 41s
Barrier solved model in 25 iterations and 41.34 seconds (44.83 work units)
Optimal objective 3.34991920e+03
Root crossover log...
6855 DPushes remaining with DInf 0.0000000e+00 41s
0 DPushes remaining with DInf 0.0000000e+00 41s
2837 PPushes remaining with PInf 1.0845740e-04 41s
0 PPushes remaining with PInf 0.0000000e+00 42s
Push phase complete: Pinf 0.0000000e+00, Dinf 2.0740416e-11 42s
Root simplex log...
Iteration Objective Primal Inf. Dual Inf. Time
6719 3.3499192e+03 0.000000e+00 0.000000e+00 42s
6719 3.3499192e+03 0.000000e+00 0.000000e+00 42s
Concurrent spin time: 1.04s
Solved with barrier
Root relaxation: objective 3.349919e+03, 6719 iterations, 29.81 seconds (30.02 work units)
Total elapsed time = 47.96s
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 3349.91920 0 1017 11855.7800 3349.91920 71.7% - 50s
0 0 3349.91920 0 970 11855.7800 3349.91920 71.7% - 51s
0 0 3384.39095 0 1228 11855.7800 3384.39095 71.5% - 57s
H 0 0 11816.430000 3384.39095 71.4% - 57s
0 0 3409.42576 0 1103 11816.4300 3409.42576 71.1% - 60s
0 0 3409.42576 0 1072 11816.4300 3409.42576 71.1% - 61s
0 0 3480.47871 0 1222 11816.4300 3480.47871 70.5% - 72s
0 0 3483.84085 0 1250 11816.4300 3483.84085 70.5% - 75s
0 0 3485.17766 0 1246 11816.4300 3485.17766 70.5% - 76s
0 0 3485.26550 0 1228 11816.4300 3485.26550 70.5% - 77s
0 0 3485.26857 0 1193 11816.4300 3485.26857 70.5% - 77s
0 0 3642.60629 0 1459 11816.4300 3642.60629 69.2% - 91s
0 0 3663.25691 0 1419 11816.4300 3663.25691 69.0% - 94s
0 0 3666.94703 0 1400 11816.4300 3666.94703 69.0% - 95s
0 0 3668.99146 0 1556 11816.4300 3668.99146 69.0% - 97s
0 0 3669.09141 0 1510 11816.4300 3669.09141 68.9% - 97s
0 0 3669.18538 0 1515 11816.4300 3669.18538 68.9% - 98s
0 0 3669.18538 0 1517 11816.4300 3669.18538 68.9% - 98s
0 0 3824.27303 0 2215 11816.4300 3824.27303 67.6% - 110s
0 0 3835.07681 0 1992 11816.4300 3835.07681 67.5% - 116s
0 0 3835.45285 0 2084 11816.4300 3835.45285 67.5% - 119s
0 0 3835.49373 0 2085 11816.4300 3835.49373 67.5% - 120s
0 0 3878.38964 0 2238 11816.4300 3878.38964 67.2% - 132s
0 0 3884.85528 0 2256 11816.4300 3884.85528 67.1% - 136s
0 0 3885.01647 0 2246 11816.4300 3885.01647 67.1% - 138s
0 0 3885.06370 0 2240 11816.4300 3885.06370 67.1% - 139s
0 0 3900.70213 0 2145 11816.4300 3900.70213 67.0% - 149s
0 0 3902.33752 0 2273 11816.4300 3902.33752 67.0% - 153s
0 0 3902.33752 0 2239 11816.4300 3902.33752 67.0% - 155s
0 0 3913.71840 0 1606 11816.4300 3913.71840 66.9% - 163s
0 0 3915.68971 0 1643 11816.4300 3915.68971 66.9% - 166s
0 0 3916.32175 0 1531 11816.4300 3916.32175 66.9% - 168s
0 0 3916.32447 0 1634 11816.4300 3916.32447 66.9% - 170s
0 0 3927.46489 0 1920 11816.4300 3927.46489 66.8% - 176s
0 0 3927.57449 0 1942 11816.4300 3927.57449 66.8% - 178s
0 0 3927.91886 0 1979 11816.4300 3927.91886 66.8% - 179s
0 0 3927.92061 0 1955 11816.4300 3927.92061 66.8% - 180s
0 0 3931.71526 0 1990 11816.4300 3931.71526 66.7% - 184s
0 0 3932.06141 0 2032 11816.4300 3932.06141 66.7% - 186s
0 0 3932.06449 0 1983 11816.4300 3932.06449 66.7% - 186s
0 0 3948.79076 0 2031 11816.4300 3948.79076 66.6% - 192s
0 0 3948.89053 0 2052 11816.4300 3948.89053 66.6% - 194s
0 0 3948.92035 0 1989 11816.4300 3948.92035 66.6% - 194s
0 0 3972.75435 0 2012 11816.4300 3972.75435 66.4% - 208s
0 0 3973.37801 0 2014 11816.4300 3973.37801 66.4% - 209s
0 0 3974.50630 0 1980 11816.4300 3974.50630 66.4% - 211s
0 0 3974.50630 0 1960 11816.4300 3974.50630 66.4% - 211s
0 0 3983.27270 0 1947 11816.4300 3983.27270 66.3% - 217s
0 0 3983.64854 0 1989 11816.4300 3983.64854 66.3% - 218s
0 0 3983.73473 0 2034 11816.4300 3983.73473 66.3% - 219s
0 0 3991.39333 0 2712 11816.4300 3991.39333 66.2% - 226s
0 0 3991.95135 0 2765 11816.4300 3991.95135 66.2% - 227s
0 0 3992.37994 0 2757 11816.4300 3992.37994 66.2% - 228s
0 0 3992.37994 0 2728 11816.4300 3992.37994 66.2% - 229s
0 0 4000.07004 0 2155 11816.4300 4000.07004 66.1% - 238s
0 0 4000.27381 0 2598 11816.4300 4000.27381 66.1% - 241s
0 0 4000.29300 0 2638 11816.4300 4000.29300 66.1% - 242s
0 0 4003.18420 0 2758 11816.4300 4003.18420 66.1% - 246s
0 0 4003.37361 0 2785 11816.4300 4003.37361 66.1% - 248s
0 0 4003.41716 0 2741 11816.4300 4003.41716 66.1% - 248s
0 0 4004.34756 0 2692 11816.4300 4004.34756 66.1% - 253s
0 0 4004.93848 0 2716 11816.4300 4004.93848 66.1% - 255s
0 0 4004.94413 0 2709 11816.4300 4004.94413 66.1% - 255s
0 0 4006.41173 0 2104 11816.4300 4006.41173 66.1% - 258s
0 0 4007.24054 0 2228 11816.4300 4007.24054 66.1% - 260s
0 0 4007.44081 0 2215 11816.4300 4007.44081 66.1% - 260s
0 0 4007.45814 0 2185 11816.4300 4007.45814 66.1% - 261s
0 0 4013.01266 0 2306 11816.4300 4013.01266 66.0% - 264s
H 0 0 11815.930000 4013.01266 66.0% - 264s
0 0 4013.40464 0 2349 11815.9300 4013.40464 66.0% - 265s
0 0 4013.92785 0 2353 11815.9300 4013.92785 66.0% - 266s
0 0 4013.93213 0 2326 11815.9300 4013.93213 66.0% - 266s
0 0 4018.26654 0 2171 11815.9300 4018.26654 66.0% - 268s
0 0 4018.58875 0 2210 11815.9300 4018.58875 66.0% - 269s
0 0 4018.61983 0 2268 11815.9300 4018.61983 66.0% - 270s
0 0 4021.59136 0 2234 11815.9300 4021.59136 66.0% - 272s
H 0 0 11815.430000 4021.59136 66.0% - 273s
0 0 4022.04188 0 2196 11815.4300 4022.04188 66.0% - 274s
0 0 4022.11895 0 2281 11815.4300 4022.11895 66.0% - 274s
0 0 4024.04822 0 2241 11815.4300 4024.04822 65.9% - 277s
H 0 0 11801.950000 4024.04822 65.9% - 277s
0 0 4024.18060 0 2269 11801.9500 4024.18060 65.9% - 278s
0 0 4024.20050 0 2251 11801.9500 4024.20050 65.9% - 278s
0 0 4027.28261 0 2288 11801.9500 4027.28261 65.9% - 280s
H 0 0 11777.970000 4027.28261 65.8% - 280s
0 0 4027.38849 0 2583 11777.9700 4027.38849 65.8% - 281s
0 0 4031.41317 0 2263 11777.9700 4031.41317 65.8% - 284s
0 0 4032.46909 0 2308 11777.9700 4032.46909 65.8% - 286s
0 0 4032.83604 0 2264 11777.9700 4032.83604 65.8% - 286s
0 0 4032.89606 0 2242 11777.9700 4032.89606 65.8% - 287s
0 0 4038.92042 0 2172 11777.9700 4038.92042 65.7% - 290s
0 0 4039.83008 0 2225 11777.9700 4039.83008 65.7% - 291s
0 0 4039.99123 0 2279 11777.9700 4039.99123 65.7% - 292s
0 0 4040.10993 0 2284 11777.9700 4040.10993 65.7% - 293s
0 0 4040.11864 0 2268 11777.9700 4040.11864 65.7% - 293s
0 0 4065.48065 0 2231 11777.9700 4065.48065 65.5% - 296s
0 0 4065.84000 0 2306 11777.9700 4065.84000 65.5% - 298s
0 0 4065.85824 0 2306 11777.9700 4065.85824 65.5% - 298s
0 0 4070.13335 0 2283 11777.9700 4070.13335 65.4% - 300s
0 0 4071.25093 0 2357 11777.9700 4071.25093 65.4% - 302s
0 0 4071.46472 0 2300 11777.9700 4071.46472 65.4% - 302s
0 0 4071.49297 0 2329 11777.9700 4071.49297 65.4% - 303s
0 0 4072.01566 0 2270 11777.9700 4072.01566 65.4% - 304s
0 0 4073.06035 0 2252 11777.9700 4073.06035 65.4% - 305s
0 0 4073.10779 0 2274 11777.9700 4073.10779 65.4% - 305s
0 0 4077.98432 0 2240 11777.9700 4077.98432 65.4% - 309s
0 0 4078.47063 0 2189 11777.9700 4078.47063 65.4% - 310s
0 0 4078.49405 0 2186 11777.9700 4078.49405 65.4% - 310s
0 0 4081.33991 0 2356 11777.9700 4081.33991 65.3% - 312s
0 0 4082.75297 0 2576 11777.9700 4082.75297 65.3% - 314s
0 0 4082.89689 0 2347 11777.9700 4082.89689 65.3% - 314s
0 0 4082.90448 0 2334 11777.9700 4082.90448 65.3% - 315s
0 0 4083.82721 0 2318 11777.9700 4083.82721 65.3% - 317s
0 0 4083.90174 0 2419 11777.9700 4083.90174 65.3% - 317s
0 0 4085.48991 0 2067 11777.9700 4085.48991 65.3% - 320s
0 0 4087.07295 0 2137 11777.9700 4087.07295 65.3% - 321s
0 0 4087.11329 0 2296 11777.9700 4087.11329 65.3% - 321s
0 0 4090.25529 0 2158 11777.9700 4090.25529 65.3% - 323s
H 0 0 11757.110000 4090.25529 65.2% - 323s
0 0 4091.62976 0 2216 11757.1100 4091.62976 65.2% - 324s
0 0 4091.67086 0 2232 11757.1100 4091.67086 65.2% - 324s
0 0 4093.59627 0 2358 11757.1100 4093.59627 65.2% - 326s
H 0 0 11752.870000 4093.59627 65.2% - 326s
0 0 4097.68856 0 2278 11752.8700 4097.68856 65.1% - 328s
0 0 4098.03550 0 2315 11752.8700 4098.03550 65.1% - 329s
0 0 4098.07384 0 2343 11752.8700 4098.07384 65.1% - 329s
0 0 4098.27109 0 2303 11752.8700 4098.27109 65.1% - 330s
0 0 4098.28860 0 2332 11752.8700 4098.28860 65.1% - 331s
0 0 4103.75986 0 2371 11752.8700 4103.75986 65.1% - 333s
0 0 4104.10535 0 2394 11752.8700 4104.10535 65.1% - 334s
0 0 4104.28249 0 2338 11752.8700 4104.28249 65.1% - 335s
0 0 4104.31421 0 2363 11752.8700 4104.31421 65.1% - 335s
0 0 4104.88139 0 2385 11752.8700 4104.88139 65.1% - 336s
H 0 0 11752.370000 4104.88139 65.1% - 337s
0 0 4104.88850 0 2326 11752.3700 4104.88850 65.1% - 337s
0 0 4105.07649 0 2271 11752.3700 4105.07649 65.1% - 338s
0 0 4109.59719 0 2089 11752.3700 4109.59719 65.0% - 341s
H 0 0 11751.450000 4109.59719 65.0% - 347s
0 2 4109.59719 0 2089 11751.4500 4109.59719 65.0% - 349s
3 8 4110.39519 2 2213 11751.4500 4110.39519 65.0% 1041 351s
7 14 4129.67543 3 2239 11751.4500 4110.39519 65.0% 1188 355s
15 22 4129.73274 4 2315 11751.4500 4119.55452 64.9% 1514 360s
23 28 4144.22713 5 2235 11751.4500 4119.55452 64.9% 2071 369s
31 36 4156.97963 6 1752 11751.4500 4119.60759 64.9% 2324 375s
H 33 36 11731.970000 4119.60759 64.9% 2307 375s
47 58 4156.97963 7 1753 11731.9700 4121.75337 64.9% 2003 389s
61 72 4157.28885 8 2214 11731.9700 4121.75337 64.9% 1658 392s
H 75 82 11658.350000 4121.75337 64.6% 1475 395s
H 79 82 11635.130000 4121.75337 64.6% 1408 395s
103 112 4178.87069 13 2069 11635.1300 4121.75337 64.6% 1288 402s
118 119 4178.91771 14 2065 11635.1300 4121.75337 64.6% 1195 407s
H 120 119 11525.730000 4121.75337 64.2% 1221 407s
H 121 119 11463.710000 4121.75337 64.0% 1211 407s
130 133 4230.63895 15 1132 11463.7100 4121.75337 64.0% 1262 414s
144 142 4208.63576 16 1220 11463.7100 4121.75337 64.0% 1258 421s
H 157 150 11461.570000 4121.75337 64.0% 1294 432s
H 159 150 11278.640000 4121.75337 63.5% 1299 432s
165 167 4216.71559 17 1212 11278.6400 4121.75337 63.5% 1367 437s
182 189 4225.72752 19 1176 11278.6400 4121.75337 63.5% 1381 445s
H 204 197 11233.340000 4121.75337 63.3% 1374 461s
H 205 197 11221.300000 4121.75337 63.3% 1376 461s
H 206 197 11207.780000 4121.75337 63.2% 1383 461s
212 215 4243.70736 20 1208 11207.7800 4121.75337 63.2% 1437 467s
232 237 4252.48667 22 1182 11207.7800 4121.75337 63.2% 1448 493s
H 255 237 11187.660000 4121.75337 63.2% 1433 493s
258 267 4260.98090 24 1171 11187.6600 4121.75337 63.2% 1436 501s
H 288 275 11167.640000 4121.75337 63.1% 1442 531s
296 301 4306.85184 28 1187 11167.6400 4121.75337 63.1% 1472 538s
326 333 infeasible 29 11167.6400 4121.75337 63.1% 1425 544s
366 378 4329.13243 33 1122 11167.6400 4121.75337 63.1% 1336 550s
421 413 4372.67693 40 1103 11167.6400 4121.75337 63.1% 1228 556s
460 445 4383.68745 44 1078 11167.6400 4121.75337 63.1% 1178 563s
504 465 4404.76867 46 1035 11167.6400 4121.75337 63.1% 1141 572s
524 515 4426.30743 49 1112 11167.6400 4121.75337 63.1% 1125 579s
575 547 4470.73100 52 1080 11167.6400 4121.75337 63.1% 1082 587s
611 566 infeasible 54 11167.6400 4122.26422 63.1% 1072 595s
640 577 4150.30582 6 1675 11167.6400 4122.26422 63.1% 1085 600s
Cutting planes:
Learned: 15
Gomory: 4
Cover: 120
Implied bound: 985
Clique: 248
MIR: 3014
StrongCG: 174
Flow cover: 653
GUB cover: 5
Zero half: 34
Mod-K: 3
Network: 1
RLT: 450
Relax-and-lift: 333
Explored 657 nodes (1050347 simplex iterations) in 600.22 seconds (1541.77 work units)
Thread count was 16 (of 16 available processors)
Solution count 10: 11167.6 11187.7 11207.8 ... 11635.1
Time limit reached
Best objective 1.116764000000e+04, best bound 4.122264217516e+03, gap 63.0874%
Thanks in advance!
Best regards,
Koen Timmermans
-
Hi Koen,
First of all, great job on the steps you have already taken to speed up the solution time for your model!
VRPTW are often complex problems to solve. One direction could be to play with the most important parameters that impact the performance of MIP models. I would start with trying different values of Method, Presolve, Cuts, and Heuristics parameters.
You can also try the NoRelHeuistic by setting the NoRelHeurTime parameter. This heuristic can often find good solutions before the root relaxation is solved.
Regarding
However, the lb of the matrix range and objective range are slightly negative, whereas I expected a lb of 0 everywhere. I haven't been able to determine the cause of this yet.
Not sure if I understand this. The lower bounds on the matrix and objective range are positive in the log (3e-01 and 4e-01, respectively).
I set the IntegralityFocus parameter to 1 because, in some cases, a binary decision variable approached 0.999..., which didn't affect the objective value in the solution but did affect reading the variables afterward.
As explained in the article Why does Gurobi sometimes return non-integral values for integer variables?, in a feasible solution, integer variables can take values that deviate from an exact integer value within a tolerance. If the only issue with solutions with binary variables taking a value of 0.999.. is in reading them after optimization is finished, I would suggest handling it via rounding the values once the optimization run is complete instead of setting the IntegralityFocus parameter to 1. Setting IntegralityFocus to 1 can sometimes have a negative impact on solve times.
Best regards,
Simran
0 -
Dear Simran,
Thank you for the fast and elaborate answer!
VRPTW are often complex problems to solve. One direction could be to play with the most important parameters that impact the performance of MIP models. I would start with trying different values of Method, Presolve, Cuts, and Heuristics parameters.
I forgot to mention that I have already tried the Heuristics parameter, next to the MIPFocus parameter. It didn't really make a difference. Are the Method, Presolve, and Cuts parameters all included in the Parameter Tuning Tool? If that is the case, I might as well just let that run for a couple of hours, to see if it can come up with a set of parameter settings that improves the solution time. Or is it better to try the parameters that you've mentioned one at a time by setting them manually?
You can also try the NoRelHeuistic by setting the NoRelHeurTime parameter. This heuristic can often find good solutions before the root relaxation is solved.
Interesting! I will try that as well!
And regarding
Not sure if I understand this. The lower bounds on the matrix and objective range are positive in the log (3e-01 and 4e-01, respectively).
You're totally right! The minus signs were messing with me... ;) I would have expected a lb of 0 nonetheless, but since it is indeed positive, and near zero, I will just accept it.
And on this
As explained in the article Why does Gurobi sometimes return non-integral values for integer variables?, in a feasible solution, integer variables can take values that deviate from an exact integer value within a tolerance. If the only issue with solutions with binary variables taking a value of 0.999.. is in reading them after optimization is finished, I would suggest handling it via rounding the values once the optimization run is complete instead of setting the IntegralityFocus parameter to 1. Setting IntegralityFocus to 1 can sometimes have a negative impact on solve times.
Yes, I believe that the issue was only in reading them after optimization is finished. Luckily it seems that setting the IntegralityFocus parameter doesn't make much of a difference in terms of solving time in my case. But rouding the values when reading the binary variables would be a better option, if there are indeed no problems in the solving itself. I will give it a try.
Best regards,
Koen Timmermans
0 -
Hi Koen,
The Gurobi parameter tuning tool will consider all parameters while tuning the model, not just a subset. For this reason, it is more likely to find a significant improvement if you let it run for a longer time.
If you have computing resources, you could let the tuner run for an extended amount of time while doing manual parameter testing in parallel.
Best regards,
Simran
0
Please sign in to leave a comment.
Comments
3 comments