GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 1 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m C o m p i l a t i o n 1 * 2 * PROTO_BOTH.GMS 1.01 3 * Oct 92 (PJW) 4 * 5 * GAMS program to compute both base and revise case solutions 6 * for a small prototype general equilibrium model. 7 * 8 9 * 10 * These are the model's parameters: 11 * 12 13 SCALAR a Utility function parameter / 0.285 /; 14 SCALAR b Production function parameter / 2.040 /; 15 16 * 17 * These are exogenous variables: 18 * 19 20 SCALAR h Total endowment of hours / 100.0 /; 21 SCALAR t Initial tax rate / 0.200 /; 22 SCALAR p Numeraire price / 1.000 /; 23 24 * 25 * These are the endogenous variables: 26 * 27 28 VARIABLES 29 y Income 30 w Wage rate 31 s Subsidy to households 32 c Quantity consumed 33 l Labor supplied 34 j Leisure consumed 35 q Quantity produced 36 z Dummy for solver ; 37 38 * 39 * Here are the equations: 40 * 41 42 EQUATIONS 43 income Household income accounting identity 44 consum Household demand for goods 45 leisure Household demand for leisure 46 laborsup Household supply of labor 47 labordem Demand for labor by firms 48 price Price from firm's cost function 49 govbudget Government budget constraint 50 dummy Dummy equation for solver ; 51 52 income.. y =e= w*h + s ; 53 consum.. p*(1+t)*c =e= a*y ; 54 leisure.. w*j =e= (1-a)*y ; 55 laborsup.. w*l =e= a*y - s ; 56 labordem.. l =e= q/b ; 57 price.. p =e= w/(b-1) ; 58 govbudget.. t*p*c =e= s ; 59 dummy.. z =e= 1000 ; 60 61 * GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 2 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m C o m p i l a t i o n 62 * The model consists of all of the equations 63 * 64 65 MODEL proto /ALL/; 66 67 * 68 * Solve it using nonlinear programming. Must give the 69 * algorithm something to minimize so use a dummy variable. 70 * 71 72 SOLVE proto USING NLP MINIMIZING z; 73 74 * 75 * Now change the policy variable (t) and compute a 76 * revised case solution: 77 * 78 79 t = 0.300; 80 81 SOLVE proto USING NLP MINIMIZING z; 82 GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 3 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m Symbol Listing SYMBOL TYPE REFERENCES A PARAM DECLARED 13 DEFINED 13 REF 53 54 55 B PARAM DECLARED 14 DEFINED 14 REF 56 57 C VAR DECLARED 32 IMPL-ASN 72 81 REF 53 58 CONSUM EQU DECLARED 44 DEFINED 53 IMPL-ASN 72 81 REF 65 DUMMY EQU DECLARED 50 DEFINED 59 IMPL-ASN 72 81 REF 65 GOVBUDGET EQU DECLARED 49 DEFINED 58 IMPL-ASN 72 81 REF 65 H PARAM DECLARED 20 DEFINED 20 REF 52 INCOME EQU DECLARED 43 DEFINED 52 IMPL-ASN 72 81 REF 65 J VAR DECLARED 34 IMPL-ASN 72 81 REF 54 L VAR DECLARED 33 IMPL-ASN 72 81 REF 55 56 LABORDEM EQU DECLARED 47 DEFINED 56 IMPL-ASN 72 81 REF 65 LABORSUP EQU DECLARED 46 DEFINED 55 IMPL-ASN 72 81 REF 65 LEISURE EQU DECLARED 45 DEFINED 54 IMPL-ASN 72 81 REF 65 P PARAM DECLARED 22 DEFINED 22 REF 53 57 58 PRICE EQU DECLARED 48 DEFINED 57 IMPL-ASN 72 81 REF 65 PROTO MODEL DECLARED 65 DEFINED 65 IMPL-ASN 72 81 REF 72 81 Q VAR DECLARED 35 IMPL-ASN 72 81 REF 56 S VAR DECLARED 31 IMPL-ASN 72 81 REF 52 55 58 T PARAM DECLARED 21 DEFINED 21 ASSIGNED 79 REF 53 58 W VAR DECLARED 30 IMPL-ASN 72 81 REF 52 54 55 57 Y VAR DECLARED 29 IMPL-ASN 72 81 REF 52 53 54 55 Z VAR DECLARED 36 IMPL-ASN 72 81 REF 59 72 81 PARAMETERS A Utility function parameter B Production function parameter H Total endowment of hours P Numeraire price T Initial tax rate VARIABLES C Quantity consumed J Leisure consumed L Labor supplied GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 4 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m Symbol Listing VARIABLES Q Quantity produced S Subsidy to households W Wage rate Y Income Z Dummy for solver EQUATIONS CONSUM Household demand for goods DUMMY Dummy equation for solver GOVBUDGET Government budget constraint INCOME Household income accounting identity LABORDEM Demand for labor by firms LABORSUP Household supply of labor LEISURE Household demand for leisure PRICE Price from firm's cost function MODELS PROTO COMPILATION TIME = 0.010 SECONDS VERID SOL-25-078 GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 5 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m Equation Listing SOLVE PROTO USING NLP FROM LINE 72 ---- INCOME =E= Household income accounting identity INCOME.. Y - 100*W - S =E= 0 ; (LHS = 0) ---- CONSUM =E= Household demand for goods CONSUM.. - 0.285*Y + 1.2*C =E= 0 ; (LHS = 0) ---- LEISURE =E= Household demand for leisure LEISURE.. - 0.715*Y + (0)*W + (0)*J =E= 0 ; (LHS = 0) ---- LABORSUP =E= Household supply of labor LABORSUP.. - 0.285*Y + (0)*W + S + (0)*L =E= 0 ; (LHS = 0) ---- LABORDEM =E= Demand for labor by firms LABORDEM.. L - 0.4902*Q =E= 0 ; (LHS = 0) ---- PRICE =E= Price from firm's cost function PRICE.. - 0.9615*W =E= -1 ; (LHS = 0 ***) ---- GOVBUDGET =E= Government budget constraint GOVBUDGET.. - S + 0.2*C =E= 0 ; (LHS = 0) ---- DUMMY =E= Dummy equation for solver DUMMY.. Z =E= 1000 ; (LHS = 0 ***) GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 6 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m Column Listing SOLVE PROTO USING NLP FROM LINE 72 ---- Y Income Y (.LO, .L, .UP = -INF, 0, +INF) 1 INCOME -0.285 CONSUM -0.715 LEISURE -0.285 LABORSUP ---- W Wage rate W (.LO, .L, .UP = -INF, 0, +INF) -100 INCOME (0) LEISURE (0) LABORSUP -0.9615 PRICE ---- S Subsidy to households S (.LO, .L, .UP = -INF, 0, +INF) -1 INCOME 1 LABORSUP -1 GOVBUDGET ---- C Quantity consumed C (.LO, .L, .UP = -INF, 0, +INF) 1.2 CONSUM 0.2 GOVBUDGET ---- L Labor supplied L (.LO, .L, .UP = -INF, 0, +INF) (0) LABORSUP 1 LABORDEM ---- J Leisure consumed J (.LO, .L, .UP = -INF, 0, +INF) (0) LEISURE GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 7 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m Column Listing SOLVE PROTO USING NLP FROM LINE 72 ---- Q Quantity produced Q (.LO, .L, .UP = -INF, 0, +INF) -0.4902 LABORDEM ---- Z Dummy for solver Z (.LO, .L, .UP = -INF, 0, +INF) 1 DUMMY GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 8 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m Model Statistics SOLVE PROTO USING NLP FROM LINE 72 MODEL STATISTICS BLOCKS OF EQUATIONS 8 SINGLE EQUATIONS 8 BLOCKS OF VARIABLES 8 SINGLE VARIABLES 8 NON ZERO ELEMENTS 18 NON LINEAR N-Z 4 DERIVATIVE POOL 5 CONSTANT POOL 0 CODE LENGTH 21 GENERATION TIME = 0.010 SECONDS EXECUTION TIME = 0.010 SECONDS VERID SOL-25-078 GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 9 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m Solution Report SOLVE PROTO USING NLP FROM LINE 72 S O L V E S U M M A R Y MODEL PROTO OBJECTIVE Z TYPE NLP DIRECTION MINIMIZE SOLVER MINOS5 FROM LINE 72 **** SOLVER STATUS 1 NORMAL COMPLETION **** MODEL STATUS 2 LOCALLY OPTIMAL **** OBJECTIVE VALUE 1000.0000 RESOURCE USAGE, LIMIT 0.059 1000.000 ITERATION COUNT, LIMIT 6 1000 EVALUATION ERRORS 0 0 M I N O S 5.3 --- SPARC/SOLARIS 5.3.021-019 = = = = = B. A. Murtagh, University of New South Wales and P. E. Gill, W. Murray, M. A. Saunders and M. H. Wright Systems Optimization Laboratory, Stanford University. EXIT -- OPTIMAL SOLUTION FOUND MAJOR ITNS, LIMIT 8 200 FUNOBJ, FUNCON CALLS 0 13 SUPERBASICS 0 INTERPRETER USAGE 0.00 NORM RG / NORM PI 0.000E+00 LOWER LEVEL UPPER MARGINAL ---- EQU INCOME . . . EPS ---- EQU CONSUM . . . EPS ---- EQU LEISURE . . . EPS ---- EQU LABORSUP . . . EPS ---- EQU LABORDEM . . . EPS ---- EQU PRICE -1.000 -1.000 -1.000 EPS ---- EQU GOVBUDGET . . . EPS ---- EQU DUMMY 1000.000 1000.000 1000.000 1.000 INCOME Household income accounting identity CONSUM Household demand for goods LEISURE Household demand for leisure LABORSUP Household supply of labor LABORDEM Demand for labor by firms PRICE Price from firm's cost function GOVBUDGET Government budget constraint DUMMY Dummy equation for solver LOWER LEVEL UPPER MARGINAL ---- VAR Y -INF 109.186 +INF . ---- VAR W -INF 1.040 +INF . ---- VAR S -INF 5.186 +INF . ---- VAR C -INF 25.932 +INF . ---- VAR L -INF 24.934 +INF . ---- VAR J -INF 75.066 +INF . ---- VAR Q -INF 50.866 +INF . ---- VAR Z -INF 1000.000 +INF . GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 10 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m Solution Report SOLVE PROTO USING NLP FROM LINE 72 Y Income W Wage rate S Subsidy to households C Quantity consumed L Labor supplied J Leisure consumed Q Quantity produced Z Dummy for solver **** REPORT SUMMARY : 0 NONOPT 0 INFEASIBLE 0 UNBOUNDED 0 ERRORS GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 11 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m Equation Listing SOLVE PROTO USING NLP FROM LINE 81 ---- INCOME =E= Household income accounting identity INCOME.. Y - 100*W - S =E= 0 ; (LHS = 2.842171E-14 ***) ---- CONSUM =E= Household demand for goods CONSUM.. - 0.285*Y + 1.3*C =E= 0 ; (LHS = 2.5932 ***) ---- LEISURE =E= Household demand for leisure LEISURE.. - 0.715*Y + (75.0656)*W + (1.04)*J =E= 0 ; (LHS = -1.42109E-14 ***) ---- LABORSUP =E= Household supply of labor LABORSUP.. - 0.285*Y + (24.9344)*W + S + (1.04)*L =E= 0 ; (LHS = 0) ---- LABORDEM =E= Demand for labor by firms LABORDEM.. L - 0.4902*Q =E= 0 ; (LHS = 7.105427E-15) ---- PRICE =E= Price from firm's cost function PRICE.. - 0.9615*W =E= -1 ; (LHS = -1) ---- GOVBUDGET =E= Government budget constraint GOVBUDGET.. - S + 0.3*C =E= 0 ; (LHS = 2.5932 ***) ---- DUMMY =E= Dummy equation for solver DUMMY.. Z =E= 1000 ; (LHS = 1000) GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 12 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m Column Listing SOLVE PROTO USING NLP FROM LINE 81 ---- Y Income Y (.LO, .L, .UP = -INF, 109.1864, +INF) 1 INCOME -0.285 CONSUM -0.715 LEISURE -0.285 LABORSUP ---- W Wage rate W (.LO, .L, .UP = -INF, 1.04, +INF) -100 INCOME (75.0656) LEISURE (24.9344) LABORSUP -0.9615 PRICE ---- S Subsidy to households S (.LO, .L, .UP = -INF, 5.1864, +INF) -1 INCOME 1 LABORSUP -1 GOVBUDGET ---- C Quantity consumed C (.LO, .L, .UP = -INF, 25.9318, +INF) 1.3 CONSUM 0.3 GOVBUDGET ---- L Labor supplied L (.LO, .L, .UP = -INF, 24.9344, +INF) (1.04) LABORSUP 1 LABORDEM ---- J Leisure consumed J (.LO, .L, .UP = -INF, 75.0656, +INF) (1.04) LEISURE GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 13 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m Column Listing SOLVE PROTO USING NLP FROM LINE 81 ---- Q Quantity produced Q (.LO, .L, .UP = -INF, 50.8661, +INF) -0.4902 LABORDEM ---- Z Dummy for solver Z (.LO, .L, .UP = -INF, 1000, +INF) 1 DUMMY GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 14 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m Model Statistics SOLVE PROTO USING NLP FROM LINE 81 MODEL STATISTICS BLOCKS OF EQUATIONS 8 SINGLE EQUATIONS 8 BLOCKS OF VARIABLES 8 SINGLE VARIABLES 8 NON ZERO ELEMENTS 18 NON LINEAR N-Z 4 DERIVATIVE POOL 5 CONSTANT POOL 0 CODE LENGTH 21 GENERATION TIME = 0.010 SECONDS EXECUTION TIME = 0.020 SECONDS VERID SOL-25-078 GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 15 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m Solution Report SOLVE PROTO USING NLP FROM LINE 81 S O L V E S U M M A R Y MODEL PROTO OBJECTIVE Z TYPE NLP DIRECTION MINIMIZE SOLVER MINOS5 FROM LINE 81 **** SOLVER STATUS 1 NORMAL COMPLETION **** MODEL STATUS 2 LOCALLY OPTIMAL **** OBJECTIVE VALUE 1000.0000 RESOURCE USAGE, LIMIT 0.017 1000.000 ITERATION COUNT, LIMIT 0 1000 EVALUATION ERRORS 0 0 M I N O S 5.3 --- SPARC/SOLARIS 5.3.021-019 = = = = = B. A. Murtagh, University of New South Wales and P. E. Gill, W. Murray, M. A. Saunders and M. H. Wright Systems Optimization Laboratory, Stanford University. EXIT -- OPTIMAL SOLUTION FOUND MAJOR ITNS, LIMIT 3 200 FUNOBJ, FUNCON CALLS 0 5 SUPERBASICS 0 INTERPRETER USAGE 0.00 NORM RG / NORM PI 0.000E+00 LOWER LEVEL UPPER MARGINAL ---- EQU INCOME . . . EPS ---- EQU CONSUM . . . EPS ---- EQU LEISURE . . . EPS ---- EQU LABORSUP . . . EPS ---- EQU LABORDEM . . . EPS ---- EQU PRICE -1.000 -1.000 -1.000 EPS ---- EQU GOVBUDGET . . . EPS ---- EQU DUMMY 1000.000 1000.000 1000.000 1.000 INCOME Household income accounting identity CONSUM Household demand for goods LEISURE Household demand for leisure LABORSUP Household supply of labor LABORDEM Demand for labor by firms PRICE Price from firm's cost function GOVBUDGET Government budget constraint DUMMY Dummy equation for solver LOWER LEVEL UPPER MARGINAL ---- VAR Y -INF 111.322 +INF . ---- VAR W -INF 1.040 +INF . ---- VAR S -INF 7.322 +INF . ---- VAR C -INF 24.405 +INF . ---- VAR L -INF 23.466 +INF . ---- VAR J -INF 76.534 +INF . ---- VAR Q -INF 47.872 +INF . ---- VAR Z -INF 1000.000 +INF . GAMS 2.25.078 SPARC/SOLARIS 09/25/00 10:14:29 PAGE 16 G e n e r a l A l g e b r a i c M o d e l i n g S y s t e m Solution Report SOLVE PROTO USING NLP FROM LINE 81 Y Income W Wage rate S Subsidy to households C Quantity consumed L Labor supplied J Leisure consumed Q Quantity produced Z Dummy for solver **** REPORT SUMMARY : 0 NONOPT 0 INFEASIBLE 0 UNBOUNDED 0 ERRORS EXECUTION TIME = 0.000 SECONDS VERID SOL-25-078 USER: Campus Site License G950505:1340AR-SOL University of Texas at Austin **** FILE SUMMARY INPUT /home/fac2/wilcoxen/mosaic/cge/proto/gams/proto_both.gms OUTPUT /home/fac2/wilcoxen/mosaic/cge/proto/gams/proto_both.lst