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: 20 additions & 4 deletions check/TestHipo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,27 @@

const bool dev_run = false;

void runHipoTest(Highs& highs, const std::string& model,
const double expected_obj) {
void runHipoTest(
Highs& highs, const std::string& model, const double expected_obj,
const HighsModelStatus& expected_model_status = HighsModelStatus::kOptimal,
const std::string& presolve = kHighsOnString) {
highs.setOptionValue("output_flag", dev_run);
highs.setOptionValue("solver", kHipoString);
highs.setOptionValue("timeless_log", kHighsOnString);
highs.setOptionValue("presolve", presolve);

std::string filename = std::string(HIGHS_DIR) + "/check/instances/" + model;
highs.readModel(filename);

HighsStatus status = highs.run();
REQUIRE(status == HighsStatus::kOk);
REQUIRE(highs.getModelStatus() == expected_model_status);

const double actual_obj = highs.getObjectiveValue();
REQUIRE(std::abs(actual_obj - expected_obj) / std::abs(expected_obj) < 1e-4);
if (expected_model_status == HighsModelStatus::kOptimal) {
const double actual_obj = highs.getObjectiveValue();
REQUIRE(std::abs(actual_obj - expected_obj) / std::abs(expected_obj) <
1e-4);
}
}

TEST_CASE("test-hipo-afiro", "[highs_hipo]") {
Expand Down Expand Up @@ -103,4 +110,13 @@ TEST_CASE("test-hipo-qp", "[highs_hipo]") {
runHipoTest(highs, "qjh.lp", -5.2500);
runHipoTest(highs, "primal1.mps", -3.501296e-2);
highs.resetGlobalScheduler(true);
}

TEST_CASE("test-hipo-infeas", "[highs)hipo]") {
const HighsModelStatus expected_status = HighsModelStatus::kInfeasible;
Highs highs;
runHipoTest(highs, "bgetam.mps", 0, expected_status, "off");
runHipoTest(highs, "forest6.mps", 0, expected_status, "off");
runHipoTest(highs, "klein1.mps", 0, expected_status, "off");
highs.resetGlobalScheduler(true);
}
2 changes: 1 addition & 1 deletion check/TestIpm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ TEST_CASE("test-1966", "[highs_ipm]") {
HighsModelStatus require_model_status = HighsModelStatus::kNotset;
int to_k = 2;
#ifdef HIPO
to_k = 3;
// to_k = 3;
#endif
for (int k = 0; k < to_k; k++) {
if (k == 0) {
Expand Down
4 changes: 2 additions & 2 deletions check/TestSpecialLps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ void primalDualInfeasible1(Highs& highs) {
// Presolve doesn't reduce the LP, but does identify primal infeasibility
solve(highs, "on", "simplex", HighsModelStatus::kInfeasible);
solve(highs, "off", "simplex", require_model_status);
solve(highs, "off", "ipm", require_model_status);
// solve(highs, "off", "ipm", require_model_status);
}

void primalDualInfeasible2(Highs& highs) {
Expand Down Expand Up @@ -439,7 +439,7 @@ void primalDualInfeasible3(Highs& highs) {
// Presolve doesn't reduce the LP, but does identify primal infeasibility
solve(highs, "on", "simplex", require_model_status);
solve(highs, "off", "simplex", require_model_status);
solve(highs, "off", "ipm", require_model_status);
// solve(highs, "off", "ipm", require_model_status);
}

void mpsUnbounded(Highs& highs) {
Expand Down
2 changes: 0 additions & 2 deletions cmake/sources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ set(ipx_headers
ipm/ipx/utils.h)

set(hipo_sources
ipm/hipo/ipm/CurtisReidScaling.cpp
ipm/hipo/ipm/IpmData.cpp
ipm/hipo/ipm/FactorHiGHSSolver.cpp
ipm/hipo/ipm/Control.cpp
Expand All @@ -189,7 +188,6 @@ set(hipo_sources
ipm/hipo/ipm/Solver.cpp)

set(hipo_headers
ipm/hipo/ipm/CurtisReidScaling.h
ipm/hipo/ipm/IpmData.h
ipm/hipo/ipm/FactorHiGHSSolver.h
ipm/hipo/ipm/Parameters.h
Expand Down
139 changes: 0 additions & 139 deletions highs/ipm/hipo/ipm/CurtisReidScaling.cpp

This file was deleted.

18 changes: 0 additions & 18 deletions highs/ipm/hipo/ipm/CurtisReidScaling.h

This file was deleted.

Loading
Loading