what are the upper and lower bounds of slack variables in CPLEX?
If I add a constraint of the form "c^t x <= b" to a linear program, CPLEX seems to add a slack variable with lower bound 0 and without upper bound.
If I add a constraint of the form "c^t x >= b" to a linear program, does CPLEX add a slack variable with upper bound 0 and without lower bound?
The behavior of CPLEX does not seem to be consistent in this case. On the one hand slack variables of this type can have negative values. On the other hand if the value of the slack variable is 0, the slack variable has the status "at_lower_bound", as can be seen in the following example, where I added three constraints of type ">=".
>>> prob.solution.get_linear_slacks() [0.0, 0.0, -3.2857142857142856] >>> prob.solution.basis.get_basis() ([1, 1], [0, 0, 1]) >>> prob.solution.basis.status.at_lower_bound 0 >>> prob.solution.basis.status.basic 1
If I add a constraint of the form "c^t x == b" to a linear program, CPLEX also adds a slack variable. Are its upper and lower bounds 0?
What about ranged constraints of the form "a <= c^t x <= b" what are the upper and lower bounds of its slack variable?