Closed fontanf closed 6 months ago
If I replace
model_.primal();
by
model_.initialSolve();
then it seems to work as expected. But the warm-start is lost, which makes the resolution of the LP much longer
If I don't add bounds when adding columns:
model_.addColumn(
row_indices.size(),
row_indices_int.data(),
row_coefficients.data(),
COIN_DBL_MIN,
COIN_DBL_MAX,
objective_coefficient);
then it also seems to work as expected
I think I get what happens. The solver considers that the active constraint is the variable bound and not the constraint. So, the updated dual is the one from the variable bound and it's not a bug.
I get a strange behavior with CLP inside a column generation algorithm for the bin packing problem. I illustrate with a problem containing 120 items.
First I create an LP with dummy columns. Each column has an objective value of 2 and satisfies one constraint.
Solving this LP leads to a solution with value 240, as expected.
As expected as well, all dual values are equal to 2.
Then, I compute the following new column:
Which reduced cost is -5, as expected.
I add this column to the same ClpSimplex object and I solve again the problem:
The new objective value is 235, as expected.
The issue is that, here, the dual values are still all equal to 2.
Therefore, the same column is generated again. If I add it again to the LP and solve it again:
And then one dual value changes:
I would expect the dual value of constraints 118 and 119 to change as well.
I'm not sure if I miss something in the theory, if I don't use CLP correctly, or if this might be a bug in CLP.
Here are the methods I use to manipulate CLP
I use CLP 1.17.8 from https://github.com/coin-or/Clp/releases/download/releases%2F1.17.8/Clp-releases.1.17.8-x86_64-ubuntu20-gcc940-static.tar.gz