*cge1: basic general equilibrium model, no trade, no envir
* This program is the general equilibrium model for the
* economy with one closed economy consuming two products A and B
*Note, profits are not specified yet in this model
*Some parameters to get less output (if interested, check the GAMS User Guide)
$offlisting
Option solprint = on;
Option limrow = 0;
Option limcol = 0;
SETS
ITER Negishi Iterations /IT1*IT6/
J Goods /A,B/
;
PARAMETERS
scale only relative prices matter so scale all prices
RESULT(*,*,*) parameter for storing results
KS capital supply
LS labour supply
p(J) price of goods
R price of capital
w price of labour
Y Total income
alpha(J) Expenditure shares of capital for production function
beta(J) Technology level parameter for production function
gamma Share of good A in utility function
;
*Values of endowments
KS = 600;
LS = 1000;
*Parameter values
alpha("A") = 0.6;
alpha("B") = 0.4;
beta("A") = 1;
beta("B") = 1;
gamma = 0.5;
*initialization of prices
p(J) = 1.2;
R = 0.5;
w = 0.5;
POSITIVE VARIABLES
Q(J) commodity G produced
C(J) consumption of commodity G
K(J) capital demand for producing G
L(J) labor demand for producing G
;
VARIABLES
U utility from consumption
;
*initialization and bounds for variables
K.L(J) = 0.5*KS; K.LO(J) = 0.01; K.UP(J) = KS;
L.L(J) = 0.5*LS; L.LO(J) = 0.01; L.UP(J) = LS;
Y = r*KS + w*LS;
C.LO(J) = 0.01;
EQUATIONS
*{add equation listing};
*{add equations}
MODEL EXAMPLE /ALL/;
LOOP (ITER,
SOLVE EXAMPLE MAXIMIZING U USING DNLP;
* p(J) = ABS({add equation_name.m});
* R = ABS({add equation_name.m});
* w = ABS({add equation_name.m});
Y = r*KS + w*LS;
);
*The wage rate might be zero, therefore we may normalise on the price of capital
IF(w LE 1E-05, scale = r; ELSE scale = w);
DISPLAY w, r, scale;
Y = Y/scale;
p(J) = p(J)/scale;
R = R/scale;
w = w/scale;
RESULT("1. base", "commodity price",J) = p(J);
RESULT("1. base", "Capital price","total") = R;
RESULT("1. base", "Wage","total") = w;
RESULT("1. base", "income","total") = Y;
RESULT("1. base", "production",J) =Q.L(J);
RESULT("1. base", "consumption",J)=C.L(J);
RESULT("1. base", "Utility","total")=U.L;
RESULT("1. base", "K",J)=K.L(J);
RESULT("1. base", "L",J)=L.L(J);
DISPLAY RESULT;