MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / rowlessMIP2

Function rowlessMIP2

check/TestMipSolver.cpp:933–953  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

931}
932
933void rowlessMIP2(Highs& highs) {
934 HighsLp lp;
935 HighsModelStatus require_model_status;
936 double optimal_objective;
937 lp.num_col_ = 2;
938 lp.num_row_ = 0;
939 lp.col_cost_ = {1, -1};
940 lp.col_lower_ = {0, 0};
941 lp.col_upper_ = {1, 1};
942 lp.a_matrix_.start_ = {0, 0, 0};
943 lp.a_matrix_.format_ = MatrixFormat::kColwise;
944 lp.sense_ = ObjSense::kMinimize;
945 lp.offset_ = 0;
946 lp.integrality_ = {HighsVarType::kInteger, HighsVarType::kInteger};
947 require_model_status = HighsModelStatus::kOptimal;
948 optimal_objective = -1.0;
949 REQUIRE(highs.passModel(lp) == HighsStatus::kOk);
950 // Presolve reduces the LP to empty
951 // solve(highs, kHighsOnString, require_model_status, optimal_objective);
952 solve(highs, kHighsOffString, require_model_status, optimal_objective);
953}
954
955TEST_CASE("issue-2122", "[highs_test_mip_solver]") {
956 std::string filename = std::string(HIGHS_DIR) + "/check/instances/2122.lp";

Callers 1

TestMipSolver.cppFile · 0.85

Calls 2

passModelMethod · 0.80
solveFunction · 0.70

Tested by

no test coverage detected