File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1071,5 +1071,26 @@ TEST_CASE("get-fixed-lp", "[highs_test_mip_solver]") {
10711071 REQUIRE (h.getInfo ().objective_function_value == mip_optimal_objective);
10721072 REQUIRE (h.getInfo ().simplex_iteration_count == 0 );
10731073
1074+ REQUIRE (h.readModel (model_file) == HighsStatus::kOk );
1075+ // Perturb one of the integer variables for code coverage of
1076+ // warning: makes fixed LP of flugpl infeasible
1077+ std::vector<HighsVarType> integrality = h.getLp ().integrality_ ;
1078+ for (HighsInt iCol = 0 ; iCol < fixed_lp.num_col_ ; iCol++) {
1079+ if (integrality[iCol] != HighsVarType::kContinuous ) {
1080+ solution.col_value [iCol] -= 0.01 ;
1081+ break ;
1082+ }
1083+ }
1084+
1085+ REQUIRE (h.run () == HighsStatus::kOk );
1086+ h.setSolution (solution);
1087+
1088+ REQUIRE (h.getFixedLp (fixed_lp) == HighsStatus::kWarning );
1089+
1090+ REQUIRE (h.passModel (fixed_lp) == HighsStatus::kOk );
1091+ REQUIRE (h.run () == HighsStatus::kOk );
1092+
1093+ REQUIRE (h.getModelStatus () == HighsModelStatus::kInfeasible );
1094+
10741095 h.resetGlobalScheduler (true );
10751096}
You can’t perform that action at this time.
0 commit comments