Answers to: Constraints vs Bounds for Decision Variableshttp://www.or-exchange.com/questions/15317/constraints-vs-bounds-for-decision-variables<p>What difference does it make to define the bounds of decision variables versus defining the bounds through constraints? Is one method better over the other in any way?</p>
<p>Just to clarify: In this context I am only comparing constraints that are of the nature of just describing what the upper limit or lower limit of a decision variable is.</p>enMon, 29 Jan 2018 14:55:50 -0500Answer by Paul Rubinhttp://www.or-exchange.com/questions/15317/constraints-vs-bounds-for-decision-variables/15320<p>There is one minor argument for using constraints in some cases. If you are going to do some sort of dual analysis "manually" (meaning you are doing it, not the solver), and you specify variable limits as bounds rather than constraints, you need to remember to use the reduced costs of the variables as dual multipliers for the bounds. If you specify the limits as constraints, you still have to use dual values as multipliers, but it at least that is the same thing you are doing with other constraints. It's not hard to use the reduced costs where duals would go, but some people do not realize they should and others perhaps forget, leading to the occasional wrong answer. In the case Rob mentions (presolver switching constraints to bounds), the (minor) advantage to constraints is that you can use the "fetch duals" function of the solver to get the correct values. If you specify the limits as bounds, the "fetch duals" function won't know what you are talking about; you'll need to find and use the "fetch reduced costs" function.</p>
<p>Personally, I always use bounds and trust myself to get the correct multipliers ... but I have a significant (and largely unwarranted) faith in myself. ;-)</p>Paul RubinMon, 29 Jan 2018 14:55:50 -0500http://www.or-exchange.com/questions/15317/constraints-vs-bounds-for-decision-variables/15320Answer by Rob Pratthttp://www.or-exchange.com/questions/15317/constraints-vs-bounds-for-decision-variables/15319<p>Most presolvers will convert any such trivial constraints to bounds. So defining an explicit constraint just adds to the memory requirements and presolve/postsolve time.</p>Rob PrattMon, 29 Jan 2018 12:01:01 -0500http://www.or-exchange.com/questions/15317/constraints-vs-bounds-for-decision-variables/15319Answer by Sunehttp://www.or-exchange.com/questions/15317/constraints-vs-bounds-for-decision-variables/15318<p>When you are treating the bounds as constraints you are basically adding rows to the constraint matrix. This means that you increase the size of the basis matrix (in the simplex algortihm) which will (possibly, most likely) slow the solution process down. If you treat them like bounds, the constraints are treated "algorithmically"" by altering the pivot rules. </p>SuneMon, 29 Jan 2018 11:42:24 -0500http://www.or-exchange.com/questions/15317/constraints-vs-bounds-for-decision-variables/15318