MIP in Python seems frozen
OngoingI am trying to find a solution to a complex mixed-integer programmming problem using Gurobi in Python. It takes a long time to be created (about 12 000 seconds) and then it starts solving the model. When it runs the "model.optimize()" line of code, the last part of the output shows what is this image:
The problem is that it seems to freeze in this part. It doesn't advance past this (but it doesn't say it is out of memory or gives an error message). What can be the problem here?
-
Hi Maria,
Could you please share all log lines above the log snippet you posted?
If possible, could you please share the model? Note that uploading files in the Community Forum is not possible but we discuss an alternative in Posting to the Community Forum.
Best regards,
Jaromił0 -
The lines above are:
Gurobi Optimizer version 11.0.1 build v11.0.1rc0 (win64 - Windows 11.0 (22631.2))
CPU model: AMD Ryzen 7 5700U with Radeon Graphics, instruction set [SSE2|AVX|AVX2]
Thread count: 8 physical cores, 16 logical processors, using up to 16 threads
Optimize a model with 1422530 rows, 1543061 columns and 16597064 nonzeros
Model fingerprint: 0x339bf915 Variable types: 0 continuous, 1543061 integer (1543061 binary)
Coefficient statistics:
Matrix range [1e+00, 6e+00]
Objective range [1e+00, 1e+00]
Bounds range [1e+00, 1e+00]
RHS range [1e+00, 6e+00]
Found heuristic solution: objective -0.0000000
Presolve removed 58932 rows and 8169 columns (presolve time = 6s) ...
Presolve removed 66937 rows and 8169 columns (presolve time = 10s) ...
Presolve removed 68830 rows and 8169 columns (presolve time = 15s) ...
Presolve removed 142390 rows and 8169 columns (presolve time = 20s) ...
Presolve removed 261380 rows and 8169 columns (presolve time = 25s) ...
Presolve removed 261560 rows and 8169 columns (presolve time = 30s) ...
Presolve removed 261560 rows and 8169 columns (presolve time = 35s) ...
Presolve removed 260602 rows and 7211 columns
Presolve time: 39.51s
Presolved: 1161928 rows, 1535850 columns, 11442108 nonzeros
Variable types: 0 continuous, 1535850 integer (1534947 binary)
Deterministic concurrent LP optimizer: primal simplex, dual simplex, and barrier
Showing barrier log only...
Root barrier log...
Elapsed ordering time = 5s
Ordering time: 7.53s
Barrier statistics:
AA' NZ : 4.364e+06
Factor NZ : 1.924e+07 (roughly 400 MB of memory)
Factor Ops : 6.050e+09 (less than 1 second per iteration)
Threads : 6
Objective Residual
Iter Primal Dual Primal Dual Compl Time
0 9.05925552e+06 1.06000350e+05 1.58e+04 3.64e+00 1.08e+02 58s
1 6.91942621e+06 9.46509765e+04 1.21e+04 3.76e+00 8.31e+01 59s
2 3.31884434e+06 7.55344155e+04 5.94e+03 3.05e+00 4.29e+01 59s
3 1.00316561e+06 4.75040837e+04 1.92e+03 8.87e-01 1.49e+01 59s
4 9.03277954e+04 2.73134348e+04 1.80e+02 6.10e-02 1.42e+00 60s
5 2.89727416e+04 2.17163746e+04 5.68e+01 1.85e-02 4.60e-01 60s
6 1.43148016e+04 1.72479441e+04 2.74e+01 5.75e-03 2.27e-01 60s
7 4.70770045e+03 1.25666392e+04 8.34e+00 1.18e-14 7.55e-02 61s
8 2.50257003e+03 1.11603435e+04 4.04e+00 7.99e-15 4.17e-02 61s
9 1.28115100e+03 8.29479624e+03 1.76e+00 7.72e-15 2.07e-02 61s
10 9.77718496e+02 5.37353539e+03 1.14e+00 4.54e-15 1.18e-02 62s
11 7.43886292e+02 2.86031323e+03 6.62e-01 2.41e-15 5.21e-03 62s
12 5.96642539e+02 1.55142182e+03 3.38e-01 8.64e-16 2.02e-03 63s
13 5.54823959e+02 1.16227929e+03 2.20e-01 7.73e-16 1.18e-03 63s
14 5.42464613e+02 1.09611144e+03 1.80e-01 8.57e-16 1.02e-03 63s
15 5.26641313e+02 8.53769873e+02 1.24e-01 6.56e-16 5.90e-04 64s
16 5.19462615e+02 6.49770766e+02 8.86e-02 2.62e-16 2.62e-04 64s
17 5.12364584e+02 5.75475557e+02 6.79e-02 2.01e-16 1.45e-04 64s
18 5.06720131e+02 5.48044490e+02 5.33e-02 2.19e-16 1.01e-04 65s
19 5.00269190e+02 5.09481422e+02 3.99e-02 8.71e-17 4.48e-05 65s
20 4.83861816e+02 4.84884183e+02 4.27e-03 4.86e-17 4.59e-06 65s
21 4.82006963e+02 4.82014950e+02 1.82e-05 6.24e-18 2.39e-08 66s
22 4.81999996e+02 4.82000015e+02 1.82e-13 4.07e-15 2.39e-11 66s
23 4.82000000e+02 4.82000000e+02 2.62e-13 4.10e-15 4.17e-17 67s
Barrier solved model in 23 iterations and 66.59 seconds (107.59 work units)
Optimal objective 4.82000000e+02
Root crossover log...
439 DPushes remaining with DInf 0.0000000e+00 67s
0 DPushes remaining with DInf 0.0000000e+00 67s
279855 PPushes remaining with PInf 0.0000000e+00 67s
179483 PPushes remaining with PInf 0.0000000e+00 70s
111212 PPushes remaining with PInf 0.0000000e+00 75s
91146 PPushes remaining with PInf 1.0375202e-02 80s
78004 PPushes remaining with PInf 0.0000000e+00 85s
65633 PPushes remaining with PInf 0.0000000e+00 90s
56309 PPushes remaining with PInf 0.0000000e+00 95s
47233 PPushes remaining with PInf 0.0000000e+00 100s
41800 PPushes remaining with PInf 0.0000000e+00 105s
37247 PPushes remaining with PInf 0.0000000e+00 110s
32418 PPushes remaining with PInf 8.4552750e-04 115s
27504 PPushes remaining with PInf 0.0000000e+00 120s
23827 PPushes remaining with PInf 0.0000000e+00 125s
18879 PPushes remaining with PInf 0.0000000e+00 130s
15078 PPushes remaining with PInf 0.0000000e+00 135s
10451 PPushes remaining with PInf 0.0000000e+00 141s
6627 PPushes remaining with PInf 0.0000000e+00 146s
3611 PPushes remaining with PInf 0.0000000e+00 151s
927 PPushes remaining with PInf 0.0000000e+00 155s
0 PPushes remaining with PInf 0.0000000e+00 157s
Push phase complete: Pinf 0.0000000e+00, Dinf 1.3268177e-09 157s
Root simplex log...
Iteration Objective Primal Inf. Dual Inf. Time
280284 4.8200000e+02 0.000000e+00 0.000000e+00 157s
Concurrent spin time: 10.74s
Solved with dual simplex
Root simplex log...
Iteration Objective Primal Inf. Dual Inf. Time
86188 4.8200000e+02 0.000000e+00 0.000000e+00 168s
Use crossover to convert LP symmetric solution to basic solution...
Root crossover log...
2 DPushes remaining with DInf 0.0000000e+00 169s
65683 PPushes remaining with PInf 0.0000000e+00 170s
50406 PPushes remaining with PInf 0.0000000e+00 170s
849 PPushes remaining with PInf 0.0000000e+00 175s
0 PPushes remaining with PInf 0.0000000e+00 175s
Push phase complete: Pinf 0.0000000e+00, Dinf 7.6885253e-11 175s
Root simplex log...
Iteration Objective Primal Inf. Dual Inf. Time
151874 4.8200000e+02 0.000000e+00 0.000000e+00 176s
Root relaxation: objective 4.820000e+02, 151874 iterations, 132.53 seconds (71.20 work units)
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 482.00000 0 10694 -0.00000 482.00000 - - 677s
H 0 0 182.0000000 482.00000 165% - 686s
H 0 0 193.0000000 482.00000 150% - 706s0
Please sign in to leave a comment.
Comments
2 comments