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

Jakob Witzig witzig at zib.de
Thu Jun 16 09:15:09 CEST 2016


Hi Jan,

you already mentioned numerical troubles, I can imagine two reasons for 
the infeasibility:

Do you have pure IP or a MIP?

1) If you have a MIP your continuous variables need not fit with the new 
solution value (even if you just 'polished' the value). In that case you 
may should try to fix all your integer values and resolve the resulting 
LP again.

2) If you have a pure IP changing one solution value can lead to 
infeasibility due tu numerical troubles, e.g, 1e+07 * x + y == 1 with x 
= 1e-07 and y = 0, both binary and feasibility tolerance 1e-06. Changing 
x to 0 will violate your constraint. Sure, this corner-case will be 
detected by each MIP solver but it should illustrate the issue. In that 
case, you have to do some clever relaxing of variables and you need to 
resolve the reduced problem. Just an idea for relaxing variables: If you 
change the solution value a variable x you could relax all variables in 
the 1-neighbourhood, i.e., variables sharing constraints with x.

I hope this will help.

Cheers,
Jakob


Am 15.06.2016 um 18:52 schrieb Jan Berling:
> 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
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
>


-- 
Jakob Witzig

Zuse Institute Berlin (ZIB)

Division Mathematical Optimization and Scientific Information
Research Group Mathematical Optimization Methods

Takustrasse 7
14195 Berlin

Tel. : +49 (0)30 84185-416
Fax  : +49 (0)30 84185-269
email: witzig at zib.de


More information about the Scip mailing list