[Scip] Best way to get the linear relaxation outside SCIPsolve(SCIP *) call?

Tobias Achterberg achterberg at zib.de
Tue May 26 15:05:59 MEST 2009


Hi Nikolaj,

> Is there a possibility to access the optimal linear relaxation value of an
> IP before calling SCIPsolve(SCIP *)? By calling the initial lpi (I'm
> working with CLP) and calling CLP to solve it for example?

Unfortunately, there is no convenient way to do this. The LP relaxation of the CIP problem
only exists during the solving stage, i.e., inside SCIPsolve(). What you could do is to
change all variables into continuous variables, call SCIPsolve(), query the solution, call
SCIPfreeTransform(), and then change them back to integers.

Note that the LP relaxation value obtained in this way will usually be different from the
root LP value of SCIP, because SCIP is exploiting integrality in presolve to tighten the
formulation.


> Same question but after SCIP has found an (integer valued) optimal
> solution and exited the SCIPsolve(SCIP *) method.

I don't understand this second question. Do you want to solve the MIP with SCIPsolve() and
afterwards solve the LP relaxation of the MIP? In this case, you can do the same as above:
SCIPsolve(), query solution, SCIPfreeTransform(), just change all variables into
continuous variables and call SCIPsolve() again.


Tobias


More information about the Scip mailing list