convert9.gms : CONVERT test suite - handling of fixed vars for nlp2mcp

Description

Check the convert nlp2mcp mode: it should handle equations where all
vars are fixed.

Contributor: Steve Dirkse


Small Model of Type : GAMS


Category : GAMS Test library


Main file : convert9.gms

$TITLE CONVERT test suite - handling of fixed vars for nlp2mcp (CONVERT9,SEQ=608)

$ontext
Check the convert nlp2mcp mode: it should handle equations where all
vars are fixed.

Contributor: Steve Dirkse
$offtext


positive variables  x1, x2, x3;
variable z;
equations
  e1 'nice equ'
  e2 'only involves fixed vars'
  zdef
  ;

e1   .. x1 +  x2 +  x3 =L= 5;
e2   ..             x3 =E= 2;
zdef .. x1 +2*x2 +2*x3 =E= z;

model m / all /;
x3.fx = 2;

$call rm -f tmpmcp.gms convert.op9
$echo "NLP2MCP tmpmcp.gms" > convert.op9

m.optfile = 9;
option lp = convert;
solve m using lp max z;
* test that tmpmcp.gms was created
execute '=test -e tmpmcp.gms';
abort$errorlevel 'we did not find tmpmcp.gms from convert run';

execute 'gams tmpmcp.gms lo=%GAMS.lo%';
abort$errorlevel 'tmpmcp.gms did not execute cleanly';

* cleanup if everything worked
execute 'rm -f tmpmcp.* convert.op9'