Skip to main content

An empty callback function makes the solver unable to find any feasible solution

Awaiting user input

Comments

3 comments

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Xuan Lin,

    Activating the LazyConstraints parameter disables some presolve reductions which would interfer with lazy constraints. From the docs

    The parameter tells the Gurobi algorithms to avoid certain reductions and transformations that are incompatible with lazy constraints.

    In particular it disables DualReductions. This can already be enough to change the solution process by a lot.

    Best regards, 
    Jaromił

    0
  • Xuan Lin
    Curious
    Gurobi-versary
    Conversationalist

    Hi Jaromił,

    Thank you for the explanation! I have a follow-up question regarding this issue. Are the techniques disabled by activating LazyConstraints inherently incompatible with lazy constraints, or is there a workaround to mitigate the slowdown?

    To better understand the impact of DualReductions, I modified my code as follows:

    // model_master->set(GRB_IntParam_LazyConstraints, 1);
        model_master->set(GRB_IntParam_DualReductions, 0);

    The results showed some slowdown, but it was not as significant as the initial observations: 

    Gurobi Optimizer version 12.0.0 build v12.0.0rc1 (linux64 - "Ubuntu 20.04.6 LTS")

    CPU model: 12th Gen Intel(R) Core(TM) i7-12800H, instruction set [SSE2|AVX|AVX2]
    Thread count: 20 physical cores, 20 logical processors, using up to 20 threads

    Non-default parameters:
    MIPGap  0.1
    DualReductions  0

    Optimize a model with 6003 rows, 1419 columns and 14248 nonzeros
    Model fingerprint: 0x59b4cc67
    Model has 151 quadratic constraints
    Variable types: 1109 continuous, 310 integer (310 binary)
    Coefficient statistics:
      Matrix range     [2e-01, 1e+01]
      QMatrix range    [4e-02, 4e+01]
      QLMatrix range   [7e+00, 7e+00]
      Objective range  [0e+00, 0e+00]
      Bounds range     [5e-03, 1e+10]
      RHS range        [1e-01, 3e+01]
      QRHS range       [7e-01, 4e+01]
    Warning: Model contains large bounds
             Consider reformulating model or setting NumericFocus parameter
             to avoid numerical issues.
    Presolve removed 3375 rows and 488 columns
    Presolve time: 0.02s
    Presolved: 2628 rows, 931 columns, 7490 nonzeros
    Presolved model has 119 quadratic constraint(s)
    Variable types: 717 continuous, 214 integer (214 binary)

    Root relaxation: objective 0.000000e+00, 848 iterations, 0.01 seconds (0.03 work units)

        Nodes    |    Current Node    |     Objective Bounds      |     Work
     Expl Unexpl |  Obj  Depth IntInf | Incumbent    BestBd   Gap | It/Node Time

         0     0    0.00000    0   15          -    0.00000      -     -    0s
         0     0    0.00000    0   19          -    0.00000      -     -    0s
         0     0    0.00000    0   19          -    0.00000      -     -    0s
         0     0    0.00000    0   20          -    0.00000      -     -    0s
         0     0    0.00000    0   17          -    0.00000      -     -    0s
         0     0    0.00000    0   12          -    0.00000      -     -    0s
         0     0    0.00000    0   35          -    0.00000      -     -    0s
         0     0    0.00000    0   32          -    0.00000      -     -    0s
         0     0    0.00000    0   10          -    0.00000      -     -    0s
         0     0    0.00000    0   10          -    0.00000      -     -    0s
         0     0    0.00000    0   10          -    0.00000      -     -    0s
         0     0    0.00000    0   17          -    0.00000      -     -    0s
         0     0    0.00000    0    8          -    0.00000      -     -    0s
         0     0    0.00000    0   13          -    0.00000      -     -    0s
         0     0    0.00000    0   10          -    0.00000      -     -    0s
         0     0    0.00000    0   16          -    0.00000      -     -    0s
    Get better solution 4.53605
    Gap: 1e+02%
    H    0     0                       0.0000000    0.00000  0.00%     -    1s
         0     0    0.00000    0   19    0.00000    0.00000  0.00%     -    1s

    Cutting planes:
      Cover: 3
      Implied bound: 3
      MIR: 35
      Flow cover: 3
      RLT: 8
      Relax-and-lift: 5
      BQP: 4

    Explored 1 nodes (6229 simplex iterations) in 1.35 seconds (0.44 work units)
    Thread count was 20 (of 20 available processors)

    Solution count 1: 0 

    Optimal solution found (tolerance 1.00e-01)
    Best objective 0.000000000000e+00, best bound 0.000000000000e+00, gap 0.0000%

    User-callback calls 579, time in user-callback 1.05 sec

    This leads me to believe that other parameters might also play a major role in the slowdown. Could you suggest a list of parameters that I might experiment with to identify the primary contributors?

    Thank you!

    Xuan Lin

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Xuan Lin,

    Are the techniques disabled by activating LazyConstraints inherently incompatible with lazy constraints, or is there a workaround to mitigate the slowdown?

    The deactivated techniques are inherently incompatible with lazy constraints. Thus, unfortunately there is no workaround.

    This leads me to believe that other parameters might also play a major role in the slowdown. Could you suggest a list of parameters that I might experiment with to identify the primary contributors?

    It may be model dependent. Could you please share the model you presented such that we could take a closer look? 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

Please sign in to leave a comment.