0

If I have multiple positive decision variables that I want to constrain based on some factor to be == 0, is it better to add one constraint or multiple?

Here is a greatly simplified example:

var1 == 0

var5 == 0

var7 == 0

or

var1 + var5 + var7 == 0

I inherited a model using the summation method and I was wondering why it was done that way. I know I could run some experiments but I was just wondering if anyone knows the answer.

webe3
  • 103
  • 1
  • 8
  • A good solver should optimize away details like those, I wouldn't worry about it. – Philippe Olivier Nov 16 '18 at 00:12
  • Agree with Philippe, except if the variables would otherwise be allowed to take negative values. If they are defined (e.g. by their type) as non-negative then the two formulations are equivalent. If one or more of the variables could have been negative, the summation version doesn't imply the same as the three separate equality constraints, e.g. var1 = 1, var5 = 2, var7 = -3 is feasible w.r.t the sum constraint – TimChippingtonDerrick Nov 18 '18 at 13:19

0 Answers0