Skip to content

Commit ab329a0

Browse files
committed
Cleaned up and updated FEATURES.md
1 parent df6321b commit ab329a0

File tree

5 files changed

+124
-102
lines changed

5 files changed

+124
-102
lines changed

FEATURES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ Now handling correctly the case where an infeasible MIP has a feasible relaxatio
88

99
Fixed minor bug exposed by [#2441](https://github.com/ERGO-Code/HiGHS/issues/2441) in Highs::setSolution() for a sparse user solution when the moidel is empty, and only clearing the dual data before solving with modified objective in Highs::multiobjectiveSolve() so that user-supplied solution is not cleared.
1010

11+
The irreducible infeasibility system (IIS) facility now detects infeasibility due to bounds on constraint activity values being incompatible with constraint bounds. A kIisStrategyLight mode for the iis_strategy option has been introduced so that only infeasibility due to incompatible variable/constraint bounds and constraint activity values is checked for. The LP corresponding to any known IIS is now formed and held as a data member of the HighsIis class.
12+
1113

check/TestIis.cpp

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "Highs.h"
66
#include "catch.hpp"
77

8-
const bool dev_run = true; // false; //
8+
const bool dev_run = false; // true; //
99
const double inf = kHighsInf;
1010

1111
void testIis(const std::string& model, const HighsIis& iis);
@@ -133,16 +133,16 @@ TEST_CASE("lp-get-iis-light", "[iis]") {
133133
lp.col_lower_ = {10, 10, 10, 10};
134134
lp.col_upper_ = {20, 20, 20, 20};
135135
lp.row_lower_ = {-inf, -10, -34};
136-
lp.row_upper_ = { 30, 15, inf};
136+
lp.row_upper_ = {30, 15, inf};
137137
lp.a_matrix_.format_ = MatrixFormat::kRowwise;
138138
lp.a_matrix_.num_col_ = lp.num_col_;
139139
lp.a_matrix_.num_row_ = lp.num_row_;
140140
lp.a_matrix_.start_ = {0, 3, 7, 10};
141-
lp.a_matrix_.index_ = { 0, 1, 2, 0, 1, 2, 3, 1, 2, 3};
142-
lp.a_matrix_.value_ = {1.5, 2, 1, 4, -2, 1, 2, -2, -1.5, -1};
141+
lp.a_matrix_.index_ = {0, 1, 2, 0, 1, 2, 3, 1, 2, 3};
142+
lp.a_matrix_.value_ = {1.5, 2, 1, 4, -2, 1, 2, -2, -1.5, -1};
143143
//
144144
// 1.5w + 2x + y <= 30
145-
//
145+
//
146146
// -10 <= 4w -2x + y + 2z <= 15
147147
//
148148
// -2x -1.5y -z >= -34
@@ -157,12 +157,12 @@ TEST_CASE("lp-get-iis-light", "[iis]") {
157157
for (int k = 0; k < 2; k++) {
158158
REQUIRE(highs.getIis(iis) == HighsStatus::kOk);
159159
REQUIRE(highs.getModelStatus() == HighsModelStatus::kInfeasible);
160-
const bool write_model = true;
160+
const bool write_model = false;
161161
if (dev_run && write_model) {
162-
highs.writeModel("");
163-
printf("\nNow pass IIS LP to write it out\n");
164-
highs.passModel(iis.lp_);
165-
highs.writeModel("");
162+
highs.writeModel("");
163+
printf("\nNow pass IIS LP to write it out\n");
164+
highs.passModel(iis.lp_);
165+
highs.writeModel("");
166166
}
167167
checkIisLp(lp, iis);
168168

@@ -171,9 +171,9 @@ TEST_CASE("lp-get-iis-light", "[iis]") {
171171
REQUIRE(highs.checkIis() == HighsStatus::kOk);
172172

173173
if (k == 0) {
174-
// Now flip to column-wise for code coverage
175-
lp.a_matrix_.ensureColwise();
176-
highs.passModel(lp);
174+
// Now flip to column-wise for code coverage
175+
lp.a_matrix_.ensureColwise();
176+
highs.passModel(lp);
177177
}
178178
}
179179
if (l == 0) {
@@ -184,7 +184,6 @@ TEST_CASE("lp-get-iis-light", "[iis]") {
184184
highs.passModel(lp);
185185
}
186186
highs.resetGlobalScheduler(true);
187-
188187
}
189188

190189
TEST_CASE("lp-get-iis", "[iis]") {
@@ -211,7 +210,7 @@ TEST_CASE("lp-get-iis", "[iis]") {
211210
// x + y <= -2
212211
//
213212
// x, y \in [0, inf)
214-
//
213+
//
215214
// lp.col_name_ = {"Col0", "Col1"};
216215
// lp.row_name_ = {"Row0", "Row1", "Row2"};
217216
Highs highs;
@@ -561,7 +560,7 @@ void testMps(std::string& model, const HighsInt iis_strategy,
561560
int(num_iis_col), int(num_iis_row));
562561
testIis(model, iis);
563562

564-
const bool write_model = true;
563+
const bool write_model = false;
565564
if (dev_run && write_model) highs.writeModel("");
566565
HighsLp lp = highs.getLp();
567566

@@ -605,6 +604,8 @@ void checkIisLp(HighsLp& lp, const HighsIis& iis) {
605604
REQUIRE(iis_lp.num_col_ == iis_num_col);
606605
REQUIRE(iis_lp.num_row_ == iis_num_row);
607606

607+
lp.a_matrix_.num_col_ = lp.num_col_;
608+
lp.a_matrix_.num_row_ = lp.num_row_;
608609
lp.a_matrix_.ensureColwise();
609610
std::vector<HighsInt> iis_row;
610611
iis_row.assign(lp.num_row_, -1);

highs/lp_data/Highs.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,14 +1942,13 @@ HighsStatus Highs::checkIis() const {
19421942
if (this->iis_.valid_) {
19431943
if (this->iis_.ok(this->model_.lp_, this->options_)) {
19441944
highsLogUser(options_.log_options, HighsLogType::kInfo,
1945-
"IIS is correct\n");
1945+
"IIS is correct\n");
19461946
return HighsStatus::kOk;
19471947
} else {
19481948
return HighsStatus::kError;
19491949
}
19501950
}
1951-
highsLogUser(options_.log_options, HighsLogType::kInfo,
1952-
"IIS is not known\n");
1951+
highsLogUser(options_.log_options, HighsLogType::kInfo, "IIS is not known\n");
19531952
return HighsStatus::kOk;
19541953
}
19551954

0 commit comments

Comments
 (0)