[Scip] scip reports optimal solution along with violated constraints
Martin Bergner
mbergner at mathematik.tu-darmstadt.de
Tue Mar 9 10:06:10 MET 2010
Hello all,
I am again building a scip problem in C++ and try to solve it. The
problem gets created normally with SCIPcreateProp,
SCIPcreate/addCons/Var. I include the default plugins and I only use
linear constraints. When I try so solve the problem via SCIPsolve, the
status (SCIPgetStatus) is SCIP_STATUS_OPTIMAL. However, the following
output appears:
[linear] <c2>: +1<x9>[B] +1<x10>[B] +1<x11>[B] +1<x12>[B] +1<x13>[B]
+1<x14>[B] +1<x15>[B] == 2;
violation: left hand side is violated by 2
best solution is not feasible in original problem
The solution as well as the objective function is not correct.
Now to the best part: I can exported my problems via
SCIPprintOrigProblem(.., "lp", false)
and solving this from the command line gives me valid (say: nonzero)
solutions.
I create the constraints with:
SCIPcreateConsLinear(scip, &cons, name, 0, NULL, NULL, lhs, rhs,
// initial, separated, enforce, checked, propagated, local, modifiable,
true, true, true, true, true, false, false,
// dynamic, removable, sticking
false, false, false));
Do you have any idea or hints where the problem might be?
Regards,
Martin
P.S.: Some additional background information: I do a matrix
decomposition and create some disjoint problems in a relaxator which
should solve these problems in the relax method. So the problems (each a
new scip instance) are created in some init function of the relaxator
and then solved in the relaxator relax method. The sum of the objective
values should provide a lower bound for the given (at the moment only
the root) node.
More information about the Scip
mailing list