emp09.gms : Test initial levels for equilibrium EMP models

Description

```Test to verify that the initial values get set as expected.  We
expect that the MCP generated by JAMS will have all initial values set
properly, i.e. at the optimal values since we start at a solution.

Contributor: Steven Dirkse, June 2010
```

Small Model of Type : GAMS

Category : GAMS Test library

Main file : emp09.gms

``````\$Title Test initial levels for equilibrium EMP models (EMP09,SEQ=492)

\$ontext
Test to verify that the initial values get set as expected.  We
expect that the MCP generated by JAMS will have all initial values set
properly, i.e. at the optimal values since we start at a solution.

Contributor: Steven Dirkse, June 2010
\$offtext

variables x, y, z;
equations fL, fE, obj;

obj..  z =e= x + y;
fL..    sqr(x) + sqr(y) =L= 1;
fE..    sqr(x) + sqr(y) =E= 1;

model mL / obj, fL /;
model mE / obj, fE /;
file e / '%emp.info%' /;

x.l = sqrt(2)/2;
y.l = sqrt(2)/2;
z.l = sqrt(2);
obj.m = 1;
fL.m = sqrt(2)/2;
fE.m = sqrt(2)/2;

putclose e 'equilibrium  max z x y obj fL';
mL.iterlim = 0;
solve mL using emp;
abort\$[mL.modelstat  > 2] 'bad model status', mL.modelstat;
abort\$[mL.solvestat <> 1] 'bad solve status', mL.solvestat;

putclose e 'equilibrium  max z x y obj fE';
mE.iterlim = 0;
solve mE using emp;
abort\$[mE.modelstat  > 2] 'bad model status', mE.modelstat;
abort\$[mE.solvestat <> 1] 'bad solve status', mE.solvestat;
``````
GAMS Development Corp.
GAMS Software GmbH

General Information and Sales
U.S. (+1) 202 342-0180
Europe: (+49) 221 949-9170