[SCIP] (Re-)Setting solution variables and testing for feasibility

Jan Berling berlingjan at gmail.com
Wed Jun 15 18:52:57 CEST 2016


Dear mailing list,

when we manually change a variable of a feasible solution which was found
by the scip solver, the solution becomes infeasible, even though it was
feasible before and we know that it has to be feasible afterwards, from
problem-knowledge.

    SCIP_ERR(SCIPsetSolVal(scip, mysol, var, 0), "error setting solution
value");
    SCIP_ERR(SCIPcheckSol(scip, mysol, 1, 1, 1, 1, &isSolFeasible), "Error
checking sol");

Is it possible to change solution variables that way and check for
feasibility?

We tried to copy the solution, transformed the variables, checked that the
variables we change are active, tried SCIPtrySol(),...

Our reasoning behind this approach:

Due to numerical inaccuracies, scip sometimes finds inaccurate solutions
for our binary integer problem. We would like to round non-integer
variables manually after the solution is found. But simple rounding to the
nearest value (e.g. 0.99999999 to 1.0) leads to infeasible solutions in
some cases. From the knowledge about our problem, we know which variables
we can set to guarantee feasible but poor solutions. To improve our
solutions, we would like to try to round variables first, check if the
resulting solution is feasible and if not choose the poor variables as a
last option.

Kind regards,
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20160615/1af0142f/attachment.html>


More information about the Scip mailing list