gurobi set initial solution slow down the solver
OngoingHi, gurobi community,
I am trying to use an initial solution to speed up the solver (MILP model). But in my case, the initial solution sometimes slow down the solving speed. Here are my two result.
I wonder, why could initial solution slow down gurobi solver?
Thanks a lot!
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi,
Did you set a full MIP start or a partial one? Sometimes completing a partial MIP start can take considerable time.
Apart from that, it is difficult to say more without a log file.
Silke
0 -
Hi,
Thanks for your reply.
I set a partial solution, but it solves the partial solution quickly, and here is my log.
The log without setting initial solution
Academic license - for non-commercial use only - expires 2021-03-19
The log with setting initial solution (partial log since it costs too much time to run)
Using license file /home/duanjiangfei/gurobi.lic
Gurobi Optimizer version 9.1.1 build v9.1.1rc0 (linux64)
Thread count: 16 physical cores, 32 logical processors, using up to 32 threads
Optimize a model with 77563 rows, 5257 columns and 314269 nonzeros
Model fingerprint: 0xd279248c
Variable types: 1406 continuous, 3851 integer (3843 binary)
Coefficient statistics:
Matrix range [6e-05, 2e+04]
Objective range [1e+00, 2e+01]
Bounds range [1e+00, 7e+00]
RHS range [1e+00, 3e+04]
Presolve removed 8769 rows and 153 columns
Presolve time: 1.52s
Presolved: 68794 rows, 5104 columns, 280004 nonzeros
Variable types: 750 continuous, 4354 integer (3835 binary)
Root relaxation: objective 0.000000e+00, 4599 iterations, 0.36 seconds
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
000.000000120 - 0.00000 - - 4s
H 0 0 34.0000000 0.00000 100% - 4s
000.00000047834.000000.00000100% - 9s
000.00000048234.000000.00000100% - 10s
H 0 0 28.8901786 0.00000 100% - 19s
000.00000029028.890180.00000100% - 23s
000.00000029428.890180.00000100% - 24s
000.0000009028.890180.00000100% - 36s
H 0 0 28.8901786 0.00000 100% - 36s
000.00000018228.890180.00000100% - 36s
000.00000019328.890180.00000100% - 38s
H 0 0 21.2723214 0.00000 100% - 42s
000.0000009221.272320.00000100% - 43s
000.00000031721.272320.00000100% - 44s
000.00000011921.272320.00000100% - 51s
000.00000011921.272320.00000100% - 53s
020.0000009821.272320.00000100% - 57s
15290.00000431321.272320.00000100% 406 60s
78750.00000828821.272320.00000100% 338 68s
H 84 75 21.2723214 0.00000 100% 348 68s
94820.00000928821.272320.00000100% 338 73s
111880.00000107921.272320.00000100% 361 75s
1801650.000001316421.272320.00000100% 367 80s
H 181 165 21.2723214 0.00000 100% 365 80s
H 211 165 21.2723214 0.00000 100% 351 80s
H 360 260 17.4723214 0.00000 100% 314 93s
4293040.000002116317.472320.00000100% 294 97s
5423860.000002318017.472320.00000100% 314 104s
740488 cutoff 3017.472320.00000100% 295 110s
10085030.000001817517.472320.00000100% 284 123s
10776470.000001918517.472320.00000100% 277 131s
1403830 cutoff 2517.472320.00000100% 288 141s
177110230.000001225517.472320.00000100% 310 153s
2242116013.483331411917.472320.00000100% 308 163s
26871421 cutoff 2117.472320.00000100% 326 177s
346514872.765623231817.472320.00000100% 311 206s
H 3504 1487 17.3629464 0.00000 100% 309 206s
H 3573 1217 13.2723214 0.00000 100% 312 206s
361813737.125001921913.272320.00000100% 312 222s
432113746.400001011913.272320.00000100% 313 230s
432313757.80937919613.272320.00000100% 313 257s
4324137610.625002570513.272320.00000100% 313 282s
432513770.0000016107213.272320.00000100% 313 286s
432613770.000001517913.272320.00000100% 313 295s
433013800.00000277913.272320.00000100% 312 305s
433413839.375002115113.272320.00000100% 312 323s
433613840.000001724013.272320.00000100% 312 327s
434013877.87500164013.272320.00000100% 312 331s
H 4341 1317 13.2723214 0.00000 100% 312 344s
H 4341 1251 13.2723214 0.00000 100% 312 344s
H 4341 1188 13.2723214 0.00000 100% 312 344s
4342118911.400003116113.272320.00000100% 312 347s
434411901.339293015613.272320.00000100% 311 352s
434511940.000001025113.272320.00000100% 358 363s
434711970.000001157013.272320.00000100% 358 385s
435112010.000001257613.272320.00000100% 358 400s
435912050.000001335813.272320.00000100% 358 407s
437212120.000001432613.272320.00000100% 358 425s
H 4375 1151 13.2723214 0.00000 100% 358 425s
438811560.000001519813.272320.00000100% 359 434s
440411610.000001538913.272320.00000100% 359 471s
442011650.000001642513.272320.00000100% 363 493s
443611720.000001626013.272320.00000100% 364 499s
446111814.687501741113.272320.00000100% 365 511s
H 4477 1119 13.2723214 0.00000 100% 368 511s
448811270.000001737813.272320.00000100% 369 518s
451411308.925001858113.272320.00000100% 375 540s
453311434.687501841313.272320.00000100% 375 546s
457211389.987742069813.272320.00000100% 376 558s
H 4595 1077 13.2589286 0.00000 100% 375 558s
460010878.925002055213.258930.00000100% 375 563s
H 4655 1038 13.2589285 0.00000 100% 375 573s
H 4727 966 13.2580915 0.00000 100% 375 573s
H 4740 914 13.2299107 0.00000 100% 375 573s
47469579.215992568013.229910.00000100% 375 581s
48459424.9359527136913.229910.00000100% 376 601s
H 4885 885 13.2254464 0.00000 100% 376 601s
4891936 infeasible 3413.225450.00000100% 376 613s
50529895.312501954913.225450.00000100% 373 623s
52361073 infeasible 2313.225450.00000100% 368 631s
H 5242 1029 13.2254464 0.00000 100% 369 631s
H 5264 983 13.2254464 0.00000 100% 367 631s
H 5266 944 13.2254463 0.00000 100% 367 632s
H 5345 882 13.2254463 0.00000 100% 365 632s
54409639.204462180113.225450.00000100% 360 644s
H 5462 922 13.1160714 0.00000 100% 359 644s
H 5592 846 13.1160714 0.00000 100% 355 644s
H 5638 800 13.0066964 0.00000 100% 354 644s
56468219.204462582313.006700.00000100% 355 653s
577783013.004463878713.006700.00000100% 357 665s
591779513.004466664313.006700.00000100% 359 694s
H 5946 756 12.7879456 0.00000 100% 360 694s
5976776 cutoff 6712.787950.00000100% 361 705s
61178214.037502734512.787950.00000100% 361 719s
6240842 infeasible 3012.787950.00000100% 362 731s
63618673.937502250512.787950.00000100% 368 745s
64548879.200002387512.787950.00000100% 372 758s
66028593.937502359212.787950.00000100% 376 771s
6706859 infeasible 2412.787950.00000100% 378 784s
6874830 infeasible 2312.787950.00000100% 382 801s
69718775.312502649512.787950.00000100% 385 815s
71548604.687502572512.787950.00000100% 388 829s
7299856 infeasible 2712.787950.00000100% 392 845s
74018915.312502328712.787950.00000100% 395 859s
7571882 cutoff 2512.787950.00000100% 399 874s
77728680.131341936812.787950.00000100% 401 900s
78558830.306452031812.787950.00000100% 403 915s
8021873 infeasible 2612.787950.00000100% 407 933s
82088699.987742845412.787950.00000100% 407 951s
83448797.6927033115412.787950.00000100% 409 967s
85738827.6927036130612.787950.00000100% 411 997s
87089337.6927037134512.787950.00000100% 410 1014s
8951965 cutoff 4012.787950.00000100% 412 1039s
91779804.037502418912.787950.00000100% 412 1085s
93271015 infeasible 2512.787950.00000100% 412 1107s
9669105910.625002342112.787950.1451698.9% 411 1129s
100291072 infeasible 2212.787950.1741998.6% 409 1151s
1041610928.075002564412.787950.2909997.7% 408 1174s
1089111358.550001934012.787950.2909997.7% 404 1197s
11328113611.250002855712.787951.2193590.5% 402 1222s
116621166 infeasible 3712.787953.5625072.1% 403 1246s
1195011948.002233063812.787953.5625072.1% 402 1270s
122961224 cutoff 2812.787953.5625072.1% 400 1296s
1267712309.3222930105712.787953.5625072.1% 398 1322s
1303312648.008932988412.787953.8000070.3% 398 1350s
1342212578.0089340120612.787953.8000070.3% 399 1380s
1390812673.9811424121512.787953.9375069.2% 398 1410s
14397131710.500002763512.787953.9375069.2% 399 1442s
1502813334.722982548612.787953.9375069.2% 397 1474s
1563313174.380243075012.787953.9375069.2% 395 1509s
164041307 cutoff 3812.787954.2750066.6% 391 1544s
1711412728.075002546912.787954.7250063.1% 387 1584s
1758313888.075002456512.787955.0000060.9% 385 1626s
1910812858.800003557612.787955.3125058.5% 369 1667s
2038812775.6250031101012.787955.6250056.0% 359 1711s
2049113339.775001970612.787956.4285749.7% 359 1749s
213561425 cutoff 3312.787957.6898639.9% 354 1786s
221381391 cutoff 3412.787957.6934039.8% 350 1842s
234851471 cutoff 2412.787958.0000037.4% 344 1873s
244291434 cutoff 3112.787958.0067037.4% 337 1904s
2560313998.2063249107012.787958.0111637.4% 330 1936s
272611283 cutoff 3212.787958.0111637.4% 317 1964s
28528122010.625002437312.787958.3780434.5% 308 1992s
2974611578.925002147112.787958.8000031.2% 300 2022s
3113312789.3452728117112.787959.0250029.4% 291 2053s
331121253 cutoff 3312.787959.4500026.1% 279 2085s
349621244 infeasible 2512.787959.4500026.1% 270 2114s
36777118910.625003794512.787959.4500026.1% 262 2143s
387551107 infeasible 8312.7879510.6250016.9% 254 2177s
41562908 infeasible 3612.7879510.6250016.9% 242 2208s
4415774812.187992594912.7879510.6250016.9% 232 2234s
4591371512.217865550612.7879511.2500012.0% 226 2261s
4672069411.2500056101112.7879511.2500012.0% 224 2289s
4872538311.250005277612.7879511.2500012.0% 218 2317s
506688412.672933684112.7879511.2500012.0% 213 2333s
515340 infeasible 3712.7879512.200004.60% 211 2338s
Cutting planes:
Cover: 2
Implied bound: 20
Clique: 1
MIR: 1
Flow cover: 2
GUB cover: 1
Inf proof: 3
RLT: 161
Explored 51707 nodes (10953536 simplex iterations) in 2338.39 seconds
Thread count was 32 (of 32 available processors)
Solution count 10: 12.7879 13.0067 13.1161 ... 13.2299
Optimal solution found (tolerance 1.00e-04)
Best objective 1.278794561044e+01, best bound 1.278794561044e+01, gap 0.0000%
Warning: variables 1507 and 1707 have the same name "delta_c[0,0]"
Warning: default variable names used to write solution file
dur:0.799Academic license - for non-commercial use only - expires 2021-03-19
Using license file /home/duanjiangfei/gurobi.lic
>>> Set initial solution!
Gurobi Optimizer version 9.1.1 build v9.1.1rc0 (linux64)
Thread count: 16 physical cores, 32 logical processors, using up to 32 threads
Optimize a model with 77563 rows, 5257 columns and 314269 nonzeros
Model fingerprint: 0xc0f5c681
Variable types: 1406 continuous, 3851 integer (3843 binary)
Coefficient statistics:
Matrix range [6e-05, 2e+04]
Objective range [1e+00, 2e+01]
Bounds range [1e+00, 7e+00]
RHS range [1e+00, 3e+04]
User MIP start produced solution with objective 15.0469 (0.15s)
User MIP start produced solution with objective 14.75 (0.16s)
Loaded user MIP start with objective 14.75
Presolve removed 8769 rows and 153 columns
Presolve time: 1.55s
Presolved: 68794 rows, 5104 columns, 280004 nonzeros
Variable types: 750 continuous, 4354 integer (3835 binary)
Root relaxation: objective 0.000000e+00, 4599 iterations, 0.37 seconds
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
000.00000012014.750000.00000100% - 4s
000.00000045714.750000.00000100% - 8s
000.00000045714.750000.00000100% - 8s
000.00000026214.750000.00000100% - 16s
000.00000016414.750000.00000100% - 23s
000.00000044414.750000.00000100% - 28s
000.0000009514.750000.00000100% - 33s
000.0000009214.750000.00000100% - 34s
000.00000014514.750000.00000100% - 35s
000.00000022814.750000.00000100% - 35s
000.00000023614.750000.00000100% - 38s
000.00000014214.750000.00000100% - 41s
020.00000014214.750000.00000100% - 46s
370.00000228914.750000.00000100% 1905 50s
75820.00000726714.750000.00000100% 415 56s
H 136 134 13.4910714 0.00000 100% 303 69s
1522190.000001020613.491070.00000100% 283 71s
H 269 235 13.2723214 0.00000 100% 233 93s
H 283 235 13.1272321 0.00000 100% 235 93s
2873260.000001618513.127230.00000100% 233 104s
4205587.476672112613.127230.00000100% 215 110s
761796 infeasible 913.127230.00000100% 185 117s
1144988 infeasible 1713.127230.00000100% 177 124s
153512539.375002013613.127230.00000100% 178 132s
212913020.000002125213.127230.00000100% 183 155s
22841745 infeasible 2713.127230.00000100% 186 166s
317225953.750002724613.127230.00000100% 185 177s
450825968.4000020714213.127230.00000100% 168 186s
4510259711.250002312413.127230.00000100% 168 213s
4511259811.800009525113.127230.00000100% 168 225s
4514260010.0000010426413.127230.00000100% 168 230s
4516260111.25000244813.127230.00000100% 168 235s
451926038.400002067313.127230.00000100% 168 242s
452126058.400001948613.127230.00000100% 168 249s
452226050.00000298313.127230.00000100% 167 250s
452326060.000004323913.127230.00000100% 167 260s
4525260713.0729220924213.127230.00000100% 167 265s
452826090.000002927813.127230.00000100% 167 272s
452926104.200005327713.127230.00000100% 167 279s
453026113.8000021921813.127230.00000100% 167 285s
453226150.000001021113.127230.00000100% 209 313s
453426170.000001114313.127230.00000100% 209 322s
453826220.000001214113.127230.00000100% 209 329s
454526290.00000139213.127230.00000100% 209 340s
455826370.00000148813.127230.00000100% 210 357s
457426460.000001514213.127230.00000100% 211 362s
459026510.000001510613.127230.00000100% 212 367s
460626570.000001620413.127230.00000100% 212 370s
464726780.273871724213.127230.00000100% 214 384s
467226790.000001726213.127230.00000100% 214 392s
469726780.000001824713.127230.00000100% 217 438s
472127230.290991936413.127230.00000100% 223 451s
488527014.687502166113.127230.00000100% 227 472s
499227548.800002346213.127230.00000100% 230 486s
519827778.800002648913.127230.00000100% 233 506s
5409290613.024743171413.127230.00000100% 242 524s
5680308913.006704547413.127230.00000100% 246 563s
607330560.000002018513.127230.00000100% 242 587s
628932420.000002340713.127230.00000100% 243 607s
H 6456 3054 13.1082589 0.00000 100% 246 607s
6648351313.008934044113.108260.00000100% 243 633s
H 6664 3380 13.0948661 0.00000 100% 243 633s
H 6727 3241 13.0926339 0.00000 100% 241 633s
H 7301 2989 13.0803571 0.00000 100% 234 663s
H 7308 2879 13.0789621 0.00000 100% 234 663s
79252985 cutoff 19813.078960.00000100% 228 686s
8590294013.006703148413.078960.00000100% 222 711s
900332108.528464746713.078960.00000100% 222 736s
960936264.9875020111013.078960.00000100% 221 769s
10474367010.625001864613.078960.00000100% 218 794s
H11089 2854 13.0652902 0.00000 100% 219 824s
1135429526.032973758313.065290.00000100% 219 855s
11903327213.008932748213.065290.00000100% 226 887s
1250535448.925001975413.065290.00000100% 230 920s
1318638200.000003238813.065290.00000100% 234 954s
137584121 cutoff 3013.065290.00000100% 238 988s
1442241790.000002128713.065290.00000100% 242 1027s
1473744627.513642638213.065290.00000100% 244 1066s
1543847190.000002763813.065290.00000100% 247 1118s
H15447 4527 13.0516183 0.00000 100% 248 1118s
H15607 4346 13.0379465 0.00000 100% 248 1118s
1594448454.687503017513.037950.00000100% 248 1173s
169565298 cutoff 3513.037950.00000100% 251 1218s
H16957 5271 13.0379464 0.00000 100% 251 1218s
1803956029.303992169813.037950.00000100% 254 1266s
1899760768.800002855813.037950.00000100% 254 1311s
2008464949.200003972713.037950.00000100% 257 1360s
212437048 cutoff 3013.037950.00000100% 258 1426s
2266175299.025003355213.037950.00000100% 259 1474s
2390177510.337842768013.037950.00000100% 260 1523s
2451183583.937502557113.037950.00000100% 262 1582s
25985852513.015185375613.037950.00000100% 263 1650s0 -
Hi Jiangfei,
Thanks for pasting the logs. Unfortunately, they are partly illegible because of missing spaces. For example, consider this line:
000.00000047834.000000.00000100% - 9s
I can only guess where the spaces between the numbers have been.
Anyway, I would assume that the difference in running time is due to luck. It looks as though Gurobi needs to traverse the entire branch & bound tree in the first log before finishing with an optimal solution. (The numbers in the first column decrease quickly in the last two lines of the branch & bound log.)
With the MIP start, the solver uses a different path for which it takes longer / more nodes to traverse the full tree.
To test this hypothesis, you could try running both settings with different random seeds to see how this affects the behavior.
Silke
0
Post is closed for comments.
Comments
4 comments