-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNE-howto.Rnw
executable file
·1446 lines (1266 loc) · 56.8 KB
/
GNE-howto.Rnw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%%
% @file GNE-howto.Rnw
% @brief sweave file for the vignette
%
% @author Christophe Dutang
%
%
\documentclass[11pt]{article}
%\VignetteIndexEntry{User guide for the GNE package}
%\VignettePackage{GNE}
%\VignetteKeyword{nonlinear}
% package
%American Mathematical Society (AMS) math symbols
\usepackage{amsfonts,amssymb,amsmath}
%english typography
\usepackage[english]{babel}
\usepackage{courier,newlfont}
% 8 bit accents
%\usepackage[applemac]{inputenc} %MAC encoding
\usepackage[utf8]{inputenc} %UNIX encoding
%\usepackage[ansinew]{inputenc} %WINDOWS encoding
%graph
\usepackage[dvips]{graphicx}
\usepackage{color,graphics, subfig}
%citation
\usepackage{natbib}
%text style
\usepackage{ulem}
%reference hypertext
\usepackage[hyperfootnotes=false]{hyperref}
%footnote
\usepackage[stable]{footmisc}
\usepackage{perpage}
\MakePerPage[1]{footnote}
%multicol package
\usepackage{multirow, multicol}
%url
\usepackage{url}
%header
\pagestyle{headings}
% layout
\normalsize\setlength{\parskip}{\baselineskip}
\setlength{\oddsidemargin}{25mm}
\setlength{\evensidemargin}{25mm}
\setlength{\voffset}{-2.54cm}
\setlength{\hoffset}{-3.8cm}
\setlength{\textwidth}{180mm}
\setlength{\topmargin}{0mm}
\setlength{\headheight}{15mm}
\setlength{\headsep}{11mm}
\setlength{\topskip}{0mm}
\setlength{\textheight}{230mm}
% macros
\newcommand{\HRule}{\noindent\rule{\linewidth}{1pt}}
\newcommand{\II}{\mbox{\large 1\hskip -0,353em 1}}
\newcommand{\abs}[1]{\lvert#1\rvert}
\newcommand{\norm}[1]{\lVert#1\rVert}
\newcommand{\ligne}{\rule[2mm]{.3\textwidth}{0,5mm}\\}
\newcommand{\pkg}{\textbf}
\newcommand{\sigle}{\textsc}
\newcommand{\code}{\texttt}
\newcommand{\soft}{\textsf}
\newcommand{\myskip}{\vspace{\parskip}}
\newcommand{\txtm}[1]{\textrm{~~#1~~}}
\newcommand{\expo}{\textsuperscript}
\newcommand{\ind}{1\!\!1}
\newcommand{\mat}[1]{\mathbf{#1}}
\newcommand{\blank}{ \clearpage{\pagestyle{empty}\cleardoublepage} }
\newcommand{\card}{\textrm{Card}}
\newcommand{\diag}{\textrm{diag}}
\newcommand{\NIF}{\textrm{NIF}}
\newcommand{\GAP}{\textrm{GAP}}
\newcommand{\Jac}{\textrm{Jac\hskip+.1em}}
\newcommand{\R}{\ensuremath{\mathbb{R}}}
% footnote in table or legend
\newcounter{noteTabCap}
\newcommand{\initFmark}{\setcounter{noteTabCap}{0}} %init noteTabCap counter
\newcommand{\fmark}{\footnotemark \addtocounter{noteTabCap}{1}} %mark footnote
\newcommand{\updateFtext}{\addtocounter{footnote}{-\value{noteTabCap}}} %update footnote counter
\newcommand{\ftext}[1]{\addtocounter{footnote}{1} \footnotetext{#1}} %set the footnote text
%theorems
\newtheorem{mydef}{Definition}
\title{User guide for the \pkg{GNE} package}
\author{Christophe Dutang}
\begin{document}
\SweaveOpts{concordance=TRUE}
\maketitle
As usual, the \pkg{GNE} package is loaded via the \code{library} function. In the following, we assume that the line below has been called
%%% R code
<<load, fig=FALSE, echo=TRUE, eval=TRUE>>=
library(GNE)
@
%%%
%________________________________________________________________________
\section{Introduction}
%________________________________________________________________________
\begin{mydef}[GNEP]
We define the generalized Nash equilibrium problem GNEP($N, \theta_i, X_i$) as the solutions $x^\star$ of the $N$ sub-problems
$$
\forall i = 1, \dots, N, x_i^\star \txtm{solves}
\underset{ y_i }{\min}
\quad
\theta_i(y_i, x_{-i}^\star)
\txtm{such that} x_i^\star \in X_i(x_{-i}^\star),
$$
where $X_i(x_{-i})$ is the action space of player $i$ given others player actions $x_{-i}$.
\end{mydef}
If we have parametrized action space $X_i(x_{-i}) = \{ y_i, g_i(y_i, x_{-i}) \leq 0 \}$, we denote the GNEP by GNEP($N, \theta_i, g_i$).
We denote by $X(x) $ the action set $X(x) = X_1(x_{-1}) \times \dots \times X_N(x_{-N})$. For standard NE, this set does not depend on $x$.
The following example seems very basic, but in fact it has particular features, one of them is to have four solutions, i.e. four GNEs.
Let $N=2$. The objective functions are defined as
$$
\theta_1(x) = (x_1-2)^2 (x_2-4)^4 \txtm{and} \theta_2(x) = (x_2-3)^2 (x_1)^4,
$$
for $x\in \R^2$, while the constraint functions are given by
$$
g_1(x) = x_1+x_2-1 \leq 0 \txtm{and} g_2(x) = 2x_1+x_2-2 \leq 0.
$$
Objective functions can be rewritten as $\theta_i(x) = (x_i - c_i)^2 (x_{-i} d_i)^4$, with $c = (2, 3)$ and
$d=(4,0)$.
First-order derivatives are
$$
\nabla_j \theta_i(x) = 2 (x_i - c_i) (x_{-i} d_i)^4 \delta_{ij} + 4(x_i - c_i)^2 (x_{-i} d_i)^3 (1- \delta_{ij}),
$$
and
$$
\nabla_j g_1(x) = 1
\txtm{and}
\nabla_j g_2(x) = 2 \delta_{j1} + \delta_{j2}.
$$
Second-order derivatives are
\begin{equation*}
\begin{split}
\nabla_k \nabla_j \theta_i(x) = 2 (x_{-i} d_i)^4 \delta_{ij} \delta_{ik}
+ 8 (x_i - c_i) (x_{-i} d_i)^3 \delta_{ij} (1-\delta_{ik}) \\
+ 8(x_i - c_i) (x_{-i} d_i)^3 (1- \delta_{ij}) \delta_{ik}
+ 12(x_i - c_i)^2 (x_{-i} d_i)^2 (1- \delta_{ij})(1- \delta_{ik} ),
\end{split}
\end{equation*}
and
$$
\nabla_k \nabla_j g_1(x) = \nabla_k \nabla_j g_2(x) = 0.
$$
%________________________________________________________________________
\section{GNEP as a nonsmooth equation}
%________________________________________________________________________
\subsection{Notation and definitions}
From \cite{facchfischpic09},
assuming differentiability and a constraint qualification hold, the first-order necessary conditions of player $i$'s subproblem state there exists a Lagrangian multiplier
$\lambda^i \in \R^{m_i} $ such that
\begin{equation*}
\begin{split}
\nabla_{x_i} \theta_{i}(x^\star) + \sum_{ 1 \leq j \leq m_i } \lambda_{j}^{i\star} \nabla_{x_i} g_{j}^i(x^\star) = &~0~~~~~~~ ( \in \R^{n_i} ). \\
0 \leq \lambda^{i\star},~ - g^i(x^\star) \geq 0,~ g^i(x^\star)^T\lambda^{i\star}= & ~0~~~~~~~ ( \in \R^{m_i} ) .
\end{split}
\end{equation*}
Regrouping the $N$ subproblems, we get the following system.
\begin{mydef}[eKKT]
For the $N$ optimization subproblems for the functions $\theta_i: \R^{n} \mapsto \R$, with constraints $g_i: \R^{n} \mapsto \R^{m_i}$, the KKT conditions can be regrouped such that
there exists $\lambda \in \R^m$ and
$$
\tilde L(x, \lambda) = 0 \txtm{and} 0 \leq \lambda \perp G(x) \leq 0,
$$
where $L$ and $G$ are given by
$$
\tilde L(x, \lambda) =
\left(
\begin{matrix}
\nabla_{x_1} \theta_1(x) + \Jac g^{1}(x)^T \lambda^1 \\
\vdots \\
\nabla_{x_N} \theta_ N(x) + \Jac g^{N}(x)^T \lambda^N \\
\end{matrix}
\right)
\in \R^{n}
\txtm{and}
G(x) =
\left(
\begin{matrix}
g^1(x) \\
\vdots \\
g^N(x) \\
\end{matrix}
\right)
\in \R^{m},
$$
with $\Jac g_{i}(x)^T \lambda_i = \sum_{ 1 \leq j \leq m_i } \lambda_{j}^i \nabla_{x_i} g_{j}^i(x) $. The extended KKT system is denoted by eKKT($N, \theta_i, g_i$).
\end{mydef}
Using complementarity function $\phi(a,b)$ (e.g. $\min(a,b)$), we get the following nonsmooth equation
$$
\Phi(z) =
\left(
\begin{matrix}
\tilde L(x, \lambda) \\
\phi_.(-G(x), \lambda) \\
\end{matrix}
\right) = 0 ,
$$
where $\phi_.$ is the component-wise version of the function $\phi$ and $\tilde L$ is the Lagrangian function of the extended system.
The generalized Jacobian is given in Appendix \ref{app:nseq:gencase}.
\subsection{A classic example}
Returning to our example, we define the $\Phi$ as
$$
\Phi(x) =
\left(
\begin{matrix}
2(x_1-2) (x_2-4)^4 + \lambda_1 \\
2(x_2-3) (x_1)^4 + \lambda_2 \\
\phi(\lambda_1, 1- x_1-x_2) \\
\phi(\lambda_2, 2- 2x_1-x_2) \\
\end{matrix}
\right) ,
$$
where $\phi$ denotes a complementarity function.
In \soft{R}, we use
%%% R code
<<argphi, fig=FALSE, echo=TRUE, eval=TRUE>>=
myarg <- list(C=c(2, 3), D=c(4,0))
dimx <- c(1, 1)
#Gr_x_j O_i(x)
grobj <- function(x, i, j, arg)
{
dij <- 1*(i == j)
other <- ifelse(i == 1, 2, 1)
res <- 2*(x[i] - arg$C[i])*(x[other] - arg$D[i])^4*dij
res + 4*(x[i] - arg$C[i])^2*(x[other] - arg$D[i])^3*(1-dij)
}
dimlam <- c(1, 1)
#g_i(x)
g <- function(x, i)
ifelse(i == 1, sum(x[1:2]) - 1, 2*x[1]+x[2]-2)
#Gr_x_j g_i(x)
grg <- function(x, i, j)
ifelse(i == 1, 1, 1 + 1*(i == j))
@
%%%
Note that the triple dot arguments $\dots$ is used to pass arguments to the complementarity function.
Elements of the generalized Jacobian of $\Phi$ have the following form
$$
\partial \Phi(x) =
\left\{
\left(
\begin{matrix}
2(x_2-4)^4 & 8(x_1-2) (x_2-4)^3 & 1 & 0 \\
8(x_2-3) (x_1)^3 & 2(x_1)^4 & 0 & 1 \\
-\phi_b'(\lambda_1, 1- x_1-x_2) & -\phi_b'(\lambda_1, 1- x_1-x_2) & \phi_a'(\lambda_1, 1- x_1-x_2) & 0 \\
-2\phi_b'(\lambda_2, 2- 2x_1-x_2) & - \phi_b'(\lambda_2, 2- 2x_1-x_2) & 0 & \phi_a'(\lambda_2, 2- 2x_1-x_2) \\
\end{matrix}
\right)
\right\} ,
$$
where $\phi_a'$ and $\phi_b'$ denote elements of the generalized gradient of the complementarity function.
The corresponding \soft{R} code is
%%% R code
<<argJacF, fig=FALSE, echo=TRUE, eval=TRUE>>=
#Gr_x_k Gr_x_j O_i(x)
heobj <- function(x, i, j, k, arg)
{
dij <- 1*(i == j)
dik <- 1*(i == k)
other <- ifelse(i == 1, 2, 1)
res <- 2*(x[other] - arg$D[i])^4*dij*dik
res <- res + 8*(x[i] - arg$C[i])*(x[other] - arg$D[i])^3*dij*(1-dik)
res <- res + 8*(x[i] - arg$C[i])*(x[other] - arg$D[i])^3*(1-dij)*dik
res + 12*(x[i] - arg$C[i])^2*(x[other] - arg$D[i])^2*(1-dij)*(1-dik)
}
#Gr_x_k Gr_x_j g_i(x)
heg <- function(x, i, j, k) 0
@
%%%
\subsubsection{Usage example}
Therefore, to compute a generalized Nash equilibrium, we use
%%% R code
<<testGNE, fig=FALSE, echo=TRUE, eval=TRUE>>=
set.seed(1234)
z0 <- rexp(sum(dimx)+sum(dimlam))
GNE.nseq(z0, dimx, dimlam, grobj=grobj, myarg, heobj=heobj, myarg,
constr=g, grconstr=grg, heconstr=heg,
compl=phiFB, gcompla=GrAphiFB, gcomplb=GrBphiFB, method="Newton",
control=list(trace=0))
@
%%%
Recalling that the true GNEs are
%%% R code
<<trueGNE, fig=FALSE, echo=TRUE, eval=TRUE>>=
#list of true GNEs
trueGNE <- rbind(c(2, -2, 0, 5*2^5),
c(-2, 3, 8, 0),
c(0, 1, 4*3^4, 0),
c(1, 0, 2^9, 6))
colnames(trueGNE) <- c("x1", "x2", "lam1", "lam2")
rownames(trueGNE) <- 1:4
print(trueGNE)
@
%%%
\subsubsection{Localization of the GNEs}
On figure \ref{GNEs}, we draw contour plots of the function $\frac{1}{2} || \Phi(z) ||^2$ with respect to $x_1$ and $x_2$, given $\lambda_1$ and $\lambda_2$. The second figure \ref{initpoint} just plots the initial points and the 6 GNEs.
\begin{figure}[htb!]
\begin{center}
\subfloat[The 4 GNEs]{ \includegraphics[width=.6\textwidth]{img/4GNEPlots} \label{GNEs} }
\subfloat[The 6 initial points]{ \includegraphics[width=.4\textwidth]{img/4GNEinitialPoints} \label{initpoint} }
\caption{Contour plots of the norm of $\Phi$}
\label{4GNE}
\end{center}
\end{figure}
\subsection{Benchmark of the complementarity functions and the computation methods}
Using the following function, we compare all the different methods with different initial points and different complementarity functions.
We consider the following complementarity functions.
\begin{itemize}
\item $\phi_{Min}(a,b)=\min(a,b)$,
\item $\phi_{FB}(a,b)=\sqrt{a^2+b^2} -(a+b)$,
\item $\phi_{Man}(a,b)=f(|a-b|) - f(a) - f(b)$ and $f(t)=t^3$,
\item $\phi_{LT}(a,b)=(a^q+b^q)^{\frac{1}{q}} -(a+b)$ and $q=4$,
\item $\phi_{KK}(a,b)= (\sqrt{(a-b)^2+2\lambda a b} -(a+b))/(2-\lambda)$ and $\lambda=3/2$.
\end{itemize}
%Firstly, we define a function calling the benchmark function for the five complementarity functions under consideration.
%%%% R code
%<<bench, fig=FALSE, echo=TRUE, eval=FALSE>>=
%wholebench <- function(z0)
%{
%#min function
%resMin <- bench.GNE.nseq(z0, F, JacF, argPhi=list(phi=phiMin), argjac=list(gphia= GrAphiMin, gphib= GrBphiMin), echo=FALSE)
%
%#FB function
%resFB <- bench.GNE.nseq(z0, F, JacF, argPhi=list(phi=phiFB), argjac=list(gphia= GrAphiFB, gphib= GrBphiFB), echo=FALSE)
%
%#Mangasarian function
%resMan <- bench.GNE.nseq(z0, F, JacF, argPhi=list(phi=phiMan, f=function(t) t^3), argjac=list(gphia= GrAphiMan, gphib= GrBphiMan, fprime=function(t) 3*t^2), echo=FALSE, control=list(maxit=200))
%
%#LT function
%resLT <- bench.GNE.nseq(z0, F, JacF, argPhi=list(phi=phiLT, q=4), argjac=list(gphia= GrAphiLT, gphib= GrBphiLT, q=4))
%
%#KK function
%resKK <- bench.GNE.nseq(z0, F, JacF, argPhi=list(phi=phiKK, lambda=3/2), argjac=list(gphia= GrAphiKK, gphib= GrBphiKK, lambda=3/2))
%
%list(resMin=resMin, resFB=resFB, resMan=resMan, resLT=resLT, resKK=resKK)
%}
%@
%%%%
%Then the following call give us a list of result tables.
%%%% R code
%<<benchcall, fig=FALSE, echo=TRUE, eval=FALSE>>=
%initialpt <- cbind(c(4, -4), c(-4, 4), c(3, 0), c(0, 3), c(-1, -1), c(0, 0))
%mytablelist <- list()
%for(i in 1: NCOL(initialpt))
%{
% z0 <- c(initialpt[, i], 1, 1)
% mybench <- wholebench(z0)
%
% cat("z0", z0, "\n")
%
% mytable12 <- data.frame(method=mybench[[1]]$compres[, 1],
% round(
% cbind(mybench[[1]]$compres[,c(-1, -4)], mybench[[2]]$compres[,c(-1, -4)])
% , 3) )
%
% mytable35 <- data.frame(method=mybench[[1]]$compres[, 1],
% round(
% cbind(mybench[[3]]$compres[,c(-1, -4)], mybench[[5]]$compres[,c(-1, -4)])
% , 3) )
%
% mytablelist <- c(mytablelist, z0=list(z0), MINFB=list(mytable12), MANKK=list(mytable35))
%}
%@
%%%%
%Note that one result table given by the function \code{bench.GNE.nseq} reports the computation results for 10 methods given an initial point and a complementarity function. Below an example
%%%% R code
%<<benchessai, fig=FALSE, echo=TRUE, eval=TRUE>>=
%z0 <- c(-4, 4, 1, 1)
%bench.GNE.nseq(z0, F, JacF, argPhi=list(phi=phiMin), argjac=list(gphia= GrAphiMin, gphib= GrBphiMin), echo=FALSE)$compres
%@
%%%%
%The following subsections report the computation for 4 complementarity functions, the Luo-Tseng being discarded due to non convergence. We also remove the final estimates $z_n$ when the method has not converged, $|| \Phi(z_n) ||^2 \neq 0$. Tables are put in appendix, except the first one.
\subsubsection{Initial point $z_0 = (4, -4, 1, 1)$}
We work on the initial point $z_0 = (4, -4, 1, 1)$, close the GNE $(2, -2, 0, 160)$.
Clearly, we observe the Mangasarian complementarity function $\phi_{Man}$ does not converge except in the pure Newton method, for which the sequence converges to $(-2, 3, 8, 0)$ quite far from the initial point. So the ``Man'' sequence converged by a chance! For $\phi_{Min}$ function, when it converges, the GNEs found are $(2, -2, 0, 160)$ or $(1, 0, 512, 6)$. $\phi_{FB}$ and $\phi_{KK}$ associated sequences converge mostly to $(2, -2, 0, 160)$. In terms of function/Jacobian calls, $\phi_{FB}$ is significantly better when used with the Newton scheme.
\begin{table}[htb!]
\begin{scriptsize}
\begin{tabular}{l|ccccccc|ccccccc}
& \multicolumn{7}{c|}{$\phi_{Min}(a,b)=\min(a,b)$} & \multicolumn{7}{c}{$\phi_{FB}(a,b)=\sqrt{a^2+b^2} -(a+b)$} \\
& fctcall & jaccall & $x_1$ & $x_2$ & $\lambda_1$ & $\lambda_2$ & $||\Phi(z)||$ & fctcall & jaccall & $x_1$ & $x_2$ & $\lambda_1$ & $\lambda_2$ & $||\Phi(z)||$ \\
\hline
Newton - pure & 5 & 5 & 1 & 0 & 512 & 6 & 0 & 6 & 6 & 2 & -2 & 0 & 160 & 0 \\
Newton - geom. LS & 343 & 67 & 1 & 0 & 512 & 6 & 0 & 6 & 6 & 2 & -2 & 0 & 160 & 0 \\
Newton - quad. LS & 292 & 100 & & & & & 2 & 6 & 6 & 2 & -2 & 0 & 160 & 0 \\
Newton - Powell TR & 64 & 57 & 1 & 0 & 512 & 6 & 0 & 12 & 6 & 2 & -2 & 0 & 160 & 0 \\
Newton - Dbl. TR & 63 & 58 & 1 & 0 & 512 & 6 & 0 & 12 & 6 & 2 & -2 & 0 & 160 & 0 \\
Broyden - pure & 100 & 1 & & & & & 164 & 100 & 1 & & & & & 188 \\
Broyden - geom. LS & 403 & 6 & 1 & 0 & 512 & 6 & 0 & 1079 & 26 & & & & & 2 \\
Broyden - quad. LS & 291 & 6 & & & & & 1 & 467 & 3 & & & & & 1 \\
Broyden - Powell TR & 22 & 2 & 2 & -2 & 0 & 160 & 0 & 114 & 2 & & & & & 1 \\
Broyden - Dbl. TR & 20 & 2 & 2 & -2 & 0 & 160 & 0 & 115 & 2 & & & & & 1 \\
\hline
& fctcall & jaccall & $x_1$ & $x_2$ & $\lambda_1$ & $\lambda_2$ & $||\Phi(z)||$ & fctcall & jaccall & $x_1$ & $x_2$ & $\lambda_1$ & $\lambda_2$ & $||\Phi(z)||$ \\
\hline
Newton - pure & 113 & 113 & -2 & 3 & 8 & 0 & 0 & 48 & 48 & 0 & 1 & 325 & 0 & 0 \\
Newton - geom. LS & 203 & 25 & & & & & 33 & 727 & 100 & & & & & 2 \\
Newton - quad. LS & 91 & 27 & & & & & 37 & 85 & 39 & 2 & -2 & 0 & 160 & 0 \\
Newton - Powell TR & 75 & 67 & & & & & 3 & 152 & 100 & 0 & 1 & 309 & 0 & 0 \\
Newton - Dbl. TR & 62 & 53 & & & & & 3 & 147 & 100 & 0 & 1 & 304 & 0 & 0 \\
Broyden - pure & 200 & 1 & & & & & 506 & 49 & 1 & 1 & 0 & 512 & 6 & 0 \\
Broyden - geom. LS & 167 & 6 & & & & & 82 & 29 & 3 & 2 & -2 & 0 & 160 & 0 \\
Broyden - quad. LS & 86 & 5 & & & & & 78 & 20 & 3 & 2 & -2 & 0 & 160 & 0 \\
Broyden - Powell TR & 215 & 14 & & & & & 3 & 28 & 2 & 2 & -2 & 0 & 160 & 0 \\
Broyden - Dbl. TR & 246 & 15 & & & & & 3 & 29 & 2 & 2 & -2 & 0 & 160 & 0 \\
\hline
& \multicolumn{7}{c|}{$\phi_{Man}(a,b)=f(|a-b|) - f(a) - f(b)$ and $f(t)=t^3$} &
\multicolumn{7}{c}{$\phi_{KK}(a,b)= (\sqrt{(a-b)^2+2\lambda a b} -(a+b))/(2-\lambda)$ and $\lambda=3/2$} \\
\end{tabular}
\end{scriptsize}
\caption{With initial point $z_0 = (4, -4, 1, 1)$ close to $(2, -2, 0, 160)$}
\label{bench4m411}
\end{table}
\subsubsection{Initial point $z_0 = (-4, 4, 1, 1)$}
We work on the initial point $z_0 = (-4, 4, 1, 1)$, close the GNE $(-2, 3, 8, 0)$.
Again, we observe the Mangasarian complementarity function $\phi_{Man}$ does not converge. All other sequences converge the closest GNE $(-2, 3, 8, 0)$. $\phi_{Min}$ sequence with Newton scheme is particularly good, then comes $\phi_{FB}$ and finally $\phi_{KK}$.
\subsubsection{Initial point $z_0 = (3, 0, 1, 1)$}
We work on the initial point $z_0 = (3, 0, 1, 1)$ close to the GNE $(1, 0, 512, 6)$. As always, the ``Man'' sequence converges by chance with the pure Newton method to a GNE $(-2, 3, 8, 0)$. Otherwise the other sequences, namely ``Min'', ``FB'' and ``KK'' converges to the expected GNE. As the previous subsection, Broyden updates of the Jacobian is less performant than the true Jacobian (i.e. Newton scheme). The convergence speed order is preserved.
\subsubsection{Initial point $z_0 = (0, 3, 1, 1)$}
We work on the initial point $z_0 = (0, 3, 1, 1)$ close to the GNE $(0, 1, 324, 0)$. As always, the ``Man'' sequence converges by chance with the pure Newton method to a GNE $(-2, 3, 8, 0)$. Others sequences have difficulty to converge the closest GNE. Local methods (i.e. pure) find the GNE $(0, 1, 324, 0)$, while global version converges to $(1, 0, 512, 6)$. It is logical any method will have difficulty to choose between these two GNEs, because they are close.
\subsubsection{Initial point $z_0 = (-1, -1, 1, 1)$}
We work on the initial point $z_0 = (-1, -1, 1, 1)$ equidistant to the GNEs $(0, 1, 324, 0)$ and $(1, 0, 512, 6)$. Despite being closer to these GNEs, the pure Newton version of the ``Man'' sequence converges unconditionally to the GNE $(-2, 3, 8, 0)$. All other sequences converges to the GNE $(0, 1, 324, 0)$ except for the Broyden version of the ``KK'' sequence, converging to the farthest GNEs. In terms of function calls, the Newton line search version of the ``Min'' sequence is the best, followed by the Newton trust region version of the ``FB'' sequence.
\subsubsection{Initial point $z_0 = (0, 0, 1, 1)$}
We work on the initial point $z_0 = (0, 0, 1, 1)$ equidistant to the GNEs $(0, 1, 324, 0)$ and $(1, 0, 512, 6)$. Both the ``Man'' and the ``Min'' sequences do not converge. The ``Min'' sequence diverges because the Jacobian at the initial point is exactly singular. Indeed, we have
%%% R code
<<singjac, fig=FALSE, echo=TRUE, eval=TRUE>>=
z0 <- c(0, 0, 1, 1)
jacSSR(z0, dimx, dimlam, heobj=heobj, myarg, constr=g, grconstr=grg,
heconstr=heg, gcompla=GrAphiMin, gcomplb=GrBphiMin)
@
%%%
For the ``FB'' and ``KK'' sequences, we do not have this problem.
%%% R code
<<singjac2, fig=FALSE, echo=TRUE, eval=TRUE>>=
jacSSR(z0, dimx, dimlam, heobj=heobj, myarg, constr=g, grconstr=grg,
heconstr=heg, gcompla=GrAphiFB, gcomplb=GrBphiFB)
jacSSR(z0, dimx, dimlam, heobj=heobj, myarg, constr=g, grconstr=grg,
heconstr=heg, gcompla=GrAphiKK, gcomplb=GrBphiKK, argcompl=3/2)
@
%%%
So the sequence converge to a GNE, either $(0, 1, 324, 0)$ or $(-2, 3, 8, 0)$. Again the ``KK'' sequence converges faster.
\subsubsection{Conclusions}
In conclusion to this analysis with respect to initial point, the computation method and the complementarity function, we observe the strong difference in terms of convergence, firstly and in terms of convergence speed. Clearly the choice of the complementarity function is crucial, the Luo-Tseng and the Mangasarian are particularly inadequate in our example. Regarding the remaining three complementarity functions (the minimum, the Fisher-Burmeister and the Kanzow-Kleinmichel functions) generally converge irrespectively of the computation method. However, the ``KK'' sequences are particularly efficient and most of the time the Newton trust region method is the best in terms of function/Jacobian calls.
\subsection{Special case of shared constraints with common multipliers}
Let $h: \R^{n} \mapsto \R^{m_l}$ be a constraint function shared by all players.
The total constraint function and the Lagrange multiplier for the $i$th player is
$$
\tilde g^i(x) =
\left( \begin{matrix}
g^i(x) \\
h(x)
\end{matrix} \right)
\txtm{and}
\tilde \lambda^i =
\left( \begin{matrix}
\lambda^i \\
\mu
\end{matrix} \right),
$$
where $\mu \in \R^l$.
This could fall within the previous framework, if we have not required the bottom part of $\tilde \lambda^i$ to be common among all players.
The Lagrangian function of the $i$th player is given by
$$
L ^i(x, \lambda^i, \mu) = O_i(x) + \sum_{k=1}^{m_i} g^i_k(x) \lambda_k^i + \sum_{p=1}^l h_p(x) \mu_p.
$$
\begin{mydef}[eKKTc]
For the $N$ optimization subproblems for the functions $\theta_i: \R^{n} \mapsto \R$, with constraints $g_i: \R^{n} \mapsto \R^{m_i}$ and shared constraint $h:\R^n \mapsto \R^l$, the KKT conditions can be regrouped such that
there exists $\lambda \in \R^m$ and
$$
\bar L(x, \lambda, \mu) = 0 \txtm{and} 0 \leq \lambda, 0 \leq \mu \perp g(x) \leq 0,
$$
where $L$ and $G$ are given by
$$
\bar L(x, \lambda, \mu) =
\left(
\begin{matrix}
\nabla_{x_1} L ^1(x, \lambda^1, \mu) \\
\vdots \\
\nabla_{x_I} L ^I(x, \lambda^I, \mu) \\
\end{matrix}
\right)
\in \R^{n}
\txtm{and}
g(x) =
\left(
\begin{matrix}
g^1(x) \\
\vdots \\
g^N(x) \\
h(x)
\end{matrix}
\right)
\in \R^{m}.
$$
The extended KKT system is denoted by eKKTc($N, \theta_i, g_i, h$).
\end{mydef}
The generalized Jacobian is given in Appendix \ref{app:nseq:jointcase}.
%________________________________________________________________________
\section{Constrained-equation reformulation of the KKT system}
%________________________________________________________________________
This subsection aims to present methods specific to solve constrained (nonlinear) equations, first proposed by \cite{kanzowfacchetal11} in the GNEP context.
The root function $H: \R^n \times \R^{2m} \mapsto \R^n \times \R^{2m}$ is defined as
$$
H(x, \lambda, w) =
\left(
\begin{matrix}
\tilde L(x, \lambda) \\
g(x) + w \\
\lambda \circ w
\end{matrix}
\right) ,
$$
where the dimensions $n, m$ correspond to the GNEP notation ($ \lambda = (\lambda^1, \dots, \lambda^N)$) and $(a, \bar \sigma)$ is given by $((0_{n}, \II_{m}), 1)$. The potential function is given by
$$
p\left(u \right) = \zeta \log\left( ||x||_2^2 + ||\lambda ||_2^2+ ||w||_2^2 \right) -
\sum_{k=1}^{m} \log (\lambda_{k}) - \sum_{k=1}^{m} \log (w_{k}),
$$
where $u=(x, \lambda, w) \in \R^n \times \R_{+}^{m} \times \R_{+}^{m}$
and $\zeta > m$.
The Jacobian is given in Appendix \ref{app:ceq:gencase}.
When there is a constraint function $h$ shared by all players, the root function is given by
$$
\widetilde H(x, \tilde \lambda, \tilde w) =
\left(
\begin{matrix}
\bar L(x, \tilde \lambda) \\
\tilde g(x) + \tilde w \\
\tilde \lambda \circ \tilde w
\end{matrix}
\right) ,
\txtm{with}
\tilde \lambda =
\left(
\begin{matrix}
\lambda^1 \\
\vdots \\
\lambda^N \\
\mu
\end{matrix}
\right)
,
\tilde w =
\left(
\begin{matrix}
w^1 \\
\vdots \\
w^N \\
y
\end{matrix}
\right)
\txtm{and}
\tilde g(x) =
\left(
\begin{matrix}
g^1(x) \\
\vdots \\
g^N(x) \\
h(x)
\end{matrix}
\right) .
$$
The Jacobian is given in Appendix \ref{app:ceq:jointcase}.
\subsubsection{A classic example}
Using the classic example presented above, we get
Therefore, to compute a generalized Nash equilibrium, we use
%%% R code
<<testGNEceq, fig=FALSE, echo=TRUE, eval=TRUE>>=
z0 <- 1+rexp(sum(dimx)+2*sum(dimlam))
GNE.ceq(z0, dimx, dimlam, grobj=grobj, myarg, heobj=heobj, myarg,
constr=g, grconstr=grg, heconstr=heg,
method="PR", control=list(trace=0))
@
%%%
%________________________________________________________________________
\section{GNEP as a fixed point equation or a minimization problem}
%________________________________________________________________________
We present another reformulation of the GNEP, which was originally introduced in the context of standard Nash equilibrium problem.
The fixed-point reformulation arise from two different problem: either using the Nikaido-Isoda (NI) function
or the quasi-varational inequaltiy (QVI) problem. We present both here.
We also present a reformulation of the GNEP through a minimization problem.
The gap minimization reformulation is closed linked to the fixed-equation reformulation.
\subsection{NI reformulation}
We define the Nikaido-Isoda function as the function $\psi$ from $\R^{2n}$ to $\R$ by
\begin{equation}
\psi(x, y) = \sum_{\nu = 1}^N [ \theta(x_\nu, x_{-\nu}) - \theta(y_\nu, x_{-\nu}) ].
\label{eq:NIF}
\end{equation}
This function represents the unilateral player improvement of the objective function between actions $x$ and $y$.
Let $\hat V$ be the gap function
$$
\hat V(x) = \underset{ y \in X(x) }{\sup}~ \psi(x,y).
$$
Theorem 3.2 of \cite{facchkanz09b} shows the relation between GNEPs and the Nikaido-Isoda function.
If objective functions $\theta_i$ are continuous, then $x^\star$ solves the GNEP if and only if $x^\star$
is a minimimum of $\hat V$ such that
\begin{equation}
\hat V(x) = 0
\txtm{and}
x \in X(x),
\label{eq:NIF:general}
\end{equation}
where the set $X(x) = \{y \in \R^n, \forall i, g^i(y_i, x_{-i}) \leq 0 \}$ and $\hat V$ defined in (\ref{eq:NIF}). Furthermore, the function $\hat V$ is such that $\forall x \in X(x), \hat V(x) \geq 0$.
There is no particular algorithm able to solve this problem for a general constrained set $X(x)$. But a simplification will occur in a special case: the jointly convex case.
\subsection{QVI reformulation}
Assuming the differentiability of objective functions, the GNEP in (\ref{eq:GNEP:sub}) can be reformulated as a QVI problem
\begin{equation}
\forall y \in X(x), (y-x)^T F(x) \geq 0,
\txtm{with}
F(x) =
\left(
\begin{matrix}
\nabla_{x_1} \theta_1(x) \\
\vdots \\
\nabla_{x_N} \theta_N(x) \\
\end{matrix}
\right),
\label{eq:QVI:general}
\end{equation}
and a constrained set $X(x) = \{y \in \R^n, \forall i,~ g^i(y_i, x_{-i}) \leq 0 \}$.
The following theorem states the equivalence between the GNEP and the QVI, see Theorem 3.3 of \cite{facchkanz09b}.
\cite{fukubo10} propose to refomulate the QVI problem as a minimization of a (regularized) gap function.
The regularized gap function of the QVI (\ref{eq:QVI:general}) is
$$
V_{QVI}(x) = \underset{y\in X(x)}{\sup}~\psi_{\alpha VI}(x, y),
$$
where $\psi_{\alpha VI}$ is given by
\begin{equation}
\psi_{\alpha VI}(x, y) = \left(
\begin{matrix}
\nabla_{x_1} \theta_1(x) \\
\vdots \\
\nabla_{x_N} \theta_N(x) \\
\end{matrix}
\right)^T (x-y) - \frac{\alpha}{2} ||x-y||^2,
\label{eq:psiVI}
\end{equation}
for a regularization parameter $\alpha>0$.
Note that the minimisation problem appearing in the definition of $V_{QVI}$ is a quadratic problem.
The theorem of \cite{fukubo10} given below shows the equivalence a minimizer of $V_{QVI}$ and the GNEP.
For each $x\in X(x)$, the regularized gap function $V_{QVI}$ is non-negative $V_{QVI}(x) \geq 0$.
If objective functions are continuous, then $x^\star$ solves the GNEP if and only if $x^\star$ is a minimum of $V_{QVI}$ such that
\begin{equation}
V_{QVI}(x^\star)=0
\text{ and }
x^\star \in X(x^\star).
\label{eq:gapVI:general}
\end{equation}
\subsection{The jointly convex case}
In this subsection, we present reformulations for a subclass of GNEP called jointly convex case.
Firstly, the jointly convex setting requires that the constraint function is common to all players $g^1=\dots =g^N= g$.
Then, we assume, there exists a closed convex subset $X \subset \R^n$ such that for all player $i$,
$$
\{y_i \in \R^{n_i}, g(y_i, x_{-i}) \leq 0 \}
=
\{y_i \in \R^{n_i}, (y_i, x_{-i}) \in X \} .
$$
In our context parametrized context, the jointly convex setting requires that the constraint function is common to all players $g^1=\dots =g^N= g$ and
\begin{equation}
X= \{x \in \R^{n}, \forall i=1,\dots, N, ~ g(x_i, x_{-i}) \leq 0 \}
\label{eq:feasibleset:joint}
\end{equation}
is convex.
We consider the following example based on the previous example.
Let $N=2$. The objective functions are defined as
$$
\theta_1(x) = (x_1-2)^2 (x_2-4)^4 \txtm{and} \theta_2(x) = (x_2-3)^2 (x_1)^4,
$$
for $x\in \R^2$, while the constraint function $g(x)=(g_1(x), g_2(x))$ is given by
$$
g_1(x) = x_1+x_2-1 \leq 0 \txtm{and} g_2(x) = 2x_1+x_2-2 \leq 0.
$$
Objective functions can be rewritten as $\theta_i(x) = (x_i - c_i)^2 (x_{-i} - d_i)^4$, with $c = (2, 3)$ and
$d=(4,0)$.
First-order and second-order derivatives are given in the introduction.
and
$$
\nabla_j g_1(x) = 1
\txtm{and}
\nabla_j g_2(x) = 2 \delta_{j1} + \delta_{j2}.
$$
%%% R code
<<testNI, fig=FALSE, echo=TRUE, eval=TRUE>>=
#O_i(x)
obj <- function(x, i, arg)
(x[i] - arg$C[i])^2*(x[-i] - arg$D[i])^4
#g(x)
gtot <- function(x)
sum(x[1:2]) - 1
#Gr_x_j g(x)
jacgtot <- function(x)
cbind(1, 1)
z0 <- rexp(sum(dimx))
GNE.fpeq(z0, dimx, obj, myarg, grobj, myarg, heobj, myarg, gtot, NULL,
jacgtot, NULL, silent=TRUE, control.outer=list(maxit=10),
problem="NIR", merit="NI")
GNE.fpeq(z0, dimx, obj, myarg, grobj, myarg, heobj, myarg, gtot, NULL,
jacgtot, NULL, silent=TRUE, control.outer=list(maxit=10),
problem="VIR", merit="VI")
@
%%%
%**************
\subsubsection{NIF formulation for the jointly convex case}
In the jointly convex case, the gap function becomes
$$
V_{\alpha NI}(x)= \underset{ y \in X }{\max}~ \psi_{\alpha NI}(x,y).
$$
Since $y\mapsto \psi_{\alpha NI}(x,y)$ is strictly concave as long as objective functions $\theta_i$ are player-convex, the supremum is replaced by the maximum.
Using two regularization parameters $0<\alpha<\beta$, the constrained minimization problem can be further simplified to the unconstrained problem
\begin{equation}
\underset{x\in\R^n}{\min} V_{\alpha NI}(x)-V_{\beta NI}(x),
\label{eq:gapNIab:joint}
\end{equation}
see \cite{heusingerkanzow}.
Furthermore, a generalized equilibrium also solves a fixed-point equation, see Property 3.4 of \cite{heusingerkanzow}.
Assuming $\theta_i$ and $g$ are C\expo{1} functions and $g$ is convex and $\theta_i$ player-convex. $x^\star$ is a normalized equilibrium if and only if $x^\star$ is a fixed-point of the function
\begin{equation}
x \mapsto y_{NI}(x) = \underset{y\in X}{\arg\max}~ \psi_{\alpha NI}(x, y).
\label{eq:fpNIa:joint}
\end{equation}
where $X$ is defined in (\ref{eq:feasibleset:joint}) and $\psi_{\alpha NI}$ called the regularized Nikaido-Isoda function is defined as
\begin{equation}
\psi_{\alpha NI}(x, y) = \sum_{\nu = 1}^N [ \theta_\nu(x_\nu, x_{-\nu}) - \theta_\nu(y_\nu, x_{-\nu}) ] - \frac{\alpha}{2} ||x-y||^2,
\label{eq:psiregNI}
\end{equation}
for a regularization parameter $\alpha>0$.
%**************
\subsubsection{QVI formulation for the jointly convex case}
The regularized gap function also simplifies and becomes
$$
V_{\alpha VI}(x) = \underset{y\in X}{\sup}~\psi_{\alpha VI}(x, y),
$$
where $\psi_{\alpha VI}$ is in (\ref{eq:psiVI}).
Constrained equation (\ref{eq:gapVI:general}) simplifies to a nonlinear equation
$V_{\alpha VI}(x^\star)=0$ and $x^\star \in X$.
Using two regularization parameters $0<\alpha<\beta$, $x^\star$ is the global minimum of the unconstrained minimization problem
\begin{equation}
\underset{x\in\R^n}{\min} V_{\alpha VI}(x)-V_{\beta VI}(x).
\label{eq:gapVIab:joint}
\end{equation}
Furthermore, the VI reformulation leads to a fixed-point problem as shown in the following proposition.
Assuming that $\theta_i$ and $g$ are C\expo{1} functions, $g$ is convex and $\theta_i$ player-convex, then $x^\star$ solves the VI (\ref{eq:VI}) if and only if $x^\star$ is a fixed point of the function
\begin{equation}
x \mapsto y_{VI}(x) = \underset{y\in X}{\arg\max}~ \psi_{\alpha VI}(x, y).
\label{eq:fpVIa:joint}
\end{equation}
where $X$ is defined in (\ref{eq:feasibleset:joint}) and $\psi_{\alpha VI}$ is defined in (\ref{eq:psiVI}).
%________________________________________________________________________
\section{List of examples}
%________________________________________________________________________
\subsection{Example of \cite{facchineietal07}}
We consider a two-player game defined by
$$
O_1(x) = (x_1-1)^2
\txtm{and}
O_2(x) = (x_2-1/2)^2,
$$
with a shared constraint function
$$
g(x) = x_1 + x_2 - 1 \leq 0.
$$
Solutions are given by $(\alpha, 1-\alpha)$ with $\alpha \in [1/2, 1]$ with Lagrange multipliers given by $\lambda_1 = 2 - 2\alpha$ and $\lambda_2 = 2\alpha - 1$.
But there is a unique normalized equilibrium for which $\lambda_1=\lambda_2=1/2$.
The nonsmooth reformulation of the KKT system uses the following terms
$$
\nabla_1 O_1(x) = 2(x_1-1),
\nabla_2 O_2(x) = 2(x_2-1/2),
\txtm{and}
\nabla_1 g(x) = \nabla_2 g(x) = 1.
$$
and
$$
\nabla_i^2 O_i(x) = 2,
\nabla_j \nabla_k O_i(x) = 0,
\txtm{and}
\nabla_j \nabla_k g(x) = 0.
$$
\subsection{The Duopoly game from \cite{krawuryasev00}}
We consider a two-player game defined by
$$
O_i(x) = - (d- \lambda -\rho(x_1+x_2))x_i,
$$
with
$$
g_i(x) = -x_i \leq 0,
$$
where $d = 20$, $\lambda = 4$, $\rho = 1$.
Derivatives are given by
$$
\nabla_j O_i(x) = -( -\rho x_i + (d- \lambda -\rho(x_1+x_2))\delta_{ij} )
\txtm{and}
\nabla_j g_i(x) = - \delta_{ij},
$$
and
$$
\nabla_k \nabla_j O_i(x) = -( -\rho \delta_{ik} - \rho\delta_{ij})
\txtm{and}
\nabla_k \nabla_j g_i(x) = 0.
$$
There is a unique solution given by $x^\star = (d-\lambda)/(3\rho)$.
\subsection{The River basin pollution game from \cite{krawuryasev00}}
We consider a two-player game defined by
$$
O_i(x) = - (d_1 - d_2 (x_1+x_2+x_3) - c_{1i} - c_{2i} x_i)x_i,
$$
and
$$
g(x) =
\left( \begin{matrix}
\sum\limits_{l=1}^3 u_{l1} e_l x_l - K_1 \\
\sum\limits_{l=1}^3 u_{l2} e_l x_l - K_2
\end{matrix} \right).
$$
Derivatives are given by
$$
\nabla_j O_i(x) = - ( - d_2 - c_{2i} \delta_{ij})x_i - (d_1 - d_2 (x_1+x_2+x_3) - c_{1i} - c_{2i} x_i)\delta_{ij}
\txtm{and}
\nabla_j g(x) =
\left( \begin{matrix}
u_{j1} e_j \\
u_{j2} e_j
\end{matrix} \right),
$$
and
$$
\nabla_k \nabla_j O_i(x) = -( - d_2\delta_{ik} - d_2\delta_{ij} - 2 c_{2i} \delta_{ij}\delta_{ik})
\txtm{and}
\nabla_k \nabla_j g(x) =
\left( \begin{matrix}
0 & 0 \\
0 & 0
\end{matrix} \right).
$$
\newpage
\bibliographystyle{agsm}
\bibliography{GNE-howto}
%________________________________________________________________________%________________________________________________________________________
\appendix
%%________________________________________________________________________