GAMS [ Home | Downloads | Documentation | Solvers | APIs | Tools | Model Libraries | Resources | Sales | Support | Contact Us | Search ]

emp19.gms : Test JAMS/EMP on implicit variable handling

Description

Test JAMS behavior on a small equilibrium model with implicit variables.

Contributors: Youngdae Kim & Steve Dirkse, Dec 2016

Small Model of Type : GAMS


Category : GAMS Test library


Main file : emp19.gms

$TITLE 'Test JAMS/EMP on implicit variable handling' (EMP19,SEQ=701)

$ontext
Test JAMS behavior on a small equilibrium model with implicit variables.

Contributors: Youngdae Kim & Steve Dirkse, Dec 2016
$offtext


$if not set TESTTOL $set TESTTOL 1e-6
scalars tol / %TESTTOL% /;
file opt  / 'jams.opt' /;
file info / '%emp.info%' /;

set i agents  / 1*2 /;
alias (i,j);
* j indicates who owns the copy of the var or equation

* The scalar files generated depend on the variable declaration order,
* so do not change the declarations lightly
variables
  obj(i)
  zExp(i,j) 'copy of z_i owned by agent j'
  z(i)      'z_i done with implicit variables'
  ;
positive variables t(i);

equations
  defFExp(i,j)    'copy of F_i for agent j'
  defF(i)         'F_i done with implicit variables'
  defobjExp(i)
  defobj(i)
  ;

defobjExp(i)..
    obj(i) =E=
    (sqr(zExp(i,i)) - 0.5*t(i) + 0.25)$sameas(i,'1') +
    (sqr(zExp(i,i)) - 2*t(i) + 1)$sameas(i,'2');

defFExp(i,j)..
    (2*zExp('1',j) + zExp('2',j) + t('1') - t('2'))$sameas(i,'1') +
    (-2*zExp('1',j) + 3*zExp('2',j) - t('1') - 3*t('2'))$sameas(i,'2') =E= 0;

model me 'explicit formulation' / defobjExp, defFExp /;

put info 'equilibrium' ;
loop(i,
    put / 'min', obj(i), t(i);
    loop(j, put zExp(j,i););

    put / defobjExp(i);
    loop(j, put defFExp(j,i););
);
putclose;
putclose opt
  'Dict     explDict.txt' /
  'FileName expl.gms' ;

me.optfile = 1;
solve me using emp;
abort$[me.solvestat <> %solvestat.NormalCompletion%]
   'wrong me.solvestat', me.solvestat;
abort$[me.modelstat  > %modelstat.LocallyOptimal%]
   'wrong me.modelstat', me.modelstat;
abort$[ abs(obj.l('1')-0) > tol ]            'bad obj.l("1")', obj.l;
abort$[ abs(obj.l('2')-0) > tol ]            'bad obj.l("2")', obj.l;
abort$[smax{j, abs(zExp.l('1',j)+.5)} > tol] 'bad zExp.l("1",j)', zExp.l;
abort$[smax{j, abs(zExp.l('2',j)-1)} > tol]  'bad zExp.l("2",j)', zExp.l;
abort$[ abs(t.l('1')-1) > tol ]              'bad t.l("1")', t.l;
abort$[ abs(t.l('2')-1) > tol ]              'bad t.l("2")', t.l;

obj.l(i) = 0;
zExp.l(i,j) = 0;
t.l(i) = 0;

$onecho > expl_gms
***********************************************
* written by GAMS/JAMS at 12/03/16 20:43:34
* for more information use JAMS option "Dict"
***********************************************

Variables  x3,x4,x5,x6,x7,x8,u3,u4,u5,u6;

Positive Variables  x7,x8;

Equations  e3,e4,e5,e6,dL_dx3,dL_dx4,dL_dx5,dL_dx6,dL_dx7,dL_dx8;


e3..    2*x3 + x5 + x7 - x8 =E= 0;

e4..    2*x4 + x6 + x7 - x8 =E= 0;

e5..  - 2*x3 + 3*x5 - x7 - 3*x8 =E= 0;

e6..  - 2*x4 + 3*x6 - x7 - 3*x8 =E= 0;

dL_dx3.. (-2*x3)/(-1) - 2*u3 + 2*u5 =E= 0;

dL_dx4..  - 2*u4 + 2*u6 + eps*x4 =E= 0;

dL_dx5..  - u3 - 3*u5 + eps*x5 =E= 0;

dL_dx6.. (-2*x6)/(-1) - u4 - 3*u6 =E= 0;

dL_dx7.. -0.5 - u3 + u5 + eps*x7 =G= 0;

dL_dx8.. -2 + u4 + 3*u6 + eps*x8 =G= 0;

Model m / e3.u3,e4.u4,e5.u5,e6.u6,dL_dx3.x3,dL_dx4.x4,dL_dx5.x5,dL_dx6.x6
         ,dL_dx7.x7,dL_dx8.x8 /;

m.limrow=0; m.limcol=0;

Solve m using MCP;
$offecho

execute 'grep -v " written by GAMS" expl_gms > expl.gms.want'
execute 'grep -v " written by GAMS" expl.gms > expl.gms.got'
execute '=diff -bw expl.gms.want expl.gms.got'
abort$errorlevel 'Files expl.gms.want and expl.gms.got differ';

$onecho > expl_dict
* written by GAMS/JAMS at 12/03/16 20:43:34

********************************************************************************
 Contents
 1 Content of EMP Information File
 2 Processed EMP Information
 3 Dictionary
  3.1 Constraints
  3.2 Variables
********************************************************************************


 1 Content of EMP Information File
 ---------------------------------

     1:equilibrium
     2:min obj('1') t('1') zExp('1','1') zExp('2','1')
     3:defobjExp('1') defFExp('1','1') defFExp('2','1')
     4:min obj('2') t('2') zExp('1','2') zExp('2','2')
     5:defobjExp('2') defFExp('1','2') defFExp('2','2')


 2 Processed EMP Information
 ---------------------------


 3 Dictionary
 ------------
  3.1 Constraints
  ---------------

      {reformulated}  defobjExp(1)
      {reformulated}  defobjExp(2)
                  e3  defFExp(1,1)
                  e4  defFExp(1,2)
                  e5  defFExp(2,1)
                  e6  defFExp(2,2)
              dL_dx3  {new}
              dL_dx4  {new}
              dL_dx5  {new}
              dL_dx6  {new}
              dL_dx7  {new}
              dL_dx8  {new}


  3.2 Variables
 --------------

      {reformulated}  obj(1)
      {reformulated}  obj(2)
                  x3  zExp(1,1)
                  x4  zExp(1,2)
                  x5  zExp(2,1)
                  x6  zExp(2,2)
                  x7  t(1)
                  x8  t(2)
                  u3  {new}
                  u4  {new}
                  u5  {new}
                  u6  {new}
$offecho

execute 'grep -v " written by GAMS" expl_dict > expldict.txt.want'
execute 'grep -v " written by GAMS" explDict.txt > expldict.txt.got'
execute '=diff -bw expldict.txt.want expldict.txt.got'
abort$errorlevel 'Files expldict.txt.want and expldict.txt.got differ';

defobj(i)..
    obj(i) =E=
    (sqr(z(i)) - 0.5*t(i) + 0.25)$sameas(i,'1') +
    (sqr(z(i)) - 2*t(i) + 1)$sameas(i,'2');

defF(i)..
    (2*z('1') + z('2') + t('1') - t('2'))$sameas(i,'1') +
    (-2*z('1') + 3*z('2') - t('1') - 3*t('2'))$sameas(i,'2') =E= 0;

model mi 'implicit formulation' / defobj, defF /;

put info 'equilibrium' /;
put 'implicit z defF' /;
loop(i,
    put 'min', obj(i), t(i), 'z', defobj(i) /;
);
putclose;

* testing with implicit
putclose opt
  'Dict     implDict.txt' /
  'FileName impl.gms' ;

mi.optfile = 1;
solve mi using emp;
abort$[mi.solvestat <> %solvestat.NormalCompletion%]
   'wrong mi.solvestat', mi.solvestat;
abort$[mi.modelstat  > %modelstat.LocallyOptimal%]
   'wrong mi.modelstat', mi.modelstat;
abort$[ abs(obj.l('1')-0) > tol ] 'bad obj.l("1")', obj.l;
abort$[ abs(obj.l('2')-0) > tol ] 'bad obj.l("2")', obj.l;
abort$[ abs(z.l('1')+.5) > tol]   'bad z.l("1")', z.l;
abort$[ abs(z.l('2')-1) > tol]    'bad z.l("2")', z.l;
abort$[ abs(t.l('1')-1) > tol ]   'bad t.l("1")', t.l;
abort$[ abs(t.l('2')-1) > tol ]   'bad t.l("2")', t.l;

obj.l(i) = 0;
z.l(i) = 0;
t.l(i) = 0;
defobj.m(i) = 0;
defF.m(i) = 0;

$onecho > impl_gms
***********************************************
* written by GAMS/JAMS at 12/03/16 20:47:56
* for more information use JAMS option "Dict"
***********************************************

Variables  x3,x4,x5,x6,dx3_dx5,dx3_dx6,dx4_dx5,dx4_dx6;

Positive Variables  x5,x6;

Equations  e3,e4,IMPL_de3_dx5,IMPL_de3_dx6,IMPL_de4_dx5,IMPL_de4_dx6,dL_dx5
          ,dL_dx6;


e3..    2*x3 + x4 + x5 - x6 =E= 0;

e4..  - 2*x3 + 3*x4 - x5 - 3*x6 =E= 0;

* equations below are for newly defined implicit variables

IMPL_de3_dx5.. (2)*(dx3_dx5) + (1)*(dx4_dx5) + (1) =E= 0;

IMPL_de3_dx6.. (2)*(dx3_dx6) + (1)*(dx4_dx6) + (-1) =E= 0;

IMPL_de4_dx5.. (-2)*(dx3_dx5) + (3)*(dx4_dx5) + (-1) =E= 0;

IMPL_de4_dx6.. (-2)*(dx3_dx6) + (3)*(dx4_dx6) + (-3) =E= 0;

dL_dx5.. -0.5 + ((-2*x3)/(-1))*(dx3_dx5) + eps*x5 =G= 0;

dL_dx6.. -2 + ((-2*x4)/(-1))*(dx4_dx6) + eps*x6 =G= 0;

Model m / e3.x3,e4.x4,IMPL_de3_dx5.dx3_dx5,IMPL_de3_dx6.dx3_dx6
         ,IMPL_de4_dx5.dx4_dx5,IMPL_de4_dx6.dx4_dx6,dL_dx5.x5,dL_dx6.x6 /;

m.limrow=0; m.limcol=0;

Solve m using MCP;
$offecho

execute 'grep -v " written by GAMS" impl_gms > impl.gms.want'
execute 'grep -v " written by GAMS" impl.gms > impl.gms.got'
execute '=diff -bw impl.gms.want impl.gms.got'
abort$errorlevel 'Files impl.gms.want and impl.gms.got differ';

$onecho > impl_dict
* written by GAMS/JAMS at 12/03/16 20:47:56

********************************************************************************
 Contents
 1 Content of EMP Information File
 2 Processed EMP Information
 3 Dictionary
  3.1 Constraints
  3.2 Variables
********************************************************************************


 1 Content of EMP Information File
 ---------------------------------

     1:equilibrium
     2:implicit z defF
     3:min obj('1') t('1') z defobj('1')
     4:min obj('2') t('2') z defobj('2')


 2 Processed EMP Information
 ---------------------------


 3 Dictionary
 ------------
  3.1 Constraints
  ---------------

      {reformulated}  defobj(1)
      {reformulated}  defobj(2)
                  e3  defF(1)
                  e4  defF(2)
        IMPL_de3_dx5  {new}
        IMPL_de3_dx6  {new}
        IMPL_de4_dx5  {new}
        IMPL_de4_dx6  {new}
              dL_dx5  {new}
              dL_dx6  {new}


  3.2 Variables
 --------------

      {reformulated}  obj(1)
      {reformulated}  obj(2)
                  x3  z(1)
                  x4  z(2)
                  x5  t(1)
                  x6  t(2)
             dx3_dx5  {new}
             dx3_dx6  {new}
             dx4_dx5  {new}
             dx4_dx6  {new}
$offecho

execute 'grep -v " written by GAMS" impl_dict > impldict.txt.want'
execute 'grep -v " written by GAMS" implDict.txt > impldict.txt.got'
execute '=diff -bw impldict.txt.want impldict.txt.got'
abort$errorlevel 'Files impldict.txt.want and impldict.txt.got differ';

* testing with adjoint

putclose opt
  'Dict     implAdjointDict.txt' /
  'FileName implAdjoint.gms' /
  'Adjoint' / ;

solve mi using emp;
abort$[mi.solvestat <> %solvestat.NormalCompletion%]
   'wrong mi.solvestat', mi.solvestat;
abort$[mi.modelstat  > %modelstat.LocallyOptimal%]
   'wrong mi.modelstat', mi.modelstat;
abort$[ abs(obj.l('1')-0) > tol ] 'bad obj.l("1")', obj.l;
abort$[ abs(obj.l('2')-0) > tol ] 'bad obj.l("2")', obj.l;
abort$[ abs(z.l('1')+.5) > tol]   'bad z.l("1")', z.l;
abort$[ abs(z.l('2')-1) > tol]    'bad z.l("2")', z.l;
abort$[ abs(t.l('1')-1) > tol ]   'bad t.l("1")', t.l;
abort$[ abs(t.l('2')-1) > tol ]   'bad t.l("2")', t.l;

obj.l(i) = 0;
z.l(i) = 0;
t.l(i) = 0;
defobj.m(i) = 0;
defF.m(i) = 0;

$onecho > implAdjoint_gms
***********************************************
* written by GAMS/JAMS at 12/05/16 14:28:48
* for more information use JAMS option "Dict"
***********************************************

Variables  x3,x4,x5,x6,IMPL1_a4_x1,IMPL1_a4_x2,IMPL1_a5_x1,IMPL1_a5_x2;

Positive Variables  x5,x6;

Equations  e3,e4,IMPL1_a4_e1,IMPL1_a4_e2,IMPL1_a5_e1,IMPL1_a5_e2,dL_dx5,dL_dx6;


e3..    2*x3 + x4 + x5 - x6 =E= 0;

e4..  - 2*x3 + 3*x4 - x5 - 3*x6 =E= 0;

IMPL1_a4_e1.. (2)*(IMPL1_a4_x1) + (-2)*(IMPL1_a4_x2) + (-2*x3)/(-1) =E= 0;

IMPL1_a4_e2.. (1)*(IMPL1_a4_x1) + (3)*(IMPL1_a4_x2) =E= 0;

IMPL1_a5_e1.. (2)*(IMPL1_a5_x1) + (-2)*(IMPL1_a5_x2) =E= 0;

IMPL1_a5_e2.. (1)*(IMPL1_a5_x1) + (3)*(IMPL1_a5_x2) + (-2*x4)/(-1) =E= 0;

dL_dx5.. -0.5 + (1)*(IMPL1_a4_x1) + (-1)*(IMPL1_a4_x2) + eps*x5 =G= 0;

dL_dx6.. -2 + (-1)*(IMPL1_a5_x1) + (-3)*(IMPL1_a5_x2) + eps*x6 =G= 0;

Model m / e3.x3,e4.x4,IMPL1_a4_e1.IMPL1_a4_x1,IMPL1_a4_e2.IMPL1_a4_x2
         ,IMPL1_a5_e1.IMPL1_a5_x1,IMPL1_a5_e2.IMPL1_a5_x2,dL_dx5.x5
         ,dL_dx6.x6 /;

m.limrow=0; m.limcol=0;

Solve m using MCP;
$offecho

execute 'grep -v " written by GAMS" implAdjoint_gms > implAdjoint.gms.want'
execute 'grep -v " written by GAMS" implAdjoint.gms > implAdjoint.gms.got'
execute '=diff -bw implAdjoint.gms.want implAdjoint.gms.got'
abort$errorlevel 'Files implAdjoint.gms.want and implAdjoint.gms.got differ';

$onecho > implAdjoint_dict
* written by GAMS/JAMS at 12/05/16 14:28:48

********************************************************************************
 Contents
 1 Content of EMP Information File
 2 Processed EMP Information
 3 Dictionary
  3.1 Constraints
  3.2 Variables
********************************************************************************


 1 Content of EMP Information File
 ---------------------------------

     1:equilibrium
     2:implicit z defF
     3:min obj('1') t('1') z defobj('1')
     4:min obj('2') t('2') z defobj('2')


 2 Processed EMP Information
 ---------------------------


 3 Dictionary
 ------------
  3.1 Constraints
  ---------------

      {reformulated}  defobj(1)
      {reformulated}  defobj(2)
                  e3  defF(1)
                  e4  defF(2)
         IMPL1_a4_e1  {new}
         IMPL1_a4_e2  {new}
         IMPL1_a5_e1  {new}
         IMPL1_a5_e2  {new}
              dL_dx5  {new}
              dL_dx6  {new}


  3.2 Variables
 --------------

      {reformulated}  obj(1)
      {reformulated}  obj(2)
                  x3  z(1)
                  x4  z(2)
                  x5  t(1)
                  x6  t(2)
         IMPL1_a4_x1  {new}
         IMPL1_a4_x2  {new}
         IMPL1_a5_x1  {new}
         IMPL1_a5_x2  {new}
$offecho

execute 'grep -v " written by GAMS" implAdjoint_dict > implAdjointDict.txt.want'
execute 'grep -v " written by GAMS" implAdjointDict.txt > implAdjointDict.txt.got'
execute '=diff -bw implAdjointDict.txt.want implAdjointDict.txt.got'
abort$errorlevel 'Files implAdjointDict.txt.want and implAdjointDict.txt.got differ';

* testing with replication
putclose opt
  'Dict     implRepDict.txt' /
  'FileName implRep.gms' /
  'CopyImplVar' ;

solve mi using emp;
abort$[mi.solvestat <> %solvestat.NormalCompletion%]
   'wrong mi.solvestat', mi.solvestat;
abort$[mi.modelstat  > %modelstat.LocallyOptimal%]
   'wrong mi.modelstat', mi.modelstat;
abort$[ abs(obj.l('1')-0) > tol ] 'bad obj.l("1")', obj.l;
abort$[ abs(obj.l('2')-0) > tol ] 'bad obj.l("2")', obj.l;
abort$[ abs(z.l('1')+.5) > tol]   'bad z.l("1")', z.l;
abort$[ abs(z.l('2')-1) > tol]    'bad z.l("2")', z.l;
abort$[ abs(t.l('1')-1) > tol ]   'bad t.l("1")', t.l;
abort$[ abs(t.l('2')-1) > tol ]   'bad t.l("2")', t.l;

obj.l(i) = 0;
z.l(i) = 0;
t.l(i) = 0;
defobj.m(i) = 0;
defF.m(i) = 0;

$onechoV > implRep_gms
***********************************************
* written by GAMS/JAMS at 12/05/16 14:29:27
* for more information use JAMS option "Dict"
***********************************************

Variables  x1,x2,x3_4,x4_4,x5,x6,x3_5,x4_5;

Positive Variables  x5,x6;

Equations  e1,e2,e3_4,e4_4,e3_5,e4_5;


e1.. -sqr(x3_4) + x1 + 0.5*x5 =E= 0.25;

e2.. -sqr(x4_5) + x2 + 2*x6 =E= 1;

e3_4..    2*x3_4 + x4_4 + x5 - x6 =E= 0;

e4_4..  - 2*x3_4 + 3*x4_4 - x5 - 3*x6 =E= 0;

e3_5..    2*x3_5 + x4_5 + x5 - x6 =E= 0;

e4_5..  - 2*x3_5 + 3*x4_5 - x5 - 3*x6 =E= 0;

Model m / e1,e2,e3_4,e4_4,e3_5,e4_5 /;

m.limrow=0; m.limcol=0;


File empinfo / '%emp.info%' /;

Put empinfo 'equilibrium' /;
Put 'min',x1,x5,x3_4,x4_4,e1,e3_4,e4_4 /;
Put 'min',x2,x6,x3_5,x4_5,e2,e3_5,e4_5 /;
Putclose empinfo;

m.optfile = 0;

Solve m using EMP;
$offecho

execute 'grep -v " written by GAMS" implRep_gms > implRep.gms.want'
execute 'grep -v " written by GAMS" implRep.gms > implRep.gms.got'
execute '=diff -bw implRep.gms.want implRep.gms.got'
abort$errorlevel 'Files implRep.gms.want and implRep.gms.got differ';

$onecho > implRep_dict
* written by GAMS/JAMS at 12/05/16 14:29:27

********************************************************************************
 Contents
 1 Content of EMP Information File
 2 Processed EMP Information
 3 Dictionary
  3.1 Constraints
  3.2 Variables
********************************************************************************


 1 Content of EMP Information File
 ---------------------------------

     1:equilibrium
     2:implicit z defF
     3:min obj('1') t('1') z defobj('1')
     4:min obj('2') t('2') z defobj('2')


 2 Processed EMP Information
 ---------------------------


 3 Dictionary
 ------------
  3.1 Constraints
  ---------------

                  e1  defobj(1)
                  e2  defobj(2)
                e3_4  defF(1)
                e4_4  defF(2)
                e3_5  defF(1)
                e4_5  defF(2)


  3.2 Variables
 --------------

                  x1  obj(1)
                  x2  obj(2)
                x3_4  z(1)
                x4_4  z(2)
                  x5  t(1)
                  x6  t(2)
                x3_5  z(1)
                x4_5  z(2)
$offecho

execute 'grep -v " written by GAMS" implRep_dict > implRepDict.txt.want'
execute 'grep -v " written by GAMS" implRepDict.txt > implRepDict.txt.got'
execute '=diff -bw implRepDict.txt.want implRepDict.txt.got'
abort$errorlevel 'Files implRepDict.txt.want and implRepDict.txt.got differ';

* testing with replication and matching
putclose opt
  'Dict     implRepMMDict.txt' /
  'FileName implRepMM.gms' /
  'CopyImplVar' /
  'MixMatch' /
  ;

solve mi using emp;
abort$[mi.solvestat <> %solvestat.NormalCompletion%]
   'wrong mi.solvestat', mi.solvestat;
abort$[mi.modelstat  > %modelstat.LocallyOptimal%]
   'wrong mi.modelstat', mi.modelstat;
abort$[ abs(obj.l('1')-0) > tol ] 'bad obj.l("1")', obj.l;
abort$[ abs(obj.l('2')-0) > tol ] 'bad obj.l("2")', obj.l;
abort$[ abs(z.l('1')+.5) > tol]   'bad z.l("1")', z.l;
abort$[ abs(z.l('2')-1) > tol]    'bad z.l("2")', z.l;
abort$[ abs(t.l('1')-1) > tol ]   'bad t.l("1")', t.l;
abort$[ abs(t.l('2')-1) > tol ]   'bad t.l("2")', t.l;

obj.l(i) = 0;
z.l(i) = 0;
t.l(i) = 0;
defobj.m(i) = 0;
defF.m(i) = 0;

$onechoV > implRepMM_gms
***********************************************
* written by GAMS/JAMS at 12/05/16 14:30:03
* for more information use JAMS option "Dict"
***********************************************

Variables  x1,x2,x3_4,x4_4,x5,x6,x3_5,x4_5;

Positive Variables  x5,x6;

Equations  e1,e2,e3_4,e4_4,e3_5,e4_5;


e1.. -sqr(x3_4) + x1 + 0.5*x5 =E= 0.25;

e2.. -sqr(x4_5) + x2 + 2*x6 =E= 1;

e3_4..    2*x3_4 + x4_4 + x5 - x6 =E= 0;

e4_4..  - 2*x3_4 + 3*x4_4 - x5 - 3*x6 =E= 0;

e3_5..    2*x3_5 + x4_5 + x5 - x6 =E= 0;

e4_5..  - 2*x3_5 + 3*x4_5 - x5 - 3*x6 =E= 0;

Model m / e1,e2,e3_4,e4_4,e3_5,e4_5 /;

m.limrow=0; m.limcol=0;


File empinfo / '%emp.info%' /;

Put empinfo 'equilibrium' /;
Put 'min',x1,x5,x3_4,x4_4,e1,e3_4,e4_4 /;
Put 'min',x2,x6,x3_5,x4_5,e2,e3_5,e4_5 /;
Putclose empinfo;

m.optfile = 0;

Solve m using EMP;
$offecho

execute 'grep -v " written by GAMS" implRepMM_gms > implRepMM.gms.want'
execute 'grep -v " written by GAMS" implRepMM.gms > implRepMM.gms.got'
execute '=diff -bw implRepMM.gms.want implRepMM.gms.got'
abort$errorlevel 'Files implRepMM.gms.want and implRepMM.gms.got differ';

$onecho > implRepMM_dict
* written by GAMS/JAMS at 12/05/16 14:30:03

********************************************************************************
 Contents
 1 Content of EMP Information File
 2 Processed EMP Information
 3 Dictionary
  3.1 Constraints
  3.2 Variables
********************************************************************************


 1 Content of EMP Information File
 ---------------------------------

     1:equilibrium
     2:implicit z defF
     3:min obj('1') t('1') z defobj('1')
     4:min obj('2') t('2') z defobj('2')


 2 Processed EMP Information
 ---------------------------


 3 Dictionary
 ------------
  3.1 Constraints
  ---------------

                  e1  defobj(1)
                  e2  defobj(2)
                e3_4  defF(1)
                e4_4  defF(2)
                e3_5  defF(1)
                e4_5  defF(2)


  3.2 Variables
 --------------

                  x1  obj(1)
                  x2  obj(2)
                x3_4  z(1)
                x4_4  z(2)
                  x5  t(1)
                  x6  t(2)
                x3_5  z(1)
                x4_5  z(2)
$offecho

execute 'grep -v " written by GAMS" implRepMM_dict > implRepMMDict.txt.want'
execute 'grep -v " written by GAMS" implRepMMDict.txt > implRepMMDict.txt.got'
execute '=diff -bw implRepMMDict.txt.want implRepMMDict.txt.got'
abort$errorlevel 'Files implRepMMDict.txt.want and implRepMMDict.txt.got differ';