Skip to content

Commit 0c1adeb

Browse files
committed
Rationalised/extended testing for #2409; updated FEATURES.md; formatted
1 parent 950299d commit 0c1adeb

File tree

4 files changed

+17
-34
lines changed

4 files changed

+17
-34
lines changed

FEATURES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22

33
## Code changes
44

5+
Forcing column reduction now checks the bound on the column dual rather than whether the dual row activity is zero fixing [#2409](https://github.com/ERGO-Code/HiGHS/issues/2409)
6+
57

68

check/TestMipSolver.cpp

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,9 +946,22 @@ TEST_CASE("issue-2409", "[highs_test_mip_solver]") {
946946
lp.a_matrix_.value_ = {-1, 1, 1, 1};
947947
lp.integrality_ = {HighsVarType::kContinuous, HighsVarType::kInteger};
948948
require_model_status = HighsModelStatus::kOptimal;
949-
optimal_objective = 0.9;
949+
optimal_objective = 0.1;
950950
Highs highs;
951951
REQUIRE(highs.passModel(lp) == HighsStatus::kOk);
952-
// solve(highs, kHighsOnString, require_model_status, optimal_objective);
952+
if (dev_run) printf("Testing that presolve reduces the problem to empty\n");
953+
REQUIRE(highs.presolve() == HighsStatus::kOk);
954+
REQUIRE(highs.getModelPresolveStatus() ==
955+
HighsPresolveStatus::kReducedToEmpty);
956+
957+
if (dev_run)
958+
printf(
959+
"\nTesting that with presolve the correct optimal objecive is found\n");
960+
solve(highs, kHighsOnString, require_model_status, optimal_objective);
961+
highs.clearSolver();
962+
if (dev_run)
963+
printf(
964+
"\nTesting that without presolve the correct optimal objecive is "
965+
"found\n");
953966
solve(highs, kHighsOffString, require_model_status, optimal_objective);
954967
}

check/TestPresolve.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -724,14 +724,3 @@ TEST_CASE("presolve-issue-2402", "[highs_test_presolve]") {
724724
REQUIRE(highs.presolve() == HighsStatus::kOk);
725725
REQUIRE(highs.getModelPresolveStatus() == HighsPresolveStatus::kInfeasible);
726726
}
727-
728-
TEST_CASE("presolve-issue-2409", "[highs_test_presolve]") {
729-
std::string model_file =
730-
std::string(HIGHS_DIR) + "/check/instances/issue-2409.mps";
731-
Highs highs;
732-
highs.setOptionValue("output_flag", dev_run);
733-
highs.readModel(model_file);
734-
REQUIRE(highs.presolve() == HighsStatus::kOk);
735-
REQUIRE(highs.getModelPresolveStatus() ==
736-
HighsPresolveStatus::kReducedToEmpty);
737-
}

check/instances/issue-2409.mps

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)