Skip to content

Commit

Permalink
Merge pull request #2168 from fwesselm/fix-2122-nexttry
Browse files Browse the repository at this point in the history
Fix issue 2122
  • Loading branch information
jajhall authored Feb 8, 2025
2 parents 6e1f916 + 3ff15e4 commit eee9e39
Show file tree
Hide file tree
Showing 6 changed files with 2,005 additions and 95 deletions.
19 changes: 15 additions & 4 deletions check/TestMipSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ TEST_CASE("IP-with-fract-bounds-no-presolve", "[highs_test_mip_solver]") {
Highs highs;
// No presolve
highs.setOptionValue("output_flag", dev_run);
highs.setOptionValue("presolve", "off");
highs.setOptionValue("presolve", kHighsOffString);

// IP without constraints and fractional bounds on variables
HighsLp lp;
Expand Down Expand Up @@ -772,7 +772,7 @@ void distillationMIP(Highs& highs) {
special_lps.distillationMip(lp, require_model_status, optimal_objective);
REQUIRE(highs.passModel(lp) == HighsStatus::kOk);
// Presolve doesn't reduce the LP
solve(highs, "on", require_model_status, optimal_objective);
solve(highs, kHighsOnString, require_model_status, optimal_objective);
}

void rowlessMIP(Highs& highs) {
Expand All @@ -793,6 +793,17 @@ void rowlessMIP(Highs& highs) {
optimal_objective = -1.0;
REQUIRE(highs.passModel(lp) == HighsStatus::kOk);
// Presolve reduces the LP to empty
solve(highs, "on", require_model_status, optimal_objective);
solve(highs, "off", require_model_status, optimal_objective);
solve(highs, kHighsOnString, require_model_status, optimal_objective);
solve(highs, kHighsOffString, require_model_status, optimal_objective);
}

TEST_CASE("issue-2122", "[highs_test_mip_solver]") {
std::string filename = std::string(HIGHS_DIR) + "/check/instances/2122.lp";
Highs highs;
highs.setOptionValue("mip_rel_gap", 0);
highs.setOptionValue("mip_abs_gap", 0);
highs.readModel(filename);
const HighsModelStatus require_model_status = HighsModelStatus::kOptimal;
const double optimal_objective = -187612.944194;
solve(highs, kHighsOnString, require_model_status, optimal_objective);
}
Loading

0 comments on commit eee9e39

Please sign in to comment.