coin-or / Clp.old

This a mirror of the subversion repository on COIN-OR.
https://projects.coin-or.org/Clp
Other
36 stars 20 forks source link

[TRAC] Missing pivotSequence_ initialization causes CBC crash #40

Open qtothec opened 6 years ago

qtothec commented 6 years ago

Moved from TRAC as part of COIN fORgery: https://projects.coin-or.org/Clp/ticket/53

Hello,

first of all this bug report started from this CBC one:

https://projects.coin-or.org/Cbc/ticket/115

I add that I tested with the latest CBC trunk, which uses CLP 1.14, and the problem is still there. After some debugging I think I traced down the problem to a missing pivotSequence initialization in ClpPrimalColumnSteepest::pivotColumn. Looking at other parts of the code it seems to me that setting pivotRow to -2 should mean that the pivot computation should be restarted, but this is not done in ClpPrimalColumnSteepest::pivotColumn. I tried adding a simple:

if (pivotRow < -1) pivotSequence_ = -1;

at the beginning of ClpPrimalColumnSteepest::pivotColumn, just after:

int pivotRow = model_->pivotRow();

and the bug has gone. BTW, I'm no expert in the simplex algorithm and the code is pretty complicated to me so I'm unsure if this is the best place to reset pivotSequence_.

Hope it helps, and thanks for the excellent software.

Bye,

Denis Sbragion

jjhforrest commented 5 years ago

Unable to reproduce (and fix slows code down considerably - but it is impressive to understand code at all)