Issues with adding valid inequalities
回答済みHi everyone
I have a full integer model with both binary and positive integer variables. I would like to extract the relaxed LP solutions and apply some valid inequality. I already know that MIPNODE via callback function can handle this process, but I want to relax only the positive integer variables and remain binaries then apply the cuts. Is this possible? I mean, can I extract nodes?
Note that I am using gurobipy.
Regards
Sajjad
-
正式なコメント
This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
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,
Mario0 -
I think that I have received the answer. Thank you, Mario!
0
投稿コメントは受け付けていません。
コメント
3件のコメント