highs01.gms : HiGHS test suite - IIS

Description

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

Contributor: Stefan Vigerske, January 2025, by modifying COPT01


Small Model of Type : LP


Category : GAMS Test library


Main file : highs01.gms

$title 'HiGHS test suite - IIS'
$if not '%GAMS.lp%' == '' $set solver %GAMS.lp%
$if not set solver        $set solver highs
$onText
Tests the HIGHS link option 'iis' for infeasible models.

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

$echo "iis = 1" > %solver%.opt
$echo "iis = 2" > %solver%.op2

$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 LP minimizing z;
$offEcho

$call.checkErrorLevel gams iis1 solver=%solver% lo=2 optfile=1
$call.checkErrorLevel grep -q "IIS found" iis1.lst
$call.checkErrorLevel grep -q "Number of equations in IIS: 1" iis1.lst
$call.checkErrorLevel grep -q "Upper: e1 <= -1" iis1.lst
$call.checkErrorLevel grep -q "Number of variables in IIS: 2" iis1.lst
$call.checkErrorLevel grep -q "Lower: x >= 0" iis1.lst
$call.checkErrorLevel grep -q "Lower: y >= 0" iis1.lst

$call.checkErrorLevel gams iis1 solver=%solver% lo=2 optfile=2
$call.checkErrorLevel grep -q "IIS found" iis1.lst
$call.checkErrorLevel grep -q "Number of equations in IIS: 1" iis1.lst
$call.checkErrorLevel grep -q "Upper: e1 <= -1" iis1.lst
$call.checkErrorLevel grep -q "Number of variables in IIS: 2" iis1.lst
$call.checkErrorLevel grep -q "Lower: x >= 0" iis1.lst
$call.checkErrorLevel grep -q "Lower: y >= 0" iis1.lst