1

I want to find constraints which are binding at the optimal solution of an MIP problem, solved by Cplex in c++. By binding, I mean constraint where the value of the LHS is equal to the value of the RHS. For example, if the solution of a problem is:

x = 1, y = 0,

then constraint x + y <= 2 is non-binding (LHS = 1 + 0 < 2 = RHS), but x - y <= 1 is binding (LHS = 1 - 0 = 1 = RHS).

This could be done for LPs using getSlack or getDual functions of IloRange: If the slack of a constraint is zero, or the dual value is non-zero, the constraint is binding.

I cant find any function of Cplex that gives this property or value for IloRange, IloConstraint, or similar objects, when the problem is an MIP. I would also prefer not to do this manually in c++ (extracting each variable of a constraint and summing their value per constraint). Is there any way to do this?

0

2 Answers 2

1

Even if you have found a way to do this as you described in your own answer, it is worth reading e.g. this page: http://www-01.ibm.com/support/docview.wss?uid=swg21399941

The idea is that you can solve your MIP problem, then change your problem type to a 'fixed' linear problem and re-solve. Since this approach fixes the current solution but solves the problem as an LP, then all the other dual values and reduced costs become available.

Hope that this helps.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for the answer, I had actually considered this but wanted to avoid the computational burden of solving an LP. But I believe this is another solution.
I think that the LP solution time etc is negligible in most cases as this approach fixes the solution values at the start of the solution process. But your argument and approach are perfectly valid.
0

I found the answer, IloCplex::getValue(IloNumExprArg) actually gives you the value of an expression (similarly constraint LHS) given the current solution. Comparing this value to the RHS constant determines whether or not the constraint is binding.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.