convert8.gms : CONVERT test suite - test eps is kept

Description

This tests that a GAMS eps is written * as eps in CONVERT's GAMS output instead of 0.


Small Model of Type : GAMS


Category : GAMS Test library


Main file : convert8.gms

$title 'CONVERT test suite - Test that eps is kept' (CONVERT8,SEQ=605)

* This tests that a GAMS eps is written * as eps in CONVERT's GAMS output instead of 0.

variable x, y, z;
equation e1, e2, e3, e4, e5;

e1.. sqrt(eps * x) =e= 0;
e2.. x * (1 + eps * y) =e= z;
e3.. eps * sin(x + y) =e= z;
e4.. cos(x + y + eps) =e= z;
e5.. 2 * x + eps * y + z =e= 0;

model m / all /;

option nlp = convert;
solve m using nlp min x;

execute.checkErrorLevel 'grep -qF "e1..  sqrt(eps * x1) =E= 0;" gams.gms';
execute.checkErrorLevel 'grep -qF "e2..  x1 * (1 + eps * x2) - x3 =E= 0;" gams.gms';
execute.checkErrorLevel 'grep -qF "e3..  eps * sin(x1 + x2) - x3 =E= 0;" gams.gms';
execute.checkErrorLevel 'grep -qF "e4..  cos(eps + x1 + x2) - x3 =E= 0;" gams.gms';
execute.checkErrorLevel 'grep -qF "e5..  2 * x1 + eps * x2 + x3 =E= 0;" gams.gms';