0

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?

Erwin Kalvelagen
  • 15,677
  • 2
  • 14
  • 39
Bruno
  • 87
  • 5
  • 3
    This depends on the solver. Many solvers contain a presolver that will convert explicit singleton constraints into bounds before starting iterating. In general, bounds are more efficient than constraints (the basis matrix to be inverted/solved is smaller). – Erwin Kalvelagen Feb 06 '20 at 17:58

1 Answers1

3

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.
Daniel Junglas
  • 5,830
  • 1
  • 5
  • 22