Skip to main content

How can I make Gurobi solve a binary optimization problem faster?

Answered

Comments

4 comments

  • David Torres Sanchez
    Gurobi Staff Gurobi Staff

    Hi Camilla,

    It seems that your problem is solved really fast at the presolve phase:

    Presolve: All rows and columns removed

    And only takes 0.28 seconds.
    Did you paste the wrong log?

    Cheers, 
    David

    0
  • Camilla Ancona
    Gurobi-versary
    First Question
    First Comment

    No, I did not. In fact, this is the strange thing. I noticed that the estimated time is 0.28 seconds, but the algorithm does a lot of iterations with a negligible improvement of the solution found. I tried to look into termination and tolerance parameters but are quite numerous.

    0
  • David Torres Sanchez
    Gurobi Staff Gurobi Staff

    I think I understand, the log you provided is repeated many times as you are solving that solving many similar problems using MATLAB?
    If so:

    • Are you solving a multiobjective problem with many objectives (or similar)?
    • Or, are you using a third-party tool or some specific algorithm?

    Otherwise, if this is the single log you can see and the problem is only being solved once, where is the log getting stuck? It should take 0.28 seconds that is not an estimate, it is the measured time.
    If you can see the log in 0.28 seconds and nothing happens after this, something else is not allowing your program to exit.
    You can check this on your side using something like timeit.

    Cheers, 
    David

    0
  • Camilla Ancona
    Gurobi-versary
    First Question
    First Comment

    Yes, I see this log repeated many times, I am trying to debug the code to understand why, I will look it up the timeit command. Many thanks

    0

Please sign in to leave a comment.