Skip to main content

Linearization binary variables / Block-Like Matrix / Indicator Constraint or L2-Norm / Additional SOS1

Answered

Comments

3 comments

  • Jaromił Najman
    • Gurobi Staff Gurobi Staff

    Which version of Gurobi are you using? I just tried running your code on my local Mac and with Gurobi v11.0.3 the model was solved in a split second.

    Gurobi Optimizer version 11.0.3 build v11.0.3rc0 (mac64[arm] - Darwin 23.6.0 23G93)

    CPU model: Apple M3 Pro
    Thread count: 11 physical cores, 11 logical processors, using up to 11 threads

    Optimize a model with 183 rows, 129 columns and 664 nonzeros
    Model fingerprint: 0x5488f601
    Model has 1 general constraint
    Variable types: 9 continuous, 120 integer (120 binary)
    Coefficient statistics:
      Matrix range     [1e+00, 2e+00]
      Objective range  [1e+00, 1e+00]
      Bounds range     [1e+00, 1e+00]
      RHS range        [1e+00, 1e+00]
    Presolve time: 0.00s
    Presolved: 192 rows, 138 columns, 689 nonzeros
    Presolved model has 1 quadratic constraint(s)
    Presolved model has 8 bilinear constraint(s)

    Solving non-convex MIQCP

    Variable types: 10 continuous, 128 integer (120 binary)

    Root relaxation: objective -8.485281e+00, 72 iterations, 0.00 seconds (0.00 work units)

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

         0     0   -8.48528    0    8          -   -8.48528      -     -    0s
    H    0     0                      -3.6055513   -8.48528   135%     -    0s
         0     0   -5.94205    0    4   -3.60555   -5.94205  64.8%     -    0s
         0     0   -5.94205    0   22   -3.60555   -5.94205  64.8%     -    0s
         0     0   -5.94205    0   16   -3.60555   -5.94205  64.8%     -    0s
         0     0   -5.94205    0   11   -3.60555   -5.94205  64.8%     -    0s
         0     0   -5.94205    0   11   -3.60555   -5.94205  64.8%     -    0s
         0     2   -5.94205    0   11   -3.60555   -5.94205  64.8%     -    0s
    *  171   115              15      -3.6055514   -4.58366  27.1%  15.0    0s

    Cutting planes:
      Implied bound: 1
      Clique: 1
      Inf proof: 2
      Zero half: 3
      RLT: 13
      Relax-and-lift: 6
      BQP: 2

    Explored 2099 nodes (22220 simplex iterations) in 0.10 seconds (0.09 work units)
    Thread count was 11 (of 11 available processors)

    Solution count 2: -3.60555 -3.60555 
    No other solutions better than -3.60555

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

    Could you maybe please share the bigger version of the model which may not solve that quickly? Note that uploading files in the Community Forum is not possible but we discuss an alternative in Posting to the Community Forum.

    0
  • Benedikt Strahm
    • First Comment
    • First Question

    Dear Jaromił,

    Thank you for the reply.

    I am using  the following setup:

    Gurobi Optimizer version 11.0.2 build v11.0.2rc0 (win64 - Windows Server 2019.0 (17763.2))
    CPU model: Intel(R) Xeon(R) Gold 5220R CPU @ 2.20GHz, instruction set [SSE2|AVX|AVX2|AVX512]
    Thread count: 24 physical cores, 48 logical processors, using up to 24 threads

    1) Please find here the MRE with a larger size of variables \(n, j\), which takes much longer to solve. Simply etting \(h_e = 0.001\) will increase the runtime further.

    2) Please find here the full model as .mps file. Please note that within this full model, additional constraints / objectives that for the sake of brevity I did not mention are applied. In my opinion, the MRE is able to represent the complexity and issues of the full formulation. The full model applies the indicator constraint as mentioned in 2), the linearization as mentioned in 3) but not the SOS1-constraints mentioned in 4)

     
    0
  • Jaromił Najman
    • Gurobi Staff Gurobi Staff

    Thank you for sharing the models, Benedikt.

    The models are indeed very complex. You are minimizing the negative of a 2-norm, i.e., you are trying to maximize a convex function, which is known to be hard. Additionally, each variable of the 2-norm is equal to a very dense sum of binaries. This means that actually your original model has tons of dense products of binaries. This makes the problem even harder.

    Is there a way to reduce the density of the constraints by doing some manual presolve? For example, you could use some application oriented knowledge to fix some variables.

    Is there an alternative objective you could use which would not introduce the (actually hidden) product terms? Would a sum of absolute values be also applicable?

    You could also try to provide a MIP Start, see How do I use MIP start?

    You might be interested in our webinar about strong MIP formulations.

    Unfortunately, the models are just really hard so there is not much more help I can provide at this point.

    Best regards, 
    Jaromił

    0

Please sign in to leave a comment.