lp13.gms : checks +/- INF on =L=, =G=, and =N= equations
Small Model of Type: LP
$title 'checks +/- INF on =L=, =G=, and =N= equations' (LP13,SEQ=329)
$onecho > t1.gms
variable x;
equations e1,e2,e3,e4;
e1.. x =e= 1;
e2.. x =l= inf;
e3.. x =g= -inf;
e4.. x =n= inf;
model m / all /;
solve m min x us lp;
abort$(m.solvestat<>1 and (m.modelstat<>1 or m.modelstat<>2))
'wrong termination';
abort$(e2.lo <> -inf or e2.up <> inf or e2.l <> 1 or e2.m <> 0)
e2.lo,e2.l,e2.up,e2.m;
abort$(e3.lo <> -inf or e3.up <> inf or e3.l <> 1 or e3.m <> 0)
e3.lo,e3.l,e3.up,e3.m;
abort$(e4.lo <> -inf or e4.up <> inf or e4.l <> 1 or e4.m <> 0)
e4.lo,e4.l,e4.up,e4.m;
$offecho
$call gams t1 lp=%gams.lp% lo=2
$if errorlevel 1 $abort t1 failed with lp=%gams.lp%
$if NOT gamsversion 146 $terminate
$call gams t1 lp=%gams.lp% solvelink=4 lo=2
$if errorlevel 1 $abort t1 failed with solvelink 4 lp=%gams.lp%