extension of gams for complementarity problems arising in applied economic analysis

26
ELSEVIER Journal of Economic Dynamics and Control 19 (1995) 1299-1324 Extension of GAMS for complementarity problems arising in applied economic analysis Thomas F. Rutherford Department of Economics, Universib of Colorado, Boulder, CO 80309-0256, USA (Received December 1992; final version received September 1994) Abstract This paper introduces new features of the GAMS modeling language which have been developed for solving nonlinear complementarity problems. The paper defines the ‘mixed complementarity problem’ (MCP) and its various manifestations. Complementarity formulations for three economic models are developed, and computational benchmarks are presented for two large-scale MCP solvers. Finally, procedures for local sensitivity analysis are described. Key words: Complementarity; Computational economics JEL clus.sijcation: C63; C68; C72; C87 1. Introduction GAMS (General Algebraic Modelling System) is a computer language which was originally developed to assist economists at the World Bank in the quanti- tative analysis of economic policy questions (Meeraus, 1983; Brooke, Kendrick, and Meeraus, 1987). At the time of its conception and initial development, linear This research was supported in part by the Canadian Natural Science Research Council under operating grant T306Al. Research support for related empirical work on issues related to global climate change and international trade has been provided by the Electric Power Research Institute Alex Meeraus and Erwin Kalvelagen have been most helpful in the development of the software. Stephan Felder, Alan Manne, Paul Preckel, and several anonymous referees provided helpful comments on earlier drafts. Charles Rossman provided assistance in GAUSS programming. The author remains responsible for bugs remaining in the software and documentation. 016%1889/95/$09.50 0 1995 Elsevier Science B.V. All rights reserved SSDI 016518899400831 2

Upload: darwin-perez

Post on 30-Sep-2015

277 views

Category:

Documents


5 download

DESCRIPTION

Área Gestión de la Producción

TRANSCRIPT

  • ELSEVIER Journal of Economic Dynamics and Control

    19 (1995) 1299-1324

    Extension of GAMS for complementarity problems arising in applied economic analysis

    Thomas F. Rutherford Department of Economics, Universib of Colorado, Boulder, CO 80309-0256, USA

    (Received December 1992; final version received September 1994)

    Abstract

    This paper introduces new features of the GAMS modeling language which have been developed for solving nonlinear complementarity problems. The paper defines the mixed complementarity problem (MCP) and its various manifestations. Complementarity formulations for three economic models are developed, and computational benchmarks are presented for two large-scale MCP solvers. Finally, procedures for local sensitivity analysis are described.

    Key words: Complementarity; Computational economics JEL clus.sijcation: C63; C68; C72; C87

    1. Introduction

    GAMS (General Algebraic Modelling System) is a computer language which was originally developed to assist economists at the World Bank in the quanti- tative analysis of economic policy questions (Meeraus, 1983; Brooke, Kendrick, and Meeraus, 1987). At the time of its conception and initial development, linear

    This research was supported in part by the Canadian Natural Science Research Council under operating grant T306Al. Research support for related empirical work on issues related to global climate change and international trade has been provided by the Electric Power Research Institute Alex Meeraus and Erwin Kalvelagen have been most helpful in the development of the software. Stephan Felder, Alan Manne, Paul Preckel, and several anonymous referees provided helpful comments on earlier drafts. Charles Rossman provided assistance in GAUSS programming. The author remains responsible for bugs remaining in the software and documentation.

    016%1889/95/$09.50 0 1995 Elsevier Science B.V. All rights reserved SSDI 016518899400831 2

  • 1300 T.F. Rutherford / Journal of Economic Dynamics and Control 19 (1995) 1299-1324

    programming (LP) was the standard framework in which market equilibrium models were constructed. Subsequently, solution algorithms and codes for general nonlinear programming representations became more common and alternative economic paradigms were developed. During this time, GAMS was extended from an LP matrix generator to accommodate general nonlinear functions. GAMS was awarded the Computer Science Technical Section prize by the Operations Research Society of America in 1987. The release of a PC- based version of GAMS in 1988 lead to its wide-spread recognition as an effective tool for the development of general purpose large-scale mathematical programming models.

    This paper introduces new features of the GAMS modelling language which permit formulating economic equilibrium models as systems of nonlinear equa- tions, complementarity problems or variational inequalities. These extensions accommodate market and game-theoretic equilibrium models which are not easily studied in an optimization context. These formulations are here referred to as mixed complementarity problems (MCPs), reflecting the fact that they may incorporate mixtures of equations and inequalities.2 The MCP is a natural format for expressing a variety of economic models for both markets and games. Computa- tional evidence suggests that algorithms for solving MCPs are relatively reliable and efficient, particularly for models which are not natural optimization problems.

    The development of the GAMS/MCP modelling format was motivated by recent theoretical and practical developments in algorithms for nonlinear comp- lementarity problems and variational inequalities. Some of these algorithms are extensions of classical methods for nonlinear equations. Others exploit the variational structure which is characteristic of many economic equilibrium models (see Dafermos, 1983). The most recent techniques are based on ideas from interior-point algorithms for linear programming (Kojima, Megiddo, Noma, and Yoshise, 1991). A survey of developments in the theory and applica- tion of these methods is provided by Harker and Pang (1990).

    At this time, two large-scale solvers are available through GAMS/MCP. MILES (a Mixed Inequality and nonLinear Equation Solver) employs a modified Newton algorithm which was originally developed for applied general equilib- rium modelling (see Rutherford, 1987, 1993; Anstreicher, Lee, and Rutherford, 1992). PATH is a recently developed solver based on a promising new path- following procedure (Dirkse and Ferris, 1993; Ralph, 1994). Both codes incorpo- rate implicit bounds, mixtures of constrained and unconstrained variables, sparse matrix algebra, and dynamic memory allocation. Both solvers employ the basis factorization package from MINOS 5.4, LUSOL (Gill et al., 1991).

    IA chronology of these developments might include Samuelson (1952), Gale (1960), Takayama and Judge (1971), Goreux and Manne (1973), and Adelman and Robinson (1978).

    van der Laan and Tallman (1985) refer to these as generalized complementarity problems.

  • T.F. Rutherford /Journal of Economic Dynamics and Control 19 (1995) 1299-1324 1301

    MILES executes a generalized Newton algorithm with a backtracking line search. This method is based on an algorithm investigated by Mathiesen (1985) who proposed a modeling format and sequential method for solving economic equilibrium models. Mathiesens method is closely related to algorithms pro- posed by Robinson (1972), Hogan (1975), Eaves (1978), and Josephy (1979). The algorithm executed by PATH is a global Newton method in which the back- tracking line search is replaced by a path search. The algorithms share the same quadratic rate of convergence near a solution, but they may follow different trajectories away from the equilibrium. Because convergence cannot always be guaranteed with either algorithm, it is helpful to have both algorithms available when working with large or difficult problems.

    There are two methods for expressing mixed complementarity problems in GAMS. The first is based on standard GAMS algebra with extended syntax to signify complementarity links between equations and variables. The second method is a GAMS interface for general equilibrium modeling with MPSGE (a Mathematical Programming System for General Equilibrium). MPSGE is a function and Jacobian evaluation program for a broad class of economic models. Nonlinear equations in an MPSGE model are automatically generated from a tabular description of cost and expenditure functions. The MPSGE interface is well suited for a specific class of functions, whereas GAMS/MCP can be applied to any complementarity problem which can be written with standard GAMS algebra. Any MPSGE model can be written in GAMS/MCP but not all GAMS/MCP models can be cast using MPSGE functions.3

    The remainder of this paper is organized as follows. Section 2 defines the general class of mathematical programs which can be cast in an MCP format, Section 3 presents MCP formulations for three models which arise in market equilibrium analysis and game theory and computational benchmarks for MILES and PATH. Section 4 describes how local sensitivity analysis can be conducted within GAMS by using a nonlinear optimizer in conjunction with GAMS/MCP. Section 5 summarizes of GAMS/MCP syntax, and Section 6 pro- vides a brief conclusion. An appendix (available upon request) contains program listings for models described in the paper.

    2. Manifestations of the mixed complementarity problem

    The mixed complementarity problem (MCP) is defined here as:

    Given: f: RN + RN, 1, u E RN,

    Find: z, w, DE RN, (MW

    3The present paper does not present details of the MPSGE syntax. The interested reader is referred to Rutherford (1992b). MPSGE accommodates auxiliary constraints written in GAMS/MCP algebra for economic features which fall outside the standard Arrow-Debreu framework.

  • 1302 TF. Rutherford / Journal of Economic Dynamics and Control 19 (1995) 1299-1324

    s.t.: F(z) - w + v = 0,

    llzltl, w20, v20,

    WT(Z - 1) = 0, UT(U - z) = 0,

    in which - cc I 1 I u I + co. F must be continuously differentiable in order to express a model using GAMS/MCP algebra. Sufficient conditions for conver- gence of a Newton-type algorithm place additional restrictions on F. Once such condition would be that F is a P-function (see Harker and Pang, 1990).4

    This MCP format encompasses a number of special cases, including the following:

    (i) A linear system of equations

    Given: AE R, be R,

    Find: XER,

    s.t.: Ax = b,

    which is represented F(z) = AZ - b.

    (LSYS)

    as an MCP by letting 1= -CO, u = +cq z =x, and

    (ii) A nonlinear system of equations

    Given: f: R + R,

    Find: XERn, (NLSYS)

    s.t.: f (4 = 0,

    which is represented as an MCP by letting 1= -co, u = + cc, z = x, and F(z) = f(z).

    41n practice, it is quite difficult to determine whether the properties of a particular mapping guarantee convergence. For applied work, it is normal practice to first confirm convergence for a small-scale prototype and then proceed to develop a large-scale model.

  • TF. Rutheflord /Journal of Economic Dynamics and Control 19 (1995) 1299-1324 1303

    (iii) A linear complementarity problem

    Given: MER~, qER,

    Find: ZER, WP)

    s.t.: 9 + Mz 2 0, z 2 0, zT(q + Mz) = 0,

    which is represented as an MCP by letting 1 = 0, u = + co, and F(z) = q + Mz.

    (iv) A nonlinear complementarity problem

    Given: f: R + R,

    Find: XER,, (NLCP)

    s.t.: f(z) 2 0, zTf(z) = 0,

    which is represented as an MCP by setting I = 0, u = + co, and letting F(z) = f(z).

    (v) A nonlinear program

    Given: f: R --) R, g : R + R, i; CER,

    Find: XER: to maxf(x), (NLP)

    s.t.: g(x)=O, TSXlti,

    which [whenf( ) is concave and g( ) is convex] may be represented as an MCP by setting N = n + m, and partitioning5

    z=(;), l=( _b), u=( ;J, Fo={vff~-vg~~~~y.

    y corresponds to the Lagrange multipliers on the constraints tn the nonlinear program.

  • 1304 T.F. Ruther$ord / Journal of Economic Dynamics and Control I9 (1995) 1299-1324

    (v) A jinite-dimensional system of variational inequalities

    Given: f: R -+ R, g:R + R,

    Let: X = (5ERls(8 2 01,

    Find: x*ex. (VIP)

    ct.: f(X*)yX - x*) 2 0, VXEX,

    which [whenf( ) is convex and g( ) is concave] is represented as an MCP by setting N = n + m, and partitioning6

    q), I=( -;), u=+o3, ,(+{-f;--vg(x)y.

    When a model can be directly expressed as a linear or nonlinear program, it is typically more efficient and reliable to apply a linear or nonlinear programming algorithm, several of which are available through GAMS. MCP is particularly useful for mathematical programs which cannot be processed as optimization problems. Local sensitivity techniques for MCP models may be employed for any of these mathematical programs.

    3. Economic models

    3.1. Spatial equilibrium models

    As an introduction to the MCP format, consider the Hitchcock-Koopmans transportation problem as described by Dantzig (1963). The data include a set of suppliers I and a set of markets J, with supplies ai, demands bj, transport costs cij from supplier i to marketj. Exhibit 1 presents GAMS code defining the sets and data parameters used in the various models which are to be subsequently presented. Cast as a planning problem, this. linear program seeks a transport

    60bserve that

    x*in (VIP) solves minf(x*)rx. X%X

    Provided that the relevant convexity and regularity conditions are satisfied, the MCP system constitutes necessary and sufficient conditions for minimization, and therefore an MCP solution is a solution to the original system of variational inequalities.

  • T.F. Rutherford 1 Journal of Economic Dynamics and Control 19 (1995) 1299-1324 1305

    SETS I canning plants / SEATTLE, SAN-DIEGO / J markets / NEY-YORK, CHICAGO, TOPEKA / ;

    PARAMETERS A(I) /

    g(J) /

    capacity of plant i in cases (when prices are unity) SEATTLE 325 SAN-DIEGO 575 /, decnand at mmrkct j in cases (when prices -1 vlity) NEU-YORK 325 CHICAGO 300 TOPEKA 27s /*

    ETA(I) Price elas;i;ity of supply / SEATTLE

    SAN-DIEGO 1:0 /,

    SIGMA(J) Price elasticity of W / NEU-YORK 1.5

    CHICAGO TDPEKA :::

    TABLE DIST(I,J) distance in NE&YORK

    SEATTLE 2.5 SAN-DIEGD 2.5

    SCALAR F freight in dollars

    1;

    thousands of miles CHICAGO TOPEKA

    1.7 1.8 1.8 1.4 ;

    case per thousand miles /90/ ;

    PARAMETER C(I,J) transport cost in thousands of dollars per case ;

    C(l,J) = F l DIST(I,J) / 1000 ;

    PARAMETER PEAR(J) Reference price at demand node J (sups price = 1) / NEU-YORK 1.225

    CHICAGO 1.153 TOPEKA 1.126 /;

    PARAMETER ALPHA(I) Supply fvvtion share Coefficient (ICP), BETA(J) Danmnd function share coafficient WP), GAWA(I) Supply function share Coefficient (NLP), KAPPA(J) Demand fuxtion share Coefficient (NLP), EPSD(J) Demand function elasticity coefficient, EPSY(1) Supply function elasticity coefficient;

    ALPHA(I) = A(I); BETA(J) = g(J) l PBAR(J)**SIWA(J)- GAUUA(I) = (ETA(I) / (1 + ETA(I))) : (l/ALPNA(I))**(l/ETA(I))' KAPPA(J) = (SIGUA(Jl / (SIWA(J)-1)) l BETA(J)*~'(l/StGIU

  • 1306 T.F. Ruthe$ord /Journal of Economic Dynamics and Control I9 (1995) 1299-1324

    VARIABLES X(I,J) SHIPClENl UJANTITY FROM I TO J COST MINIMND - TOTAL COST OF SHIPMENT

    POSITIVE VARIABLE X;

    EQUATIONS SUPPLY(I) SUPPLY LIMIT DEMAND(J) DEMAND CONSTRAINT (FIXED) OBJDEF DEFINES COST;

    SUPPLY(I).. A(I) =G- SWJ, X(I,Jl);

    DEMAND(J).. SLWI, X(I,J)) =G= B(J);

    OBJDEF.. COST =E= SlM((I,J), C(1.J) * X(I,J));

    -EL RINCOST / SUPPLY, DEMAND, OBJDEF/;

    SOLVE WNCOST USING LP IIININIZING COST;

    Exhibit 2. The transportation model formulated as a linear program.

    schedule which minimizes the cost of supplying all markets. That is,

    min C CijXij, ij

    Sot. CXij I ai, TXij 2 bj, x 2 0. j

    The GAMS code for the linear programming formulation is in Exhibit 2.7 It is well-known that this problem can be interpreted as a market equilibrium

    problem in which the dual multiplier for an equation from the first set of constraints, wi, represents the price in supply market i, and the dual multiplier for an equation in the second set of constraints, pi, represents the price in demand market j.

    Cast as a market equilibrium problem, a system of (II x IJ( inequalities and associated complementary slackness conditions replace the minimization

    This and subsequent exhibits contain GAMS program fragments which illustrate ideas. Full program listings are provided in an appendix (available upon request). The MCP transportation model is in the GAMS model library. To copy it to your current directory execute gamslib transmcp. Readers unfamiliar with the rudiments of the GAMS language may refer to Chapter 2 of the GAMS Users Guide (1987).

  • T. F. Rutherford / Journal of Economic Dynamics and Control 19 (I 995) 1299-1324 1307

    POSITIVE VARIABLES

    WI) SHADOU PRICE AT SUPPLY NODE I, P(J) StlADW PRICE AT DEMAND NDDE J, X(I,J) SHIPMENT QUANTITIES IN CASES;

    EQUATIONS SUPPLY(I) SUPPLY LIMIT AT PLANT I, DEMAND< J) FIXED DEMAND AT MARKET J, PROFIT(I,J) ZERO PROFIT CDNDITIONS;

    PROFIT(I,J).. WI) + C(I,J) =C= P(J);

    SUPPLY(I).. A(1) =G= SUMJ, X(I,J));

    DEMAND(J).. SW(1, X(I,J)) =G= B(J);

    WDEL TRNSP / PROFIT.X, SUPPLY.U, DEMAND.P/ ;

    SOLVE TRNSP USING WCP;

    Exhibit 3. The transportatidn LP formulated as an LCP.

    operator. Zero profit conditions for transportation activities characterize a competitive, constant-returns-to-scale (CRTS) transportation industry in which free entry drives excess profits to zero for active trade links and no unprofitable activities are operated. The equations which characterize this equilibrium are

    CXij 5 ai, Wi 2 03 j

    wi(ai-4Xij)=Oy Vi,

    Fxij>bj, Pj20, pj(bj-TXij)=O, Qj, Wi + Cij 2 pj, Xij 2 0, Xij(Wi + Cij - pj) = 0, Vi, j.

    This system of inequalities is a linear complementarity problem which may be specified in GAMS/MCP syntax as shown in Exhibit 3.

    There would be no particular reason to formulate a linear program as an MCP. Suppose, however, that demands and supplies were price responsive and all markets perfectly competitive. These assumptions alone would not rule out an optimization approach, but they would require use of a nonlinear programming algorithm. For concreteness, let demand and supply functions be isoelastic.

  • 1308 T.F. Rutherford 1 Journal of Economic Dynamics and Control I9 (1995) 1299-1324

    The revised equilibrium conditions are

    C Xij I cli WY, Wi 2 0, .i

    Wi(CriWl - ~Xij) = 0, Vi,

    FXij 2 bjpj- aJ, pj 2 0, pj (

    /ljpF ai - X,J = 0, Qj, c .> I

    Wi + Cij 2 pj, Xij 2 0, Xij(Wi + Cij - pj) = 0, Vi, j.

    This is a nonlinear complementarity problem. When the matrix of cross-price elasticities for a partial equilibrium model is

    symmetric, there is an associated optimization problem which can be used to compute the equilibrium prices and quantities. (The model is said to be inte- grable - see Takayama and Judge, 1971.) In the present example, cross-price elasticities are zero, and the associated optimization problem is

    max C yi$ + 1 Kjd~4 - C CijXij, I i ij

    S.t.1 1 Xij I Yi, CXij 2 dj,

    where

    yi = & ; 0 Vi, Kj = L lb, 1 &p. l+qi d Oj-1 J g = - Ej =-. I I J Vi Oi In economic terms, the market allocation maximizes the sum of producer and consumer surplus.

    Economic equilibrium models are typically used to assess the consequences of market distortions, typically in the form of taxes, tariffs, or other types of government policies. In public finance, equilibrium models are often used to measure the excess burden of a given tax structure. When ad-ualorem taxes are present, the NLP formulation of a market equilibrium problem is not straight- forward. No single optimization problem characterizes the equilibrium because the resulting allocation is inefficient. Such an equilibrium could be computed by solving a sequence of nonlinear programs, but in these cases the MCP formula- tion is certainly more transparent.

    As illustration of a model which is difficult to treat in an optimization framework but easy to pose as an MCP, consider applying ad-valorem taxes on trade flows in the spatial equilibrium model from above. This causes the supply

  • T.F. Rutherford / Journal of Economic Dynamics and Control 19 (1995) 1299-1324 1309

    PARAMETER T(I,J)

    PDSITIVE VARIABLES

    AD-VALDREW TAX RATE;

    EWAT IONS

    SUPPLY(I)..

    DEMAND(J)..

    PROFIT(I,J)..

    WI) SNADOU PRICE Al SUPPLY NODE I, P(J) SHADOU PRICE AT DEMND NODE J, X(I,J) SHIPMENT QUANTITIES IN CASES;

    SUPPLY(I) SUPPLY LIMIT DEMAND(J) DEMAND CONSTRAINT (FIXED) PROFIT(I,J) ZERO PROFIT CDNDITIDNS;

    ALPHA(I) l U(I)**ETA(I) =Cs SUMCJ, X(I,J));

    SUWI, X(I,J)) =G= BETA(J) l P(J)**(-SIGMAA(J

    (1 + T(I,J)) l (U(I) + C(I,J)) =G= P(J);

    MDDEL TRNSP / PROFIT.X, SUPPLY.Y, DEHAND.P/ ;

    l Avoid function cvalustion errors by installing positive bounds:

    P-LO(J) = 0.001; U.LO(I) = 0.001;

    l 10% tax on all trade:

    T(I,J) = 0.10;

    SOLVE TRNSP USING WCP;

    Exhibit 4. Spatial price equilibrium with ad-ralorem taxes.

    price to be a nonunitary multiple of the marginal cost of supply, destroying integrability (notice that specific taxes do not cause this problem, as they can simply be added to the transport cost coefficients). The GAMS/MCP model is shown in Exhibit 4.

    There are several directions in which the spatial price equilibrium model can be extended. Harker (1986) describes several spatial equilibrium models with imperfect competition. The variational and complementarity versions of these models are implemented in GAMS library models HARKER and HARKERMCP, respectively.

    3.2. An intertemporal general equilibrium model

    Many economic problems involves decision-making over time with dated commodities. The Ramsey model of forward-looking investment and savings

  • 1310 TX Rutherford/Journal of Economic Dynamics and Control 19 (1995) 1299-1324

    decisions is one such model. In a closed economy setting, Ramseys model can be formulated as a nonlinear program. In a multi-regional framework, however, international capital flows are endogenous and an equilibrium cannot be deter- mined by solving a single optimization problem. In the simplest model (see GAMS library models RAMSEY and MRSMCP), a single, homogeneous good is produced throughout the world and this good may be used for either consumption or investment. The market equilibrium can be supported by separate optimization problems for representative agents in each region, taking international prices as given. The region I planning problem is

    The parameters for this planning problems are:

    Pt = present-value international market price of period t output, i;,t, ff,i = exogenous primary factor endowments (labor and initial capital

    stock), 4, = period t discount parameter reflecting differences across countries in

    the rate of time preference and thus in the rate of return to capital, A,, 2 0, C, A,, = 1 Vr,

    ;, = number of years per period, = one-period survival share for physical capital subject to evaporative

    decay, A, = (1 - &), (gr + 6,) = sum of growth and depreciation rates in the terminal period, and 4,, a, = parameters of region rs Cobb-Douglas production function.

    The planning problem takes international prices, p,, as given and it produces a vector of net exports t,,(p) = X,,(p) - M,,(p). An international equilibrium is a vector of present value prices for which cr t,,(p) = 0 Vt. This interpretation suggests an algorithm in which p is iteratively adjusted in order to clear

  • T.F. Rutherford / Journal of Economic Dynamics and Control 19 (1995) 1299-1324 1311

    international markets. This and more sophisticated adjustment procedures can be applied to solve multi-consumer general equilibrium models (see Rutherford, 1992a), but in most cases the MCP formulation is both more easily implemented and more efficient.

    The complementarity formulation for this model is as follows:

    (1.r) Present value of expenditure equals factor income

    (2.t) Aggregate world output equals consumption plus investment

    (3.rt) Present value cost of output is a Cob&Douglas cost function based on the regional wage and rental rate

    (4.rt) Perfect competition assures no excess profits

    (5.rt) Supply of capital equals demand for capital use

    K,, 2 Y,,(l-r;c. 11

    (6.rt) Exogenous labor supply equals demand

    (7.rt) Capital stock equals depreciated stock from the previous period together with new investments from the previous and current period

  • 1312 T.F. Rutheflord / Journal of Economic Dynamics and Control I9 (1995) 1299-1324

    (8.rt) Unrestricted international capital$ows assure that the current consumption price is no less than the return on current investment t < T,

    t = T.

    (9.rt) Cost of capital is no less than the current rental price plus the salvage value from sales in the subsequent period

    Pf: 2 e + AP:+l? t < T, r: - p%gl + &I, t = T.

    (lO.r) Terminal investment must be sujkient to assure steady-state growth in the post-terminal period

    Exhibit 5 displays set and parameter definitions for this model (input data tables are suppressed). The GAMS/MCP equations and solution statements are presented in Exhibit 6. These equations correspond more or less exactly to the formulation given above.

    STITLE MULTI-REGIOII RAMSEY WDOEL

    SET R

    TINIT(T, TTERTW)

    REGIWS /USA, ODECD, USSR, CHINA, ROW, TIME PERIDDS /ll*lll/, INITIAL PERIDD /Tl/ TERMINAL PERIOD /ill/;

    SCALAR N

    PARAMRTERS L(T,R) BETA(T,R) KINIT PHI(R) ALPHA(R) DELTA(R) GAMMA(R) LAMRDA

  • T.F. Rutherford / Journal of Economic Dynamics and Control 19 (1995) 1299-1324 1313

    There are two successive solution statements shown in this exhibit, illustrating a solution scheme which is advisable for any general equilibrium model in which a good estimate of equilibrium values is not easily deduced. The first MCP solves the partial equilibrium relaxation of the model by fixing relative income levels (see Rutherford, 1992a). After having obtained this approximate equilib- rium, the model with uncompensated demand functions is solved - using the partial equilibrium values as a starting point and holding the income for one agent fixed to normalize prices.

    3.3. An MCP formulation for N-player noncooperative games

    The Lemke-Howson (1964) algorithm finds equilibria for two-player non- cooperative games with finite action spaces in pure or mixed strategies. An N-player extension of bimatrix games is conveniently expressed with the follow- ing notation:

    j = i =

    s =

    i(s, j) = ajs =

    playersjE{l,...,N}, pure strategies i E (1, . . . , M) (the same number are assumed available to all players to simplify notation), a pure strategy profile in which one pure strategy is assigned to each player, sE{l,... ,S> where S = MN, the pure strategy assigned to player j in strategy profile s, payoff to player j which arises from strategy profile s.

    Each player j chooses a vector of probabilities, Pij, representing the probabil- ity of playing pure strategy i in the equilibrium. By definition:

    pij 2 0, W,j, Cpij = 1, Vj.

    Let qjs denote the probability that player j is confronted by pure strategy profile s in the equilibrium. Formally:

    qis = n Pi(j', s),j'. j' #j

    We assume that player j chooses a strategy profile to maximize the expected payoff, taking actions of the other players as given:

    max nj = CPij C ajsqjs , PII j i sli(s,j) = i I

    S.t.: Cpij = 1, pij 2 0.

  • POSI

    TIVE

    VA

    RIA

    BLE

    S E(R

    ) P(

    T)

    Y(R

    .1)

    I(R,T

    ) K

    (R,T

    ) C

    (R,f)

    W

    R,T

    ) R

    K(R

    ,T)

    PK(R

    ,T)

    PT(R

    )

    FAC

    TOR

    IN

    CO

    ME

    PRES

    ENT

    VALU

    E PR

    ICE

    OF

    OU

    TPU

    T N

    EU

    VIN

    TAG

    E PR

    OD

    UC

    TIO

    N

    I IVE

    STM

    ENT

    CA

    PITA

    L ST

    OC

    W

    UN

    IT

    CO

    ST

    OF

    PRaO

    UC

    TIO

    W

    UA

    GE

    RA

    TE

    REN

    TAL

    PRIC

    E O

    N

    CA

    PITA

    L PR

    ESEN

    T VA

    LUE

    CO

    ST

    OF

    CA

    PITA

    L TE

    RM

    INA

    L C

    API

    TAL

    PRIC

    E;

    EWA

    TIW

    S IN

    CD

    UEC

    R)

    PRES

    ENT

    VALU

    E O

    F FA

    CTO

    R

    INC

    OM

    E,

    SUPP

    LY(T

    ) G

    LOB

    AL

    SUPP

    LY-D

    EMA

    ND

    , C

    0STt

    R.T

    ) U

    NIT

    C

    OST

    O

    F PR

    OW

    CTI

    ON

    PR

    OFI

    T(R

    ,T)

    UN

    IT

    PRO

    FIT,

    K

    _USE

    (R,f)

    C

    API

    TAL

    REN

    TAL

    HA

    RK

    ET

    LASO

    R(R

    ,T)

    LAB

    OR

    M

    AR

    KET

    K

    _SU

    PPLY

    (R,l)

    C

    API

    TAL

    STO

    CK

    , PR

    OFI

    T_I(R

    ,T)

    INVE

    STM

    ENT

    PRO

    FIT,

    C

    OST

    _K(R

    ,T)

    CA

    PITA

    L VA

    LUE

    CO

    ND

    ITIO

    N,

    TER

    M-I(

    R)

    TER

    MIN

    AL

    INVE

    STM

    ENT;

    INC

    OM

    E(R

    ). .

    SUPP

    LY(T

    ). .

    CO

    ST(R

    ,T)..

    E(R

    ) =E

    = SU

    WT,

    U

    (R,T

    ) *

    L(T,

    R))

    + K

    INIT

    l

    PK

  • T.F. Rutherford 1 Journal of Economic Dynamics and Control I9 (1995) 1299-1324 1315

    . . P

    . . 2

    I

  • 1316 TF. Rutherford/Journal of Economic L?ynamics and Control 19 (1995) 1299-1324

    A workable MCP formulation for the equilibrium problem needs to incorporate individual simplex constraints in a way which does not render the mapping singular at the equilibrium. In the formulation presented here, an additional variable yj is associated with the simplex constraint for player j. It is easy to show that in any solution to this MCP, yj must have a value of unity. The MCP formulation is

    nj2 1 sli(s,j) = i

    ajs( )Jjy), pij 2 0,

    Pij nj - 1 1 SI i(s, j) = i ajs(jQjy)}=O, Vi,j, CPij2l3 Yj20, Yj l-Cpij co, vj.

    I ( i) The GAMS implementation of this model is displayed in Exhibits 7 and 8. Exhibit 7 sets up the data structures using dynamic sets to produce the mapping i(s, j). This is the trickiest part of the programming because it relies on the use of dynamic ordered sets. Once the data structure LINK@, I, J) has been installed, it is straightforward to formulate the equilibrium conditions shown in Exhibit 8.

    3.4. Computational benchmarks

    The two solvers available for solving mixed complementarity problems in GAMS are both Newton-type algorithms, hence they share the same local convergence properties. The solvers differ in the adjustment process far from the equilibria.

    Some statistics comparing their performance on the multi-regional Ramsey model and the N-player Nash equilibrium models are presented in Table 1. For these tests, both solvers are using default tolerances, iteration, and limits. The Ramsey model results confirm that both algorithms are capable of

    In this table, convergence rate % is 100 times the number of convergent runs divided by the total number of starting points evalutated, equilibria is the number of distinct equilibria identified by either algorithm during these tests, and density is 100 times the number of Jacobian nonzeros divided by the square of the number of variables.

  • SET J PLAYERS /Jl*J3/, I ACTIWS /11+12/, ss STRATEGY PROFILES /Sl*SlDDD/, S(SS) ACTIVE STRATEGY PROFILES, LINKCSS.1.J) CONNECTlOll BETUEEN ACTIONS AND PROFILES;

    ABORTS(CARD(SS) LT CARD(I1)3) SET SS IS NOT LARGE ENOUGH.;

    PARAMETER PAYOFF(SS,J) PAYOFF DATA IN STRATEGY-PROFILE FORMAT;

    l READ THE DATA:

    TABLE LOSS(J,I,I,I) PAYOFF DATA IN DENSE FORM

    Il.11 Il.12 12.11 12.12 Jl.11 1 2 8 5 J1.12 8 8 2 52.11 4 2

    s 1

    52.12 2 6 1 J3.11 4 1 4 : J3.12 8 8 2 l;

    * LET 11, I2 AND I3 ALL STAND FOR SET I:

    ALIAS ~I,Il),(I,12),(1,13);

    l

    l

    l

    S(S1)

    l

    ASSIGN PLAYER ACTIONS TO STRATEGY PROFILES USING DYNAMIC SET SO.

    INITIALIZE SET S UITH A SINGLE ENTRY, THE FIRST ELEFlENl OF SS:

    = YES;

    ONE ELEMENT OF SET S IS GENERATED FOR EACH CUdBINATION OF PURE STRATEGIES:

    LOOF((11,12,13),

    l SET S CONTAINS A SINGLE ELEMENT FOR THE FOLLOUING STATEMENT:

    LINK(S,Il,Jl) q YES; LINK(S,IZ,J2) = YES; LINK(S, 13,53) = YES; PAYOFF(S,J) = -Loss(J,I1,12,13);

    * THE NEXT STATEMENTS ROVE S THE SUBSEQUENT ELEMENT OF SS:

    S(SS)W(SS-1) = YES; S(SS)SS(SS+l) = NO;

    );

    * THE NEXT STATEMENTS DEFINE THE SET OF ACTIW PROFILES AS * THOSE ELEMENTS OF SS FOR YHICH PAYOFFS HAVE BEEN ASSIGNED:

    S(SS) = NO; ass1 = YESSSUWJ, ABS(PAY0FFtSS.J)));

    Exhibit 7. N-player games - GAMS code to generate a model with N = 3, M = 2.

  • 1318 T.F. Rutherford / Journal of Economic Dynamics and Control 19 (1995) 1299-1324

    POSITIVE VARIABLE

    EQUATION

    P(I,J) PROBABILITY OF STRATEGY I BY PLAYER J, Y(J) SIMPLEX VARIABLE (=I IN EGUILIBRIW) PI(J) EXPECTED RETURN TO PLAYER J;

    PIDEF(J) EXPECTED PAYOFF DEFINITION, SIMPLEX(J) SIMPLEX CONSTRAINT EWIL(I,J) EXCESS RETURN FRDH PURE STRATEGY;

    l EXPECTED PAYOFF:

    PIDEF(J)..

    PI(J) =E= SLWS, PAYOFF(S,J) l PRDDtJJ, SUM(ISLINK(S,I,JJ), P(I,JJ)/Y(JJ))));

    * STRATEGY I BY PLAYER J YIELDS NO MORE THAN EXPECTED RETURN:

    EGUIL(I,J)..

    PI(J) =G= SlJM(SSLINK(S,I,J), PAYOFF(S,J) *

    PROD(JJS(ORD(JJ) NE ORD(J)), SUWIISLINK(S,II,JJ), P(II,JJ)/Y(JJ))));

    l PROBABILITIES SUI TO 1:

    SIMPLEX(J).. SWI, P(I,J)) =G= 1;

    Exhibit 8. GAMS/MCP code for the general N-player M-strategy Nash game.

    processing very large-dimensional models when they are sparse. PATH is generally more efficient for these test problems.g

    Both solvers find the noncooperative games difficult. The first three problems are from van der Laan et al. (1987). The fourth problem is based on randomly generated payoffs. MILES is more robust for these problems, but this may be

    The subroutines for crashing a complementary basis described in Anstreicher et al. (1992) are not yet included in this version of MILES. Consequently, MILES solution time for the Ramsey test problems is spent largely on the first linear subproblem which is computed from a default Lemke starting point because the initial basis is typically singular.

    In their computational results, van der Laan et al. (1987) make no mention of the multiplicity of equilibria. Their computational results for a specialized fixed-point procedure are cited in terms of the cumulative number of function evaluations and are therefore difficult to compare.

  • T.F. Rutherford/Journal of Economic Dynamics and Control 19 (1995) 1299-1324 1319

    Table 1 Solver performance for Ramsey and N-player problems

    Statistics for multi-region Ramsey model (starting point: all values = 1)

    Size Regions 5 5 Time periods 10 15 Variables 369 549 Nonzeros 1330 1985 Density 1.0% 0.1%

    Pivots PATH 388 578 MILES 380 513

    Solution time (seconds, 33 MHz 80486) PATH 31.85 55.91 MILES 35.93 12.39

    5 12 12 12 20 10 15 20

    129 873 1298 1723 2640 3178 4143 6308

    0.5% 0.4% 0.3% 0.2%

    115 113

    83.43 97.33 181.59 282.65 133.69 175.65 585.62 N/C

    886 1364 1834 888 1431 N/C

    Statistics for N-player game (25 randomly selected starting points)

    Size Players 3 3 Actions 2 3 Variables 12 15 Nonzeros 78 129 Density 54.2% 57.3% Equilibria 1 6

    Convergence rate (X) PATH 80 % 60 % MILES 64 % 80 % PATH & MILES 80 % 92 %

    Average solution time (seconds, 33 MHz 80486) PATH 2.8 6.6 MILES 2.8 5.0

    4 4 2 4

    16 24 140 356 54.7% 61.8% 3 11

    60 % 12 % 64 % 48 % 76 % 56 %

    6.1 27.5 6.8 102.6

    N/C = not computed.

    due to lower effective iteration limits for PATH. The usefulness of having two solvers is illustrated with the noncooperative games, where use of both solvers considerably increases convergence rates (see values for PATH & MILES).

    The comparison between alternative solvers available within GAMS/MCP is not as revealing as a comparison between these solvers and other programming tools. The use of analytical gradients and sparse data structures provide a signif- icant advantage for GAMS/MCP relative to other approaches. Sparsity is not unusual. For many economic equilibrium problems, the most natural set of variables and equations is one in which many equations involve only a small number of variables. This causes the underlying Jacobian matrix to have a large number of zeros - i.e., it is sparse.

  • 1320 T.F. Rutherford / Journal of Economic Dynamics and Control I9 (1995) 1299-1324

    In order to illustrate the advantages of analytic gradients and sparse data structures, GAMS/MCP was compared with the widely advertised econometric software package GAUSS which includes a dense-matrix nonlinear system solver in which Jacobians are generated by numerical differencing. The GAUSS NLSYS solver otherwise implements a standard Newton algorithm with the same number of iterations. The test problem was a static, multi-sectoral general equilibrium model GEMMCP from the GAMS model library. This problem is a system of 262 nonlinear equations. In the test, four related equilibria were computed. The resulting clock times were 32 seconds for GAMS/MILES and 14 minutes for GAUSS.

    4. Local sensitivity analysis

    Suppose that GAMS/MCP has been used to solve a nonlinear system of the form:

    F(z; f) = 0,

    where z is an N-vector of decision variables, f is an M-vector of parameters, and F is a function mapping RNfM to RN.

    Given a solution z*, it is often helpful to know the local dependence of z* on f. Let J, denote the Jacobian of F with respect to z (i.e., V,F), and let J, denote the Jacobian of F with respect to f (i.e., V,F). It is easy to show that

    dz = - J;J,dt = Sdt,

    where J, . IS the inverse of J,. This equation defines the local sensitivity matrix, S = - Jf J,. If the system of equations is specified so that J, has full rank at the solution, then the gradients fall out as the solution of a linear system of equations. Setting up the linear system with the Jacobian matrices is easy in theory but tedious in practice. Fortunately, there is an easier approach by which GAMS generates the derivatives automatically.

    Consider the following nonlinear program:

    max Zi, z, f

    s.t.: F(z; t) = 0, t = f.

    The GAMS and GAUSS programs used for this comparison are available upon request from the author.

  • T. F. Rutherford / Journal of Economic Dynamics and Control 19 (I 995) 1299-l 324 1321

    The implicit function theorem (see Varian, 1992) implies that the ith row of S corresponds to the dual multipliers associated with the bounds on t. To compute the entire sensitivity matrix therefore requires the solution of N sepa- rate sets of nonlinear programs, all of which may be initiated at the equilibrium point.

    A minor variation on this technique applies to complementarity problems involving mixtures of equations and inequalities. In the MCP case, the nonlinear system passed to the nonlinear program only include those equations which are binding at the solution (i.e., any equations which are slack in the MCP solution must be omitted from the NLP using GAMS exception ($) operators). An illustration of this technique is provided in an appendix.

    5. GAMS/MCP syntax

    In a GAMS/MCP program, the central unknowns, z, are declared as VARI- ABLES, the vectors u and 1 are specified as upper and lower bounds. The function F( ) is written using GAMS matrix algebra in equation statements. All aspects of the GAMS/MCP language are identical to GAMS/NLP except that in an MCP problem no objective function is specified, and bounded variables must be mapped to complementary inequalities.

    In the canonical MCP structure, the equations wr(z - I) = 0 and uT(u - z) = 0 imply a particular association of variables with equations. Quite naturally, zi is complementary with F,(z). In an empirical model, there are typically several classes of variables and equations, and the declaration sequence is arbitrary, so the rule ZiFi = 0 is impossible to interpretI

    To fix the complementarity structure, a GAMS/MCP program explicitly associates variables with equations in the MODEL statement. Unlike an NLP in which only equation names appear on the model statement, in an MCP program both equation and variable names may be listed. The syntax is

    MODEL NAME/EQU l.VARl, EQU2.VAR2, /;

    In this list, EQUi and VARi must be defined over the same domains. Complementarity associations are only required for variables which are

    subject to upper or lower bounds. Otherwise, GAMSMCP only requires that

    One way to make this association would have been to use the same name for both equations and variables. This syntax was rejected because it would not be upward compatible with NLP models. The present structure permits sharing a system of equations in both complementarity and optimization models within the same program. Furthermore, the present structure makes it quite simple to convert existing GAMS/NLP models into the complementarity structure.

  • 1322 T.F. Rutherford / Journal of Economic Dynamics and Control 19 (1995) 1299-1324

    the number of unrestricted variables equal the number of unassociated equa- tions in the model. It is a simple matter to mix equations with inequalities in this format. The specification of linear and nonlinear systems of equations with no bounds and complementarity conditions requires no variable names on the MODEL list.

    Joint consistency of inequalities and complements assignments is important when finite bounds are imposed on z. In the MCP structure, slack variables w and u are implicitly represented in a GAMS/MCP model through the equation statement. The fact that the lower bound slack variable (w) appears with a coefficient of - 1 and the upper bound slack variable (u) appears with a coefficient of + 1 means that the orientation of the inequality is significant. In GAMS/MCP, the equations F(z) 2 0 and - F(z) 5 0 are not equivalent. In the first case, the inequality is assumed to be complementary with the lower bound slack of the associated variable, while in the second case the inequality is taken to be complementary with the upper bound slack.

    Compiler error conditions can result from improperly specified bounds and associated equation types. If an equation is written using =G= , then the associated lower bound must be infinite. Likewise, if a constraint is written as = L = , the associated upper bound must be finite. Table 2 outlines the rules

    which apply when variables are associated with different types of equations.

    Table 2 Rules for associating complementary variables and equations

    Associated equation type

    Variable =G= CL= =E=

    Lower Upper Both Free Fixed

    OK Error OK/warning OK/message OK

    Error OK OK/warning OK/message OK

    OK/warning OK/warning OK/warning OK OK

    Error means that the correspondence is inconsistent and the problem will not be processed.

    OK/warning means that the association is acceptable but the constraint as written may not be satisfied in the solution. We accept the syntax and issue a warning on the list file if the constraint is not satisfied at the equilibrium. This warning is generated if the constraint is violated either by nonzero upper and lower bound slack variables or through the effects of the multipliers from the variational inequality side constraints.

    OK/message means that an inequality constraint has been associated with an unrestricted vari- ables. The variable will always be in the basis, so the constraint will never be slack and it is therefore treated as an equality. A message to this effect will be generated on the listing file.

  • T.F. Rutherford 1 Journal of Economic Dynamics and Control 19 (1995) 1299-1324 1323

    6. Summary and directions for future research

    This paper has introduced a new class of mathematical programs which can now be formulated and solved using GAMS. This class of problems includes, among others, systems of equations, complementarity problems, and finite- dimensional variational inequalities as special cases. The paper introduced by example extensions of GAMS syntax which permit these problems to be repre- sented, and it described three economic models in which the complementarity format may be usefully applied. Computational benchmarks were provided for the two large-scale solvers available through GAMS/MCP, and a method for local sensitivity analysis was outlined.

    The software described in this paper is available for varioius computing platforms from GAMS Development Corporation.13 The next steps in this research program will include (i) assembly and documentation of a library of large-scale test problems from economics as well as other disciplines, (ii) imple- mentation and testing of alternative algorithms as solution subsystems, and (iii) investigation of previously unexplored economic equilibrium frameworks for which the complementarity format and new software may prove useful. Among potential new applications, the computation of economic equilibria with uncer- tainty (see Duffie and Shafer, 1986) seems particularly challenging.

    References

    Adelman, I. and S. Robinson, 1978, Income distribution policy in developing countries: A case study of Korea (Oxford University Press, London).

    Anstreicher, K., J. Lee, and T.F. Rutherford, 1992, Crashing a maximum weight complementary basis, Mathematical Programming 54, 281-290.

    Brooke, T., D. Kendrick, and A. Meeraus, 1987, CAMS: A users guide (Scientific Press, San Francisco, CA).

    Defermos, S., 1982, An iterative scheme for variational inequalities. Mathematical Programming 26. 40-47.

    Dantzig, G., 1963, Linear programming and extensions (Princeton University Press. Princeton, NJ). Dirkse, S. and M. Ferris, 1993, The PATH solver: A non-monotone stabilization scheme for mixed

    complementarity problems, Technical report 1179, Sept. (CS Department, University of Wisconsin, Madison, WI).

    Duffie, D. and W. Shafer, 1985, Equilibrium in incomplete markets: I. A basic model of generic existence, Journal of Mathematical Economics 14, 285300.

    Eaves, B.C., 1978, A locally quadratically convergent algorithm for computing stationary points, Technical report (Department of Operations Research, Stanford University, Stanford, CA).

    Gale, D., 1960, The theory of linear economic models (University of Chicago Press, Chicago, IL). Gill, P., W. Murray, M.A. Saunders, and M.H. Wright, 1991, Mamtaining LU factors of a general

    sparse matrix, Linear Algebra and its Applications 88/89, 239-270.

    1217 Potomac Street, N.W., Washington. DC 20007; [email protected].

  • 1324 T.F. Rutherford / Journal of Economic Dynamics and Control I9 (1995) 1299-1324

    Goreux, L.M. and AS. Mature, 1973, Multi-level planning: Case studies in Mexico (North-Holland, Amsterdam).

    Harker, P., 1986, Alternative models of spatial competition, Operations Research 34, 410-425. Harker, P. and J.S. Pang, 1990, Finite-dimensional variational inequality and nonlinear com-

    plementarity problems: A survey of theory, algorithms and applications, Mathematical Pro- gramming B 38, 161-190.

    Hogan, W.W., 1975, Energy policy models for project independence, Computation and Operations Research 2, 251-271.

    Josephy, N.H., 1979, Newtons method for generalized equations, Technical summary report 1965 (Mathematical Research Center, University of Wisconsin, Madison, WI).

    Kojima, M., N. Megiddo, T. Noma, and A. Yoshise, 1991, A unified approach to interior point algorithms for linear complementarity problems, Lecture notes in computer science 538 (Springer-Verlag, New York, NY).

    Laan, G. van der and A.J.J. Talman, 1985, An algorithm for the linear complementarity problem with upper and lower bounds, Journal of Optimization Theory and Applications 62, 151-163.

    Laan, G. van der, A.J.J. Talman, and L. van der Heyden, 1987, Simplicial variable dimension algorithms for solving the nonlinear complementarity problem on a product of unit simplices using a general labelling, Mathematics of Operations Research 12, 337-397.

    Lemke, C.E. and J.T. Howson, 1964, Equilibrium points of bimatrix games, SIAM Review 12, 413-423.

    Mathiesen, L., 1985, Computation ofeconomic equilibrium by a sequence of linear-complementarity problems, Mathematical programming study 23 (North-Holland, Amsterdam).

    Meeraus, A., 1983, An algebraic approach to modeling, Journal of Economic Dynamics and Control 5. Ralph, D., 1994, Global convergence of damped Newtons method for nonsmooth equations, via the

    path search, Mathematics of Operations Research 19, 352-371. Robinson, S., 1972, A quadratically-convergent algorithm for general nonlinear programming

    problems, Mathematical Programming Study 3, 145156. Rutherford, T., 1987, Applied general equilibrium modeling, Ph.D. dissertation (Department of

    Operations Research, Stanford University, Stanford, CA). Rutherford, T., 1992a, Sequential joint maximization, Working paper 92-8 (Department of Econ-

    omics, University of Colorado, Boulder, CO). Rutherford, T., 1992b, Applied general equilibrium modeling using MPS/GE as a GAMS subsys-

    tem. Working paper 92-15 (Department of Economics, University of Colorado, Boulder, CO). Rutherford, T., 1993, MILES: A mixed inequality and nonlinear equation solver, Working paper

    (Department of Economics, University of Colorado, Boulder, CO). Samuelson, P., 1952, Spatial price equilibrium and linear programming, American Economic

    Review 42, 2833303. Takayama, T. and G.G. Judge, 1971, Spatial and temporal price and allocation models (North-

    Holland, Amsterdam). Varian, H., 1992, Microeconomic analysis, 3rd ed. (Norton, New York, NY).