Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions check/TestPresolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1153,3 +1153,27 @@ TEST_CASE("add-to-matrix", "[highs_test_presolve]") {

h.resetGlobalScheduler(true);
}

TEST_CASE("issue-3140", "[highs_test_presolve]") {
Highs highs;
highs.setOptionValue("output_flag", dev_run);
HighsLp lp;
lp.num_col_ = 9;
lp.num_row_ = 5;
lp.col_cost_ = {4, 0, 0, -3, -1, 4, -4, 1, -4};
lp.col_lower_ = {0, 1, 0, 0, 0, 0, 0, 0, 0};
lp.col_upper_ = {10, 9, 0, 8, 9, 6, 5, 7, 7};
lp.row_lower_ = {8, -kHighsInf, -1, 1, -kHighsInf};
lp.row_upper_ = {8, -3, -1, kHighsInf, 3};
lp.a_matrix_.format_ = MatrixFormat::kColwise;
lp.a_matrix_.start_ = {0, 2, 3, 3, 5, 7, 9, 11, 13, 15};
lp.a_matrix_.index_ = {1, 2, 0, 0, 3, 3, 4, 0, 3, 2, 3, 2, 4, 0, 1};
lp.a_matrix_.value_ = {-3, -2, 1, 2, 1, -3, 2, 1, -3, -1, 1, 1, 3, -3, -2};

REQUIRE(highs.passModel(lp) == HighsStatus::kOk);
REQUIRE(highs.presolve() == HighsStatus::kOk);
REQUIRE(highs.getModelPresolveStatus() ==
HighsPresolveStatus::kReducedToEmpty);

highs.resetGlobalScheduler(true);
}
2 changes: 2 additions & 0 deletions highs/presolve/HPresolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,8 @@ void HPresolve::markChangedCol(HighsInt col) {
changedColIndices.push_back(col);
changedColFlag[col] = true;
}
for (const auto& nz : getColumnVector(col))
singleEquationChecked[nz.index()] = false;
}

double HPresolve::getMaxAbsColVal(HighsInt col) const {
Expand Down
Loading