Fails to Stop After Time Limit Reached in Lazy Callback
AnsweredSystem setup: Julia; Gurobi version is 9.1.0.
I am running Gurobi on a mixed-integer quadratic problem with lazy callback. After the time limit of 7200 seconds is reached, I received a warning that "max constraint violation (4.2222e-05) exceeds tolerance", and then the log says "Continuing optimization..." without stopping. The full log is as below (the solver is still running as I'm writing this post):
Gurobi Optimizer version 9.1.0 build v9.1.0rc0 (mac64)
Thread count: 2 physical cores, 4 logical processors, using up to 4 threads
Optimize a model with 5896 rows, 15660 columns and 27638 nonzeros
Model fingerprint: 0x041052e5
Model has 66 quadratic objective terms
Model has 529 quadratic constraints
Variable types: 15531 continuous, 129 integer (129 binary)
Coefficient statistics:
Matrix range [2e-02, 2e+04]
QMatrix range [5e-01, 5e+01]
QLMatrix range [1e+00, 4e+01]
Objective range [1e-01, 1e+04]
QObjective range [4e+00, 7e+03]
Bounds range [2e-02, 4e+00]
RHS range [1e-01, 1e+01]
QRHS range [5e+01, 5e+01]
Warning: Completing partial solution with 129 unfixed non-continuous variables out of 129
User MIP start did not produce a new incumbent solution
Presolve removed 837 rows and 553 columns
Presolve time: 0.07s
Presolved: 5059 rows, 15107 columns, 21832 nonzeros
Presolved model has 66 quadratic objective terms
Presolved model has 501 quadratic constraint(s)
Variable types: 14981 continuous, 126 integer (126 binary)
Root relaxation: objective 2.021414e+05, 28681 iterations, 2.89 seconds
Another try with MIP start
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 202143.718 0 63 - 202143.718 - - 3s
[...]
8063 2715 220083.783 37 17 220627.639 219947.887 0.31% 645 7193s
8127 2715 220560.845 68 - 220627.639 219950.680 0.31% 644 7230s
Cutting planes:
Implied bound: 3
Projected implied bound: 1
MIR: 8
Flow cover: 13
Relax-and-lift: 12
Lazy constraints: 168
Explored 8266 nodes (5372688 simplex iterations) in 7323.35 seconds
Thread count was 4 (of 4 available processors)
Solution count 1: 220628
Time limit reached
Warning: max constraint violation (4.2222e-05) exceeds tolerance
Best objective 2.206276386825e+05, best bound 2.199506796902e+05, gap 0.3068%
User-callback calls 124296, time in user-callback 6146.14 sec
Gurobi Optimizer version 9.1.0 build v9.1.0rc0 (mac64)
Thread count: 2 physical cores, 4 logical processors, using up to 4 threads
Optimize a model with 5896 rows, 15660 columns and 27638 nonzeros
Model fingerprint: 0x041052e5
Model has 66 quadratic objective terms
Model has 529 quadratic constraints
Variable types: 15531 continuous, 129 integer (129 binary)
Coefficient statistics:
Matrix range [2e-02, 2e+04]
QMatrix range [5e-01, 5e+01]
QLMatrix range [1e+00, 4e+01]
Objective range [1e-01, 1e+04]
QObjective range [4e+00, 7e+03]
Bounds range [2e-02, 4e+00]
RHS range [1e-01, 1e+01]
QRHS range [5e+01, 5e+01]
Presolved: 5059 rows, 15107 columns, 21832 nonzeros
Presolved model has 66 quadratic objective terms
Presolved model has 501 quadratic constraint(s)
Continuing optimization...
8266 2856 220615.826 64 - 220627.639 219950.740 0.31% 641 7359s
[...]
11401 3950 220497.230 58 6 220627.639 219991.602 0.29% 584 9732s
-
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,
It seems like after the optimization has been interrupted due to reaching the time limit, it has been restarted by a subsequent call to \(\texttt{model.optimize()}\). Could you share code snippets showing your callback and optimization calls?
Best regards,
Jaromił0 -
Hi Jaromil,
It was indeed caused by calling optimize() for a second time, by mistake. I had thought it was because of the max constraint tolerance limit. Sorry for this confusion and thank you very much for your time.
Best,
Cheng
0
Post is closed for comments.
Comments
3 comments