Skip to content

Commit 5a20ac8

Browse files
committed
Add logging
1 parent eda2d39 commit 5a20ac8

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/presolve/HPresolve.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,6 +1821,8 @@ void HPresolve::liftingForProbing() {
18211821

18221822
// perform actual lifting
18231823
size_t nfill = 0;
1824+
size_t nmod = 0;
1825+
size_t numrowsmodified = 0;
18241826
const size_t maxnfill = std::max(10 * liftingtable.size(),
18251827
static_cast<size_t>(numNonzeros()) / 100);
18261828
for (const auto& lifting : liftingtable) {
@@ -1829,8 +1831,10 @@ void HPresolve::liftingForProbing() {
18291831
const auto& bestclique = std::get<1>(lifting);
18301832

18311833
// check against max. fill-in
1832-
nfill += static_cast<size_t>(std::get<3>(lifting));
1833-
if (nfill > maxnfill) break;
1834+
size_t newfill = static_cast<size_t>(std::get<3>(lifting));
1835+
if (nfill + newfill > maxnfill) break;
1836+
nfill += newfill;
1837+
nmod += bestclique.size() - newfill;
18341838

18351839
// update matrix
18361840
HighsCDouble update = 0.0;
@@ -1845,11 +1849,18 @@ void HPresolve::liftingForProbing() {
18451849
}
18461850

18471851
// update left-hand / right-hand sides
1852+
numrowsmodified++;
18481853
if (model->row_lower_[row] != -kHighsInf)
18491854
model->row_lower_[row] += static_cast<double>(update);
18501855
if (model->row_upper_[row] != kHighsInf)
18511856
model->row_upper_[row] += static_cast<double>(update);
18521857
}
1858+
1859+
highsLogDev(options->log_options, HighsLogType::kInfo,
1860+
"Lifting for probing modified %d rows, modified %d existing "
1861+
"non-zeros and introduced %d new non-zeros\n",
1862+
static_cast<int>(numrowsmodified), static_cast<int>(nmod),
1863+
static_cast<int>(nfill));
18531864
}
18541865

18551866
void HPresolve::addToMatrix(const HighsInt row, const HighsInt col,

0 commit comments

Comments
 (0)