emp12.gms : Test of EMP equilibrium models and fixed vars

Description

Problem with JAMS: a simple EMP model solves OK as originally posed,
but when t.lo is set to t.up JAMS cannot process the model anymore.

Contributor: Steve Dirkse, February 2013


Small Model of Type : GAMS


Category : GAMS Test library


Main file : emp12.gms

$Title Test of EMP equilibrium models and fixed vars (EMP12,SEQ=598)

$ontext

Problem with JAMS: a simple EMP model solves OK as originally posed,
but when t.lo is set to t.up JAMS cannot process the model anymore.

Contributor: Steve Dirkse, February 2013
$offtext

variables z, t;
equation defobj;

defobj.. z =e= t + sqr(t);

model simp / defobj /;

t.lo = 1;
t.up = 2;

solve simp using nlp min z;
abort$[simp.modelstat > 2] 'bad simp:original NLP modelstat', simp.modelstat;
abort$[z.l <> 2] 'bad simp:original NLP z level', z.l;
abort$[t.m <> 3] 'bad simp:original NLP t marginal', t.m;

file einfo / 'empinfo.txt' /;
putclose einfo 'modeltype mcp';

file jamsopt / 'jams.o99' /;
putclose jamsopt 'EMPInfoFile empinfo.txt'
               / 'fileName mcpTmpScalar.gms'
               / 'dict dict.txt'
               /;
simp.optfile = 99;

solve simp using emp min z;
abort$[simp.modelstat > 2] 'bad simp:original EMP modelstat', simp.modelstat;
abort$[z.l <> 2] 'bad simp:original EMP z level', z.l;
abort$[t.m <> 3] 'bad simp:original EMP t marginal', t.m;

* fixing var should not cause failure but it does
t.up = t.lo;

solve simp using emp min z;
abort$[simp.modelstat > 2] 'bad simp:fixed EMP modelstat', simp.modelstat;
abort$[z.l <> 2] 'bad simp:fixed EMP z level', z.l;
abort$[t.m <> 3] 'bad simp:fixed EMP t marginal', t.m;

execute 'rm mcpTmpScalar*.* dict.txt empinfo.txt jams.o99';