Skip to content

Commit 90049fc

Browse files
committed
Simplify
1 parent 3f54fd1 commit 90049fc

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

highs/presolve/HPresolve.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6008,18 +6008,19 @@ HPresolve::Result HPresolve::presolve(HighsPostsolveStack& postsolve_stack) {
60086008
applyConflictGraphSubstitutions(postsolve_stack, numDelCol));
60096009
}
60106010

6011+
HighsInt numColsEliminatedFourierMotzkin = 0;
60116012
if (tryFourierMotzkin &&
6012-
analysis_.allow_rule_[kPresolveRuleFourierMotzkin]) {
6013-
HighsInt numColsEliminated;
6013+
analysis_.allow_rule_[kPresolveRuleFourierMotzkin])
60146014
HPRESOLVE_CHECKED_CALL(
6015-
fourierMotzkin(postsolve_stack, numColsEliminated));
6016-
tryFourierMotzkin = numColsEliminated > 0;
6017-
}
6015+
fourierMotzkin(postsolve_stack, numColsEliminatedFourierMotzkin));
60186016

60196017
if (analysis_.allow_rule_[kPresolveRuleAggregator])
60206018
HPRESOLVE_CHECKED_CALL(aggregator(postsolve_stack));
60216019

6022-
if (problemSizeReduction() > 0.05) continue;
6020+
// check if there were reductions
6021+
bool haveReductions = problemSizeReduction() > 0.05;
6022+
tryFourierMotzkin = haveReductions || numColsEliminatedFourierMotzkin > 0;
6023+
if (haveReductions) continue;
60236024

60246025
if (trySparsify && analysis_.allow_rule_[kPresolveRuleSparsify]) {
60256026
HighsInt numNz = numNonzeros();

0 commit comments

Comments
 (0)