$ontext ---------------------------------------------------------------------------------- GENERAL EQUILIBRIUM: MAXIMIZING UTILITY ---------------------------------------------------------------------------------- closed economy with two goods, two sectors and one representative household Cobb-Douglas functions SAM: X1 X2 W M total PX1 50 50 100 PX2 50 50 100 PW PK 30 20 50 100 PL 20 30 50 100 total 100 100 100 100 $offtext variables U total utility ; U.l= 100 ; positive variables X1 consumption of the good 1 X2 consumption of the good 2 L1 labour demand production good 1 L2 labour demand production good 2 K1 capital demand production good 1 K2 capital demand production good 2 M income of representative household Q1 production of good 1 Q2 production of good 2 PX1 price of good 1 PX2 price of good 2 PK price of capital PL price of labour ; *initial values X1.l=50; X2.l=50; Q1.l=50; Q2.l=50; parameter *briefly, the shift parameter simply scale the utility to provide the same value that the consumption. *it is not relevant in partial equilibrium, but it is important in a general equilibium approach to ensure the circular flow of income. sigma shift parameter of the utility function gamma_q1 shift parameter of production function Q1 gamma_q2 shift parameter of production function Q2; *the shift parameters are obtained inverting the respective function. *shift parameter for utility sigma = U.l / (X1.l**0.5*X2.l**0.5) ; *shift parameter for production; gamma_q1 = Q1.l/(30**0.6 * 20**0.4) ; gamma_q2 = Q2.l/(20**0.4 * 30**0.6) ; equations utility utility function demand_X1 demand good 1 demand_X2 demand good 2 demand_L1 demand labour production good 1 demand_L2 demand labour production good 2 demand_K1 demand capital production good 1 demand_K2 demand capital production good 2 market_X1 market clearance for good X1 market_X2 market clearance for good X2 production_X1 production of good 1 production_X2 production of good 2 market_K market clearance for capital K market_L market clearance for labour L income_constraint income constraint representative household ; *according to the SAM, the share of good X1 and X2 in total consumption is, respectively, 0.5 (50/100) and 0.5 (50/100) utility.. U =e= sigma * (X1**0.5*X2**0.5); demand_X1.. X1 =e= 0.5 *M / PX1 ; demand_X2.. X2 =e= 0.5 *M / PX2 ; market_X1.. X1 =e= Q1; market_X2.. X2 =e= Q2; market_K.. 50 =e= K1 + K2 ; market_L.. 50 =e= L1 + L2 ; *the share of K and L in the production of good Q1 is 0.6 (30/50) and 0.4 (20/50), respectively ; production_X1.. Q1 =e= gamma_q1 * (K1**0.6*L1**0.4) ; *the share of K and L in the production of good Q2 is 0.4 (20/50) and 0.6 (30/50), respectively ; production_X2.. Q2 =e= gamma_q2 * (K2**0.4*L2**0.6) ; demand_L1.. L1 =e= (0.4*Q1*PX1)/PL ; demand_L2.. L2 =e= (0.6*Q2*PX2)/PL ; demand_K1.. K1 =e= (0.6*Q1*PX1)/PK ; demand_K2.. K2 =e= (0.4*Q2*PX2)/PK ; income_constraint.. M =e= PK*50 + PL*50 ; model general_equilibrium /all/; *initial values U.l= 100 ; M.l= 100 ; PX1.l= 1 ; PX2.l= 1 ; PK.l = 1 ; PL.l = 1 ; K1.l= 30 ; L1.l= 20 ; K2.l= 20 ; L2.l= 30 ; X1.l= 50 ; X2.l= 50 ; Q1.l= 50 ; Q2.l= 50 ; *replication of the initial equilibrium option iterlim = 100 ; solve general_equilibrium using NLP maximizing U;