@@ -1501,24 +1501,26 @@ HPresolve::Result HPresolve::runProbing(HighsPostsolveStack& postsolve_stack) {
15011501 HighsInt numFail = 0 ;
15021502
15031503 // Collect up to 10 lifting opportunities per row
1504- size_t maxNumLiftOpps = std::max (
1504+ const size_t maxNumLiftOpps = std::max (
15051505 size_t {100000 }, size_t {10 } * static_cast <size_t >(model->num_row_ ));
15061506
15071507 // store lifting opportunities
15081508 size_t numLiftOpps = 0 ;
1509- implications.storeLiftingOpportunity = [&](HighsInt row, HighsInt col,
1510- double val) {
1511- // find lifting opportunities for row
1512- auto & htree = liftingOpportunities[row];
1513- // add element
1514- auto insertresult = htree.insert_or_get (col, val);
1515- if (insertresult.second ) {
1516- numLiftOpps++;
1517- } else {
1518- double & currentval = *insertresult.first ;
1519- currentval = val;
1520- }
1521- };
1509+ if (mipsolver->options_mip_ ->mip_lifting_for_probing ) {
1510+ implications.storeLiftingOpportunity = [&](HighsInt row, HighsInt col,
1511+ double val) {
1512+ // find lifting opportunities for row
1513+ auto & htree = liftingOpportunities[row];
1514+ // add element
1515+ auto insertresult = htree.insert_or_get (col, val);
1516+ if (insertresult.second ) {
1517+ numLiftOpps++;
1518+ } else {
1519+ double & currentval = *insertresult.first ;
1520+ currentval = val;
1521+ }
1522+ };
1523+ }
15221524
15231525 for (const auto & binvar : binaries) {
15241526 HighsInt i = std::get<3 >(binvar);
@@ -1669,12 +1671,15 @@ HPresolve::Result HPresolve::runProbing(HighsPostsolveStack& postsolve_stack) {
16691671 // lifting for probing (only performed when probing did not modify the
16701672 // problem so far and at least 2 percent of the variables in the problem are
16711673 // continuous)
1672- if (numDeletedRows == 0 && numDeletedCols == 0 && addednnz == 0 &&
1673- modelHasPercentageContVars (size_t {2 }))
1674+ if (mipsolver->options_mip_ ->mip_lifting_for_probing &&
1675+ numDeletedRows == 0 && numDeletedCols == 0 && addednnz == 0 &&
1676+ modelHasPercentageContVars (size_t {2 })) {
1677+ // apply lifting
16741678 liftingForProbing ();
1675- // clear lifting opportunities
1676- liftingOpportunities.clear ();
1677- implications.storeLiftingOpportunity = nullptr ;
1679+ // clear lifting opportunities
1680+ liftingOpportunities.clear ();
1681+ implications.storeLiftingOpportunity = nullptr ;
1682+ }
16781683
16791684 highsLogDev (options->log_options , HighsLogType::kInfo ,
16801685 " %" HIGHSINT_FORMAT " probing evaluations: %" HIGHSINT_FORMAT
@@ -1815,10 +1820,8 @@ void HPresolve::liftingForProbing() {
18151820
18161821 // perform actual lifting
18171822 size_t nfill = 0 ;
1818- // const size_t maxfillin = std::max(10 * liftingtable.size(),
1819- // static_cast<size_t>(numNonzeros()) /
1820- // 100);
1821- const size_t maxnfill = std::numeric_limits<size_t >::max ();
1823+ const size_t maxnfill = std::max (10 * liftingtable.size (),
1824+ static_cast <size_t >(numNonzeros ()) / 100 );
18221825 for (const auto & lifting : liftingtable) {
18231826 // get clique
18241827 HighsInt row = std::get<0 >(lifting);
0 commit comments