[Osi] Proper way to fix Integers after a branchAndBound call?

Sylvain R ross_dev at hotmail.com
Mon Nov 28 15:01:13 EST 2011


Hello,
I am trying to solve a MIP problem and get the shadow costs of the constraints after that.
Out of the box that does not work if I just call si.branchAndBound() and then si.getRowPrice(), which makes sense. So this is what I did:
1. call si.branchAndBound();2. check that it is proven optimal.3. loop through all the Integer/Binary variables and set their Upper and Lower bounds to the solution found during branchAndBound().4. call si.resolve();
Note that I am using CPLEX as the solver's backend.
The problem I am facing is that the vector returned by si.getRowPrice() is only zeros. I figured that by removing step #3 from my code, and just calling resolve(), I get non-zeros values out of getRowPrice(), and they look descent. But then my Integer variables becomes not Integer anymore... 

So my question is:
What is the proper way to fix the integer variables in order to perform some kind of a "solveFixed" operation?
I would greatly appreciate your help!

Sylvain 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/osi/attachments/20111128/3b5c5a60/attachment.html>


More information about the Osi mailing list