Skip to content

Commit

Permalink
fix mistake in DEBUG mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhforrest committed Mar 15, 2024
1 parent 39eae0c commit 7985d2c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/OsiClp/OsiClpSolverInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7939,11 +7939,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 7985d2c

Please sign in to comment.