weird solver behavior in rare cases
AnsweredDear,
I am using Gurobi-py to solve an LP problem about networks. I have tested my formulation on various network structures and different sizes of networks.
However, when testing on a specific network architecture (Regular random graph), the LP solver behaves abnormally and keep hanging for days, while I expect it to finish in a few hours.
The verbose output look like this:
Set parameter WLSAccessID
Set parameter WLSSecret
Set parameter LicenseID to value 2411299
Academic license 2411299 - for non-commercial use only - registered to
Set parameter Threads to value 1
Set parameter Method to value 2
Gurobi Optimizer version 10.0.2 build v10.0.2rc0 (linux64)
CPU model: Intel(R) Xeon(R) CPU E5645 @ 2.40GHz, instruction set [SSE2]
Thread count: 12 physical cores, 24 logical processors, using up to 24 threads
Academic license 2411299 - for non-commercial use only - registered to zi___@ugent.be
Optimize a model with 933744 rows, 10248547 columns and 30745638 nonzeros
Model fingerprint: 0xbc2a3413
Coefficient statistics:
Matrix range [1e+00, 2e+01]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+00, 1e+00]
Presolve removed 0 rows and 0 columns (presolve time = 5s) ...
Presolve removed 0 rows and 0 columns (presolve time = 12s) ...
...
Presolve removed 10584 rows and 1078 columns (presolve time = 65s) ...
Presolve removed 10584 rows and 1078 columns
Presolve time: 81.12s
Presolved: 923160 rows, 10247469 columns, 30534350 nonzeros
Ordering time: 1.75s
Barrier statistics:
Dense cols : 1
AA' NZ : 2.531e+07
Factor NZ : 6.949e+08 (roughly 10.0 GB of memory)
Factor Ops : 7.155e+11 (roughly 18 seconds per iteration)
Threads : 12
Objective Residual
Iter Primal Dual Primal Dual Compl Time
0 3.23639524e+04 -4.09898720e+06 9.51e+04 0.00e+00 2.76e+00 137s
1 8.03768372e+04 -3.70949692e+06 1.84e-06 1.24e-07 1.85e-01 160s
2 7.27224488e+04 -1.47985613e+03 2.16e-08 6.68e-17 3.62e-03 184s
3 2.46246553e+03 -2.13034491e+02 5.29e-10 4.96e-18 1.31e-04 217s
4 7.67216564e+02 2.65895752e+02 6.22e-10 6.54e-18 2.45e-05 254s
5 5.24188026e+02 3.72928558e+02 2.08e-10 6.41e-18 7.38e-06 303s
6 4.96584842e+02 4.54680256e+02 5.97e-09 6.52e-18 2.04e-06 349s
7 4.75918787e+02 4.56386239e+02 7.93e-10 6.95e-18 9.53e-07 384s
8 4.72676599e+02 4.72146454e+02 2.67e-12 7.22e-18 2.59e-08 418s
9 4.72495362e+02 4.72495360e+02 1.89e-14 7.23e-18 1.18e-13 453s
Barrier solved model in 9 iterations and 453.23 seconds (195.01 work units)
Optimal objective 4.72495362e+02
Crossover log...
55871 variables added to crossover basis 460s
56069 variables added to crossover basis 465s
56207 variables added to crossover basis 471s
56290 variables added to crossover basis 475s
56372 variables added to crossover basis 480s
56450 variables added to crossover basis 486s
56513 variables added to crossover basis 491s
866647 DPushes remaining with DInf 0.0000000e+00 493s
192257 DPushes remaining with DInf 0.0000000e+00 609s
36207 DPushes remaining with DInf 0.0000000e+00 642s
10809 DPushes remaining with DInf 0.0000000e+00 649s
2611 DPushes remaining with DInf 0.0000000e+00 652s
76 DPushes remaining with DInf 0.0000000e+00 658s
27 DPushes remaining with DInf 0.0000000e+00 688s
0 DPushes remaining with DInf 0.0000000e+00 697s
28166 PPushes remaining with PInf 0.0000000e+00 697s
27774 PPushes remaining with PInf 0.0000000e+00 700s
Warning: 1 variables dropped from basis
Restart crossover...
868473 variables added to crossover basis 706s
866647 DPushes remaining with DInf 0.0000000e+00 742s
192257 DPushes remaining with DInf 0.0000000e+00 882s
36207 DPushes remaining with DInf 0.0000000e+00 919s
10813 DPushes remaining with DInf 0.0000000e+00 927s
2613 DPushes remaining with DInf 0.0000000e+00 931s
0 DPushes remaining with DInf 0.0000000e+00 957s
28166 PPushes remaining with PInf 0.0000000e+00 957s
27379 PPushes remaining with PInf 0.0000000e+00 961s
26359 PPushes remaining with PInf 0.0000000e+00 965s
25099 PPushes remaining with PInf 0.0000000e+00 970s
23860 PPushes remaining with PInf 0.0000000e+00 975s
Warning: 1 variables dropped from basis
22653 PPushes remaining with PInf 3.1530660e+03 981s
21546 PPushes remaining with PInf 2.4795603e+03 986s
20449 PPushes remaining with PInf 2.0880475e+03 990s
19349 PPushes remaining with PInf 1.8215035e+03 995s
17981 PPushes remaining with PInf 1.5106147e+03 1001s
16883 PPushes remaining with PInf 1.3114404e+03 1006s
15792 PPushes remaining with PInf 1.1576514e+03 1011s
14695 PPushes remaining with PInf 1.0423197e+03 1016s
13611 PPushes remaining with PInf 9.5618069e+02 1021s
12529 PPushes remaining with PInf 8.9049878e+02 1026s
11448 PPushes remaining with PInf 8.2397066e+02 1030s
10367 PPushes remaining with PInf 7.5830642e+02 1035s
8744 PPushes remaining with PInf 6.5717831e+02 1041s
7388 PPushes remaining with PInf 5.5776587e+02 1046s
6034 PPushes remaining with PInf 4.3528867e+02 1051s
4953 PPushes remaining with PInf 3.7721312e+02 1056s
3851 PPushes remaining with PInf 3.2555379e+02 1060s
2485 PPushes remaining with PInf 2.3740235e+02 1066s
1389 PPushes remaining with PInf 1.5143484e+02 1071s
293 PPushes remaining with PInf 6.7048558e+01 1076s
0 PPushes remaining with PInf 5.4404453e+01 1078s
Push phase complete: Pinf 5.4404453e+01, Dinf 5.7977744e-03 1079s
Iteration Objective Primal Inf. Dual Inf. Time
894814 4.7249536e+02 0.000000e+00 5.797774e-03 1083s
894921 4.7249536e+02 1.987774e+04 0.000000e+00 1139s
895021 4.7249536e+02 9.664704e+03 0.000000e+00 1252s
895121 4.7249536e+02 1.368610e+04 0.000000e+00 1356s
895221 4.7249536e+02 1.018289e+04 0.000000e+00 1457s
....
928341 4.7249703e+02 1.438019e+04 0.000000e+00 19285s
928431 4.7249704e+02 5.937866e+03 0.000000e+00 19311s
928511 4.7249704e+02 4.230388e+04 0.000000e+00 19336s
928611 4.7249705e+02 3.132018e+04 0.000000e+00 19363s
928671 4.7249705e+02 2.611747e+04 0.000000e+00 19391s
Do you have any idea what is wrong with this?
Best regards,
Z.
-
Hi,
It seems that crossover is taking a long time. Do you need a basic solution? If not you can try disabling Crossover by setting the parameter to 0.
Otherwise, you might want to set:
- Quad = 1;
- Presolve = 2;
- PreSparsify = 2;
- NetworkAlg = 1.
Or a combination of these.
Cheers,
David0 -
Hi David,
Indeed the problem disappeared by disabling the crossover, Thanks!
Cheers,
Z.
0
Please sign in to leave a comment.
Comments
2 comments