Skip to content

Commit f01056f

Browse files
committed
Updated IIS docs and set up lp-get-iis-galenet for study
1 parent 47e30c9 commit f01056f

File tree

6 files changed

+74
-7
lines changed

6 files changed

+74
-7
lines changed

check/TestIis.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ void testMps(std::string& model, const HighsInt iis_strategy,
406406
std::string model_file =
407407
std::string(HIGHS_DIR) + "/check/instances/" + model + ".mps";
408408
Highs highs;
409-
highs.setOptionValue("output_flag", dev_run);
409+
// highs.setOptionValue("output_flag", dev_run);
410410

411411
REQUIRE(highs.readModel(model_file) == HighsStatus::kOk);
412412
// if (iis_strategy == kIisStrategyFromRayRowPriority ||

docs/src/guide/advanced.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,20 @@ variable/constraint bound information, that cannot be satisfied (so is
3737
infeasible). It is irreducible in that if any constraint or variable
3838
bound is removed, then the system can be satisfied (so is feasible).
3939

40-
HiGHS has an IIS facility that is under development. Currently it can only be used for LPs.
40+
HiGHS has an IIS facility that is under development. Currently it can
41+
only be used for LPs. The full IIS calculation is expensive, since it
42+
requires the solution of multiple LPs. Although there is a prototype
43+
implementation, it is not as robust or efficient as it will
44+
be. Otherwise, there is a simple, cheap test that looks for
45+
infeasibility due to incompatible variable oe constraint bounds, or
46+
constraint bounds that cannot be satisfied given the range of values
47+
on the constraint activity implied by bounds on variables.
48+
49+
The choice of IIS strategy is defined by the [iis_strategy](@id option-iis-strategy) option, which can take the value
50+
51+
- `kIisStrategyLight` = 0: The cheap test
52+
- `kIisStrategyFromLpRowPriority` = 1: The full IIS calculation, aiming to have a minimal number of rows in the IIS
53+
- `kIisStrategyFromLpColPriority` = 2: The full IIS calculation, aiming to have a minimal number of columns in the IIS
4154

4255
### IIS-related methods in the `Highs` class
4356

docs/src/options/definitions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@
486486
- Range: [0, inf]
487487
- Default: 1e-07
488488

489-
## iis\_strategy
489+
## [iis\_strategy](@id option-iis-strategy)
490490
- Strategy for IIS calculation: Light test / Full and prioritise rows / Full and prioritise columns (0/1/2)
491491
- Type: integer
492492
- Range: {0, 2}

highs/lp_data/HighsIis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include "model/HighsModel.h"
1515

16-
const bool kIisDevReport = false;
16+
const bool kIisDevReport = true; // false;
1717

1818
enum IisBoundStatus {
1919
kIisBoundStatusDropped = -1,

highs/lp_data/HighsInterface.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,10 +2097,11 @@ HighsStatus Highs::elasticityFilter(
20972097
const bool get_infeasible_row,
20982098
std::vector<HighsInt>& infeasible_row_subset) {
20992099
// this->writeModel("infeasible.mps");
2100+
//
21002101
// Solve the feasibility relaxation problem for the given penalties,
2101-
// continuing to act as the elasticity filter get_infeasible_row is
2102-
// true, resulting in an infeasibility subset for further refinement
2103-
// as an IIS
2102+
// continuing to act as the elasticity filter if get_infeasible_row
2103+
// is true, resulting in an infeasibility subset for further
2104+
// refinement as an IIS
21042105
//
21052106
// Construct the e-LP:
21062107
//

highs/lp_data/Iis.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,59 @@
22

33
Further to documentation in https://ergo-code.github.io/HiGHS/stable/guide/advanced/
44

5+
The IIS search is rooted in `Highs::getIisInterface()`, which first
6+
checks whether the `Highs::model_status_` is
7+
`HighsModelStatus::kOptimal` or `HighsModelStatus::kUnbounded`, in
8+
which case the model is feasible so no IIS exists. Otherwise, the
9+
trivial check (for inconsistent bounds or empty infeasible rows) -
10+
performed by `HighsIis::trivial()` - and infeasible rows based on row
11+
value bounds - performed by `HighsIis::rowValueBounds()` - are
12+
performed. If `Highs::options_.iis_strategy` is `kIisStrategyLight`
13+
then `Highs::getIisInterface()` returns.
514

15+
The "full" IIS calculation operates in two phases: after a set of
16+
mutually infeasible rows has been identified, this is reduced to an
17+
IIS. The set of mutually infeasible rows can be found in two ways.
618

19+
Firstly, if it is known that the model is infeasible, then the simplex
20+
solver may have identified a dual ray. If there is a dual ray then its
21+
nonzeros correspond to a set of mutually infeasible constraints. If
22+
there is no dual ray - as might happen if the model's infeasibility
23+
has been identified in presolve - then the incumbent model is solved
24+
with `Highs::options_.presolve` = "off". Unfortunately the "ray route"
25+
is not robust, so currently switched off.
26+
27+
Secondly - and the only route at the moment - an elasticity filter
28+
calculation is done to identify an infeasible subset of rows. This is
29+
calculation performed in `HighsIis::elasticityFilter`. This method is
30+
more general than is necessary for finding the set of mutually
31+
infeasible rows for an IIS calculation, and can be called directly
32+
using `Highs::feasibilityRelaxation`.
33+
34+
The essence of the `HighsIis::elasticityFilter` is that it allows
35+
lower bounds, upper bounds and RHS values to be violated. There are
36+
penalties for doing so that can be global for each of these three
37+
cases, or local to each column lower bound, upper bound and row
38+
bound. The "elasticity LP" is constructed by adding elastic variables
39+
to transform the constraints from
40+
$$
41+
L <= Ax <= U;\qquad l <= x <= u
42+
$$
43+
to
44+
$$
45+
L <= Ax + e_L - e_U <= U;\qquad l <= x + e_l - e_u <= u,
46+
$$
47+
where the elastic variables are not used if the corresponding bound is
48+
infinite or the local/global penalty is negative. The original bounds
49+
on the variables $x$ are removed, and the objective is the linear
50+
function of the elastic variables given by the local/global
51+
penalties. Note that the model modifications required to achieve this
52+
formulation, are made by calls to methods in the `Highs` class so that
53+
the value of any initial basis is maintained.
54+
55+
For the purposes of IIS calculation, each elastic variable has a
56+
57+
If the original constraints cannot be satisfied, then some
58+
59+
After the elasticity LP has been solved, each elasticity variable whose optimal value is positive is fixed at zero is
760

0 commit comments

Comments
 (0)