scip01.gms : SCIP test suite - IIS

Description

Tests the SCIP link option 'iis'  for infeasible models.

Contributor: Stefan Vigerske, January 2026, by modifying COPT01

  workaround for IIS printing to stdout currently


Small Model of Type : MIP


Category : GAMS Test library


Main file : scip01.gms

$title 'SCIP test suite - IIS'
$if not '%GAMS.mip%' == '' $set solver %GAMS.mip%
$if not set solver         $set solver scip
$onText
Tests the SCIP link option 'iis'  for infeasible models.

Contributor: Stefan Vigerske, January 2026, by modifying COPT01
$offText

$echo "gams/iis = 1" > %solver%.opt
* workaround for IIS printing to stdout currently
$echo "iis/silent = TRUE" >> %solver%.opt
$onecho > %solver%.op2
gams/iis = 2
gams/indicatorfile = "indicators.opt"
# disable some problematic code (https://git.zib.de/integer/scip/-/issues/4262)
iis/removeunusedvars = FALSE
iis/silent = TRUE
$offecho
$onecho > indicators.opt
indic e1$b 0
indic e2$b 1
$offecho

$onEcho > iis1.gms
Variables
    x, y, z;

Positive Variables
    x, y;

Equations
    e0, e1;

e0.. z =e= x + y;
e1.. x + y =l= -1;

Model m / all /;
Solve m using MIP minimizing z;
$offEcho

$call.checkErrorLevel gams iis1 solver=%solver% lo=2 optfile=1

$call.checkErrorLevel grep -q "irreducible infeasible subsystem (IIS) found" iis1.lst
$call.checkErrorLevel grep -q "1 IIS constraint" iis1.lst
$call.checkErrorLevel grep -q "Upper: e1 <= -1" iis1.lst
$call.checkErrorLevel grep -q "2 IIS bound" iis1.lst
$call.checkErrorLevel grep -q "Lower: x >= 0" iis1.lst
$call.checkErrorLevel grep -q "Lower: y >= 0" iis1.lst

$onEcho > iis2.gms
Sets
    i / 1,2,3 /;

Variables
    z;

SOS1 Variables
    x(i);

Equations
    e0, e1, e2;

e0.. z =e= sum(i, x(i));
e1.. x('1') =g= x('2') + 0.1;
e2.. x('2') =g= x('3') + 0.1;

Model m / all /;
Solve m using MIP minimizing z;
$offEcho

$call.checkErrorLevel gams iis2 solver=%solver% lo=2 optfile=1
$call.checkErrorLevel grep -q "irreducible infeasible subsystem (IIS) found" iis2.lst
$call.checkErrorLevel grep -q "3 IIS constraint" iis2.lst
$call.checkErrorLevel grep -q "Lower: e1 >= 0.1" iis2.lst
$call.checkErrorLevel grep -q "Lower: e2 >= 0.1" iis2.lst
$call.checkErrorLevel grep -q "SOS: x(1)" iis2.lst
$call.checkErrorLevel grep -q "SOS: x(2)" iis2.lst
$call.checkErrorLevel grep -q "SOS: x(3)" iis2.lst

$onEcho > iis3.gms
Variables
    z;

Positive Variables
    x, y;

Binary Variables
    b;

Equations
    e0, e1, e2, e3;

e0.. z =e= x + y;
e1.. x + y =l= -1;
e2.. x + y =l= -2;
e3.. b =l= 1;

Model m / all /;
Solve m using MIP minimizing z;
$offEcho

$call.checkErrorLevel gams iis3 solver=%solver% lo=2 optfile=2
$call.checkErrorLevel grep -q "irreducible infeasible subsystem (IIS) found" iis3.lst
$call.checkErrorLevel grep -q "2 IIS constraint" iis3.lst
$call.checkErrorLevel grep -q "indic e1\$b 0" iis3.lst
$call.checkErrorLevel grep -q "indic e2\$b 1" iis3.lst
$call.checkErrorLevel grep -q "2 IIS bound" iis3.lst
$call.checkErrorLevel grep -q "Lower: x >= 0" iis3.lst
$call.checkErrorLevel grep -q "Lower: y >= 0" iis3.lst