[SCIP] Solution feasibility of the copied SCIP

Gregor Hendel hendel at zib.de
Fri Nov 2 18:56:42 CET 2018


Dear Saleh,

this is indeed a bit strange.

There is probably a numerical problem. For starters, you can use 
presolving, but avoid multiaggregations by
setting the two boolean parameters "presolving/donotaggr" and 
"presolving/donotmultaggr" to TRUE in your scip2. They are often the 
reason for numerical troubles in the original space.

Unfortunately, you have optimized out some of the relevant information 
to help you, such as the type and violation of the constraint that is 
violated.

Two questions:
1. I assume that if you do *not* disable presolving in the original 
SCIP, the bug is not triggered?
2. If the problem is a simple MIP problem, have you tried to write out 
the transformed problems of both SCIPs? You could write them in 
lp-format, which is very readable for small instances, and check what 
has happened to the violated constraint after presolving in the problem 
copy.

To do so, use

SCIP_CALL( SCIPpresolve(scip2) );
SCIP_CALL( SCIPwriteTransProblem 
<https://scip.zib.de/doc-6.0.0/html/group__GlobalProblemMethods.php#gada41a57fc5a464ad565763d24e588d3a>(scip2, 
"presolvedprob.lp", "lp", false) )

Maybe one of my guesses gets you started already,
Gregor


Am 02.11.18 um 17:58 schrieb M. Far.:
> Hi
> I am working on a simple MILP problem in SCIP's c++ interface using 
> CPLEX as the LP solver.
> I have to disable presolving in my original problem 'scip'. So I have:
> SCIP_CALL( SCIPsetPresolving(scip, SCIP_PARAMSETTING_OFF, true) );
> after creating scip. Then, I need to solve a copy of the problem by 
> creating a second problem 'scip2':
> SCIP* scip2;
> SCIP_CALL( SCIPcreate(&scip2) );
> SCIP_CALL( SCIPcopyOrig(scip, scip2, nullptr, nullptr, "copyProb", 
> false, false, nullptr) );
> SCIP_CALL( SCIPsetIntParam(scip2, "display/verblevel", 2) );
>
> And I can turn on presolving procedure in this problem. So I have:
> `SCIP_CALL( SCIPsetPresolving(scip2, SCIP_PARAMSETTING_DEFAULT, true) );`
>
> Next, I want to add the solution of scip2 as an initial feasible 
> solution to the original problem. Hence:
> ```
> SCIP_CALL( SCIPsolve(scip2) );
> auto sol2 = SCIPgetBestSol(scip2);
> SCIP_Bool stored;
> SCIP_CALL( SCIPaddSolFree(scip, &sol2, &stored) );
> ```
> However, when I solve the original scip by calling `SCIPsolve(scip)`, 
> I get the following message in the output:
> ```
> violation: right hand side is violated by <a_number>
> all 1 solutions given by solution candidate storage are infeasible
> ```
> Next, it ignores the solution, solves the problem, and finds an 
> "optimal solution" which is inferior to sol2 (hence, not optimal indeed).
>
> I understand that something may be wrong with the transformation. But 
> I do not know how to fix this.
> (OS: Linux 4.15, SCIP ver.: 6.0.0, CPLEX ver.: 12.8.0, gcc ver.: 7.3.0)
>
> Bests,
>
> Saleh
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20181102/49313949/attachment.html>


More information about the Scip mailing list