Search code examples
mathematical-optimizationcplexgurobiinteger-programmingmixed-integer-programming

Inequality Constraint x Upper Bound Definition on Variable Declaration


Which is more computationally efficient for a Mixed-Integer Problem Formulation:

a. State the upper and lower bounds of the variables when declaring the variable

b. Declare the variables with the solver default bounds and then imposing inequality constraints that restrict its value to the desired lower and upper bounds.

or

c. are they computationally equivalent?


Solution

  • This is completely solver dependent. I would guess that almost all solvers will deal with either formulation efficiently because the first thing they do is to convert simple bound constraints to bounds on variables.

    With this in mind, it seems more reasonable to specify the bounds directly as variable bounds:

    1. It saves the solver the work to convert constraints to bounds on variables
    2. (more important) it makes your model more explicit and easier to read: already the variable definition tells which bounds apply to the variable, one does not have to look up the bounds in some constraint definition.