Description
Tests the correct export of stage and scale attributes for convert option dumpgdx. Contributor: Renke Kuhlmann
Small Model of Type : GAMS
Category : GAMS Test library
Main file : convert17.gms
$title CONVERT test suite - check stage and scale export in dumpgdx (CONVERT17,SEQ=887)
$onText
Tests the correct export of stage and scale attributes for convert option dumpgdx.
Contributor: Renke Kuhlmann
$offText
Variable obj;
Variable x1;
Binary Variable x2;
Integer Variable x3;
Equation e;
e.. obj =e= x1 + x2 + x3;
x1.stage = 42;
x2.stage = 43;
x3.stage = 44;
Model m / all /;
option solver = convert;
$echo dumpgdx dump.gdx > convert.opt
m.optfile = 1;
solve m using mip minimizing obj;
execute.checkErrorLevel 'gdxdump dump.gdx | grep -q ".x2..SCALE 42"';
execute.checkErrorLevel 'gdxdump dump.gdx | grep -q ".b3..SCALE 43"';
execute.checkErrorLevel 'gdxdump dump.gdx | grep -q ".i4..SCALE 44"';
m.scaleopt = 1;
solve m using mip minimizing obj;
execute.checkErrorLevel 'gdxdump dump.gdx | grep -q ".x2..SCALE 42"';
execute.checkErrorLevel 'gdxdump dump.gdx | grep -q ".b3..SCALE 43"';
execute.checkErrorLevel 'gdxdump dump.gdx | grep -q ".i4..SCALE 44"';