Skip to content

Commit 4071776

Browse files
committed
test2 in lp-feasibility-relaxation depends on value of x; updated documentation
1 parent ddb5cf4 commit 4071776

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

check/TestIis.cpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -570,15 +570,20 @@ TEST_CASE("lp-feasibility-relaxation", "[iis]") {
570570
std::vector<double> local_rhs_penalty = {1, -1, 10};
571571
h.feasibilityRelaxation(1, 1, 0, nullptr, nullptr,
572572
local_rhs_penalty.data());
573-
// AMPL says: Should get slacks (-3, 4, 0) corresponding to x = 1;
574-
// y = 0, giving objective = 4 + 3 = 7
573+
// AMPL says: Should get slacks (-3, 4, 0) corresponding to (x, y)
574+
// = (1, 0), giving objective = 4 + 3 = 7
575575
//
576-
// However, x = 0; y = 0, gives slacks (-2, 1, 20) and also
576+
// However, (x, y) = (0, 0) gives slacks (-2, 1, 20) and also
577577
// objective = 5 + 2 = 7
578578
//
579-
double r0_slack = -2; // -3;
580-
double r1_slack = 1; // 4;
581-
double r2_slack = 20; // 0;
579+
// The 64-bit integer build (11/11/25) gives (x, y) = (1, 0), and
580+
// the 32-bit integer build gives (x, y) = (0, 0). Since this may
581+
// vary randomly in future, the test below is dependent on whether
582+
// x = 0 or x = 1
583+
const bool solution0 = solution.col_value[0] == 0;
584+
double r0_slack = solution0 ? -2 : -3;
585+
double r1_slack = solution0 ? 1 : 4;
586+
double r2_slack = solution0 ? 20 : 0;
582587
h.writeSolution("", 1);
583588
REQUIRE(solution.row_value[0] == lp.row_lower_[0] + r0_slack);
584589
REQUIRE(solution.row_value[1] == lp.row_upper_[1] - r1_slack);

docs/src/guide/advanced.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,19 @@ only be used for LPs. The full IIS calculation is expensive, since it
4242
requires the solution of multiple LPs. Although there is a prototype
4343
implementation, it is not as robust or efficient as it will
4444
be. Otherwise, there is a simple, cheap test that looks for
45-
infeasibility due to incompatible variable oe constraint bounds, or
45+
infeasibility due to incompatible variable or constraint bounds, or
4646
constraint bounds that cannot be satisfied given the range of values
4747
on the constraint activity implied by bounds on variables.
4848

49-
The choice of IIS strategy is defined by the [iis_strategy](@id option-iis-strategy) option, which can take the value
49+
The choice of IIS strategy is defined by the [iis_strategy](@ref option-iis-strategy) option. This a bit map
5050

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
51+
- 0 => "light strategy", which is always performed when Highs::getIis is called
52+
- 1 => From dual ray, which is currently unavailable
53+
- 2 => From the whole LP (solving an elasticity LP repeatedly (fixing positive elastic variables at zero) until no more elastic variables are positive, and using the fixed elastic variables to determine a set of infeasible rows, for which there is a corresponding set of columns with nonzeros in those rows that form an infeasibility set (IS)
54+
- 4 => Attempt to reduce the IS to an ISS
55+
- 8 => Prioritize low numbers of columns (rather than low numbers of rows) when reducing the IS
56+
57+
Hence, by just setting the 2-bit, an IS is formed reliably, and at no great expense (for an LP)
5458

5559
### IIS-related methods in the `Highs` class
5660

0 commit comments

Comments
 (0)