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

Stefan Vigerske stefan at math.hu-berlin.de
Tue Nov 29 07:53:32 EST 2011


Hi,

> 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.

This is what i also do and it seems to work with Osi{Cpx,Grb,Msk,Xpr}.
Maybe you can debug a bit more, i.e., check if the problem solve by 
Cplex after fixing the discrete variables is the one you expect, and 
check whether the dual values are also 0.0 for cplex, or whether they 
get lost on their way through Osi.

Stefan

> 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 		 	   		
>
>
>
> _______________________________________________
> Osi mailing list
> Osi at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/osi


-- 
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan


More information about the Osi mailing list