# Constraints vs Bounds for Decision Variables

 1 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? 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. asked 29 Jan '18, 10:58 Naveen Divak... 74●1●8 accept rate: 25%

 3 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. answered 29 Jan '18, 11:42 Sune 958●4●14 accept rate: 20%
 5 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. answered 29 Jan '18, 12:01 Rob Pratt 1.2k●2●6 accept rate: 28%
 3 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. Personally, I always use bounds and trust myself to get the correct multipliers ... but I have a significant (and largely unwarranted) faith in myself. ;-) answered 29 Jan '18, 14:55 Paul Rubin ♦♦ 14.6k●5●13 accept rate: 19%
 toggle preview community wiki

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "Title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Tags:

×231
×27
×8