simpequil3.gms : Simple Generalized Nash Equilibrium Problem

Description

A GNEP (generalized Nash equilibrium problem) instance derived from the QVI
example in the paper:

 Jiri V. Outrata and Jochem Zowe: A Newton method for a class of
 quasi-variational inequalities,
 Computational Optimization and Applications, 4, 5-21 (1995)

The QVI model is in this library as SIMPLEQVI2.102

We compute a solution (x1*,x2*) = (10,5).

Contributor: Youngdae Kim & Steve Dirkse, Apr 2018


Small Model of Type : EQUIL


Category : GAMS EMP library


Main file : simpequil3.gms

$Title Simple Generalized Nash Equilibrium Problem (SIMPEQUIL3,SEQ=103)

$ontext
A GNEP (generalized Nash equilibrium problem) instance derived from the QVI
example in the paper:

 Jiri V. Outrata and Jochem Zowe: A Newton method for a class of
 quasi-variational inequalities,
 Computational Optimization and Applications, 4, 5-21 (1995)

The QVI model is in this library as SIMPLEQVI2.102

We compute a solution (x1*,x2*) = (10,5).

Contributor: Youngdae Kim & Steve Dirkse, Apr 2018
$offtext

$if not set CLEANUP $set CLEANUP YES
$if not set TESTTOL $set TESTTOL 1e-6
scalars tol / %TESTTOL% /;

set i / 1*2 /;
alias(i,j);

table A(i,j)
      1       2
1     1     [8/3]
2   [5/4]     1   ;

parameters
  b(i)   / 1 [100/3],  2 22.5 /
  rhs(i) / 1 15,       2 20   /
  ;

variable obj(i) 'objective for agent i';
positive variable y(i);

equation
  defobj(i)
  cons(i)
  ;
defobj(i)..  y(i) * sum{j, A(i,j)*y(j)} - b(i)*y(i) =E= obj(i);

cons(i)  ..  sum{j, y(j)} =L= rhs(i);

y.up(i) = 11;


model gnep / defobj, cons /;

file opt     / 'jams.opt' /;
file empinfo / 'gnepInfo.txt' /;  empinfo.pc = 8;

put empinfo 'equilibrium' /;
loop{i,
  put ' min', obj(i), y(i), defobj(i), cons(i) /;
};
putclose empinfo;
putclose opt
  'EMPInfoFile gnepInfo.txt' /
  'Dict        gnepDict.txt' /
  'FileName    gnepScalar.gms' /
  ;

* Set the starting point to the value described in the paper
y.l(i) = 0;

gnep.optfile = 1;
solve gnep using emp;

abort$[gnep.solvestat <> %solvestat.NormalCompletion%]
     'wrong gnep.solvestat', gnep.solvestat;
abort$[gnep.modelstat  > %modelstat.LocallyOptimal%]
     'wrong gnep.modelstat', gnep.modelstat;
abort$[abs(y.l('1') - 10) > tol] 'at solution, expected y(1)==10', y.l;
abort$[abs(y.l('2') -  5) > tol] 'at solution, expected y(2)==5', y.l;

$set KILL_LIST "jams.opt gnepInfo.txt gnepDict.txt gnepScalar.gms gnepScalar.lst gnepScalarpf.pf"

$ifthen %CLEANUP% == YES
execute 'rm -f %KILL_LIST%';

$else
file log /''/;
putclose log
  ' ' /
  'Several intermediate files created by this run remain for you to browse:' /
  '   %KILL_LIST%' /
  'If you want them deleted, do not run model with --CLEANUP=NO' /
  ' ' /
  ;
$endif