Skip to main content

Issues with adding valid inequalities

Answered

Comments

2 comments

  • Mario Ruthmair
    Gurobi Staff Gurobi Staff

    Hi Sajjad,

    I am not sure if I understand your request correctly. If you only relax the general integer variables and keep the binary variables, you indeed obtain a relaxation. However, it cannot be solved directly in a branch-and-bound node (by the simplex algorithm) since it is still a MILP.

    If you need a relaxed solution where all binary variables attain 0 or 1, then you need to solve this relaxation in an extra step, i.e., relax the general integer variables and solve the corresponding MILP with Gurobi. The corresponding binary solution could then be used to generate cuts.

    If you want to run Gurobi on the original model but only want to generate cuts in branch-and-bound nodes where all binary variables attain 0 or 1, you need to check this manually in each MIPNODE callback. However, it could be that such situations rarely happen. To favor fixing the binary variables first, you could set a higher branching priority on the binary variables.

    Best regards,
    Mario

    0
  • Sajjad Hedayati
    Gurobi-versary
    Conversationalist
    First Question

    I think that I have received the answer. Thank you, Mario!

     

    0

Please sign in to leave a comment.