[SCIP] Solution feasibility of the copied SCIP

M. Far. pharham at gmail.com
Fri Nov 2 17:58:21 CET 2018


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20181102/98a45e12/attachment.html>


More information about the Scip mailing list