@@ -6010,9 +6010,10 @@ HPresolve::Result HPresolve::presolve(HighsPostsolveStack& postsolve_stack) {
60106010
60116011 if (tryFourierMotzkin &&
60126012 analysis_.allow_rule_ [kPresolveRuleFourierMotzkin ]) {
6013- storeCurrentProblemSize ();
6014- HPRESOLVE_CHECKED_CALL (fourierMotzkin (postsolve_stack));
6015- tryFourierMotzkin = problemSizeReduction () > 0.0 ;
6013+ HighsInt numColsEliminated;
6014+ HPRESOLVE_CHECKED_CALL (
6015+ fourierMotzkin (postsolve_stack, numColsEliminated));
6016+ tryFourierMotzkin = numColsEliminated > 0 ;
60166017 }
60176018
60186019 if (analysis_.allow_rule_ [kPresolveRuleAggregator ])
@@ -6935,7 +6936,7 @@ HPresolve::Result HPresolve::aggregator(HighsPostsolveStack& postsolve_stack) {
69356936}
69366937
69376938HPresolve::Result HPresolve::fourierMotzkin (
6938- HighsPostsolveStack& postsolve_stack) {
6939+ HighsPostsolveStack& postsolve_stack, HighsInt& numColsEliminated ) {
69396940 assert (analysis_.allow_rule_ [kPresolveRuleFourierMotzkin ]);
69406941 const bool logging_on = analysis_.logging_on_ ;
69416942 if (logging_on) analysis_.startPresolveRuleLog (kPresolveRuleFourierMotzkin );
@@ -7542,8 +7543,8 @@ HPresolve::Result HPresolve::fourierMotzkin(
75427543 std::vector<HighsInt> saveAffectedCols;
75437544
75447545 // counters for numbers of eliminations
7545- HighsInt numColsEliminated = 0 ;
7546- HighsInt numColsEliminatedTotal = 0 ;
7546+ numColsEliminated = 0 ;
7547+ HighsInt numColsEliminatedBlock = 0 ;
75477548 HighsInt numRowsEliminated = 0 ;
75487549 HighsInt numRowsAdded = 0 ;
75497550
@@ -7569,10 +7570,10 @@ HPresolve::Result HPresolve::fourierMotzkin(
75697570 // reformulateObjective pushes other reductions onto the data stack
75707571 if (!blockSteps.empty ()) {
75717572 postsolve_stack.fourierMotzkinBlockFinalise (blockSteps, rowAncestry);
7572- printLog (numColsEliminated , numRowsEliminated, numRowsAdded);
7573+ printLog (numColsEliminatedBlock , numRowsEliminated, numRowsAdded);
75737574 blockSteps.clear ();
75747575 rowAncestry.clear ();
7575- numColsEliminated = 0 ;
7576+ numColsEliminatedBlock = 0 ;
75767577 numRowsEliminated = 0 ;
75777578 numRowsAdded = 0 ;
75787579 }
@@ -7660,7 +7661,7 @@ HPresolve::Result HPresolve::fourierMotzkin(
76607661
76617662 // Cernikov redundancy check
76627663 if (cernikovRedundant (mergedOriginals, rowOriginals, nr.plusIndex ,
7663- nr.minusIndex , col, numColsEliminatedTotal ))
7664+ nr.minusIndex , col, numColsEliminated ))
76647665 continue ;
76657666
76667667 std::vector<row_entry> entries;
@@ -7716,8 +7717,8 @@ HPresolve::Result HPresolve::fourierMotzkin(
77167717
77177718 // mark column as deleted
77187719 markColDeleted (col);
7720+ ++numColsEliminatedBlock;
77197721 ++numColsEliminated;
7720- ++numColsEliminatedTotal;
77217722
77227723 // remove old rows containing col (skip bound rows)
77237724 for (HighsInt rp : iPlus) {
@@ -7765,12 +7766,12 @@ HPresolve::Result HPresolve::fourierMotzkin(
77657766 if (checkLimits (postsolve_stack) != Result::kOk ) break ;
77667767 }
77677768
7768- if (numColsEliminated > 0 ) {
7769+ if (numColsEliminatedBlock > 0 ) {
77697770 // finalize the FM block
77707771 postsolve_stack.fourierMotzkinBlockFinalise (blockSteps, rowAncestry);
77717772
77727773 // log message
7773- printLog (numColsEliminated , numRowsEliminated, numRowsAdded);
7774+ printLog (numColsEliminatedBlock , numRowsEliminated, numRowsAdded);
77747775 }
77757776
77767777 return finalise ();
0 commit comments