[SCIP] Issue with Linear Constraint Not Being Added in SCIP Pricing Problem

Mahdi Mohammadi mo.mahdi1379 at gmail.com
Wed Jan 29 16:31:54 CET 2025


Hello,

I've been stuck on an issue and encountered the following error:

[solve.c:4676] ERROR: pricing was aborted, but no branching could be created!

To investigate, I exported the pricing model using the following code:

SCIP_CALL( SCIPsolve(subscip) );
SCIPwriteOrigProblem(subscip, filename, NULL, TRUE);

I adapted the BinPacking example for my problem. However, in my pricing
problem, I replaced the knapsack constraint with a linear constraint.
Specifically, I commented out the knapsack constraint and added mine like
what follows:

/* Create capacity constraint */
SCIPcreateConsBasicLinear(subscip, &cons, "edgesum", nvars, vars,
vals, capacity, capacity);// SCIPcreateConsBasicKnapsack(subscip,
&cons, "edgesum", nvars, vars, vals, capacity);
SCIP_CALL( SCIPaddCons(subscip, cons) );
SCIP_CALL( SCIPreleaseCons(subscip, &cons) );

When I checked the output, the linear constraint did not appear in the
exported problem:

\ SCIP STATISTICS
\   Problem name     : pricing
\   Variables        : 15 (15 binary, 0 integer, 0 implicit integer, 0
continuous)
\   Constraints      : 7
Maximize
 Obj: +1 x4
Subject to
 c0: = +3
\   [linking] <c1>: <x10> =  +0.5<x0> +0.5<x1> +0.5<x2> +0.5<x3>;
...

However, when I used the knapsack constraint instead, the problem was
correctly formulated:

\ SCIP STATISTICS
\   Problem name     : pricing
\   Variables        : 15 (15 binary, 0 integer, 0 implicit integer, 0
continuous)
\   Constraints      : 7
Maximize
 Obj: +1 x4
Subject to
 c0: +1 x0 +1 x1 +1 x2 +1 x3 +1 x4 +1 x5 +1 x6 +1 x7 +1 x8 +1 x9 <= +3
\   [linking] <c1>: <x10> =  +0.5<x0> +0.5<x1> +0.5<x2> +0.5<x3>;
...

Is this a bug in SCIP?

PS:
I also tried using SCIPcreateConsLinear, but the result was the same.
Additionally, I attempted to circumvent the issue by adding another
knapsack constraint with a negated version of the original equation so that
force what I wanted:

-1 x0 -1 x1 -1 x2 -1 x3 -1 x4 -1 x5 -1 x6 -1 x7 -1 x8 -1 x9 <= -3

However, this constraint was also not added to the pricing problem.

Best regards,
Mahdi Mohammadi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20250129/31bf5291/attachment.html>


More information about the Scip mailing list