Skip to content

Commit

Permalink
ouch - mistake on modifying assert
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhforrest committed Dec 17, 2024
1 parent 4970557 commit 4cfa8c5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Clp/src/OsiClp/OsiClpSolverInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7530,11 +7530,13 @@ void OsiClpSolverInterface::crunch()
small = static_cast< ClpSimplexOther * >(modelPtr_)->crunch(rhs, whichRow, whichColumn,
nBound, moreBounds, tightenBounds);
#ifndef NDEBUG
int nCopy = 3 * numberRows + 2 * numberColumns;
for (int i = 0; i < nCopy; i++) {
if (i>=small->getNumRows()&&i<numberRows)
continue; // row was removed so doesn't matter
assert(whichRow[i] >= -CoinMax(numberRows, numberColumns) && whichRow[i] < CoinMax(numberRows, numberColumns));
if(small) {
int nCopy = 3 * numberRows + 2 * numberColumns;
for (int i = 0; i < nCopy; i++) {
if (i>=small->getNumRows()&&i<numberRows)
continue; // row was removed so doesn't matter
assert(whichRow[i] >= -CoinMax(numberRows, numberColumns) && whichRow[i] < CoinMax(numberRows, numberColumns));
}
}
#endif
smallModel_ = small;
Expand Down

0 comments on commit 4cfa8c5

Please sign in to comment.