MIQP is solved faster but unstable! Any suggestions for this?
AnsweredHello, I am solving a MIQP problem on MATLAB with YALMIP. At first, it is solved slowly. Therefore, I take the suggestion from https://support.gurobi.com/hc/enus/community/posts/360075509811HowtosolveMIQPfaster.
Specifically, I set
ops.gurobi.Method = 0;
ops.gurobi.AggFill = 10;
ops.gurobi.SimplexPricing = 2;
As a result, the settings boost the solving time. However, I found a new problem: the performance is unstable. Seems GUROBI reports me an unsatisfied solution in order to achieve short solving time as following.
Gurobi Optimizer version 9.1.0 build v9.1.0rc0 (mac64)
Thread count: 8 physical cores, 16 logical processors, using up to 16 threads
Optimize a model with 92180 rows, 35448 columns and 602966 nonzeros
Model fingerprint: 0x67be8d71
Model has 216 quadratic objective terms
Variable types: 26232 continuous, 9216 integer (9216 binary)
Coefficient statistics:
Matrix range [1e03, 1e+04]
Objective range [2e01, 5e+02]
QObjective range [8e+03, 8e+03]
Bounds range [1e+00, 1e+00]
RHS range [1e+00, 6e+02]
Presolve removed 62885 rows and 12696 columns
Presolve time: 0.84s
Presolved: 29295 rows, 22752 columns, 156268 nonzeros
Presolved model has 156 quadratic objective terms
Variable types: 15448 continuous, 7304 integer (7304 binary)
Extra simplex iterations after uncrush: 145
Warning: Markowitz tolerance tightened to 0.5
Warning: 1 variables dropped from basis
Root relaxation: objective 4.250163e+05, 35230 iterations, 1.96 seconds
Nodes  Current Node  Objective Bounds  Work
Expl Unexpl  Obj Depth IntInf  Incumbent BestBd Gap  It/Node Time
0 0 425016.319 0 272  425016.319   3s
Explored 0 nodes (35230 simplex iterations) in 3.33 seconds
Thread count was 16 (of 16 available processors)
Solution count 0
Model is infeasible or unbounded
Best objective , best bound 4.250163185197e+05, gap 
Time 6.346403 s.
But sometimes GUROBI can avoid this.
Gurobi Optimizer version 9.1.0 build v9.1.0rc0 (mac64)
Thread count: 8 physical cores, 16 logical processors, using up to 16 threads
Optimize a model with 92180 rows, 35448 columns and 602964 nonzeros
Model fingerprint: 0x38fdcf39
Model has 216 quadratic objective terms
Variable types: 26232 continuous, 9216 integer (9216 binary)
Coefficient statistics:
Matrix range [1e03, 1e+04]
Objective range [2e01, 5e+02]
QObjective range [8e+03, 8e+03]
Bounds range [1e+00, 1e+00]
RHS range [1e+00, 6e+02]
Presolve removed 62984 rows and 12634 columns
Presolve time: 1.27s
Presolved: 29196 rows, 22814 columns, 154283 nonzeros
Presolved model has 156 quadratic objective terms
Variable types: 15512 continuous, 7302 integer (7302 binary)
Extra simplex iterations after uncrush: 144
Warning: Markowitz tolerance tightened to 0.5
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 2 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 2 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 2 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 2 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
Root relaxation: objective 4.825983e+05, 37709 iterations, 3.88 seconds
Nodes  Current Node  Objective Bounds  Work
Expl Unexpl  Obj Depth IntInf  Incumbent BestBd Gap  It/Node Time
0 0 482598.261 0 292  482598.261   5s
H 0 0 2253811.6440 482598.261 78.6%  6s
H 0 0 1305030.4395 482598.261 63.0%  6s
H 0 0 1245003.7128 482598.261 61.2%  7s
0 0 483540.119 0 259 1245003.71 483540.119 61.2%  8s
H 0 0 489896.61436 483540.119 1.30%  8s
0 0 483549.282 0 250 489896.614 483549.282 1.30%  8s
0 0 483552.537 0 248 489896.614 483552.537 1.29%  8s
0 0 483627.076 0 300 489896.614 483627.076 1.28%  9s
0 0 483629.592 0 276 489896.614 483629.592 1.28%  9s
0 0 483629.592 0 276 489896.614 483629.592 1.28%  9s
0 0 483667.905 0 248 489896.614 483667.905 1.27%  10s
H 0 0 487639.99441 483667.905 0.81%  10s
Cutting planes:
Gomory: 6
Implied bound: 165
MIR: 93
Flow cover: 116
Relaxandlift: 97
Explored 1 nodes (40663 simplex iterations) in 10.69 seconds
Thread count was 16 (of 16 available processors)
Solution count 5: 487640 489897 1.245e+06 ... 2.25381e+06
Optimal solution found (tolerance 1.00e02)
Best objective 4.876399944116e+05, best bound 4.836679052713e+05, gap 0.8146%
Time 14.390970 秒.
The ratio of first bad case to second good case is about 4/6. Could you please share any suggestions with me to avoid/balance this?
Thanks,
Xianbang

Hi Xianbang,
The Warnings
Warning: Markowitz tolerance tightened to 0.5
Warning: 1 variables dropped from basisare a clear indicator for numerical issues, see Does my model have numerical issues? This may explain the unstable behavior of the algorithm. It is possible that some of your constraints are almost parallel causing the issues. You can try several parameters to overcome the numerical trouble, see Solver parameters to manage numerical issues, or try a different formulation of your model.
Best regards,
Jaromił0 
Hi Jaromił,
Thanks for your suggestion. I adjusted my constraints and some coefficients, and then the problem is solved.
Best regards,
Xianbang
0
Please sign in to leave a comment.
Comments
2 comments