General Constraint vs Linear Constraint
AnsweredHi, I came up with two different ways to model a constraint for my problem. One requires Linear Constraints type, the other requires General Constraints type. Is there performance suggestion on which type of constraint Gurobi prefers in terms of solving speed? Thank you very much!
-
Official comment
General Constraints are internally translated into linear and SOS constraints, depending on the General Constraint type. If you use the same linearization yourself, there should be no structural performance difference. But it could be that your linearization is better (because you exploit problem knowledge that Gurobi does not have), or that Gurobi's linearization is better (because it exploits tighter bounds of the variables that have been found during the presolve step).
Best regards,
Tobias
-
Official comment
This post is more than three 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 why not try our AI Gurobot?.
Post is closed for comments.
Comments
2 comments