Market Equilibrium
{ Prolog.mpl }
{ GAMS Model Library, http://www.gams.com/modlib/libhtml/prolog.htm }
{ Market Equilibrium and Activity Analysis, NLP, Size: 30x22 }
TITLE
Prolog;
Option
Modeltype=nonlinear
Parsertype=extended
INDEX
i := (food, hindustry, lindustry);
g[i] := (food,lindustry);
k := (labor, capital);
h := (worker, enterpr);
t := 1..3;
j := i;
! gp[i] := g;
gp[i] := (food,lindustry);
DATA
M := 1000000;
A[i,j] := ( 0.60, 0.00,0.244
0.064,0.420,0.172,
0.048,0.247,0.084);
D[i,k,t] := (1.0,2.0,1.2,1.8,0.8,2.2,
2.0,3.0,1.8,3.5,2.4,2.3
3.0,3.0,2.7,3.2,3.2,2.7);
Bb[h,k] := (0.9,0.1,
0.1,0.9);
X0[g,h] := (352,430,
! 0, 0,
222,292);
B[k] := (3712,5000);
P0[i] := (0.5942,1.6167,1.31077);
Y0[h] := SUM(g: X0*P0);
R0 := SUM(h: Y0/SUM(k: B));
DEpsi[g,h] := ( 0.8, 0.6,
1.14,1.26);
Omega := -2;
Alpha[g,h] := FORMULA(P0*X0/Y0);
Epsi[g,h] := FORMULA(DEpsi/SUM(gp: DEpsi[g:=gp]*Alpha[g:=gp]));
Beta[g,h] := FORMULA(Epsi*Alpha);
Gamma[g,h] := FORMULA(X0 + Beta*Y0/P0/Omega);
DEta[g,gp,h] := FORMULA(-Gamma[g:=gp]*P0[i:=gp]*Beta/P0/X0);
! Eta[g,gp,h] := FORMULA(Gamma*(1-Beta)/X0 - 1);
Eta[g,gp,h] := [food,food,worker,-0.602,
food,food,enterpr,-0.470,
food,lindustry,worker,-0.200,
food,lindustry,enterpr,-0.133,
lindustry,food,worker,-0.286,
lindustry,food,enterpr,-0.354,
lindustry,lindustry,worker,-0.856
lindustry,lindustry,enterpr,-0.911];
!Cant read this An[g,h] := FORMULA(X0/(P0[i:=food]^Eta[gp:=food] * P0[i:=lindustry]^Eta[gp:=lindustry])/Y0^Espi);
AnFWorker[i=food,h=worker] := FORMULA(X0/(P0^-0.602*P0^-0.2)/Y0^Epsi);
AnFEnterpr[i=food,h=enterpr] := FORMULA(X0/(P0^-0.47*P0^-0.133)/Y0^Epsi);
AnLWorker[i=lindustry,h=worker] := FORMULA(X0/(P0^-0.286*P0^-0.856)/Y0^Epsi);
AnLEnterpr[i=lindustry,h=enterpr] := FORMULA(X0/(P0^-0.354*P0^-0.911)/Y0^Epsi);
AnFW[i=food,h=worker] := FORMULA(P0^-0.602*P0^-0.2);
AnFE[i=food,h=enterpr] := FORMULA(P0^-0.47*P0^-0.133);
AnLW[i=lindustry,h=worker] := FORMULA(P0^-0.286*P0^-0.856);
AnLE[i=lindustry,h=enterpr] := FORMULA(P0^-0.354*P0^-0.911);
DENSE DATA
DAn[i,h] := AnFWorker + AnFEnterpr + AnLWorker + AnLEnterpr;
An[g,h] := DAn[i:=g];
DatAn[g,h] := AnFW + AnFE + AnLW + AnLE;
DATA
Cl[g,h] := FORMULA(Epsi*X0/Y0);
S[g,gp,h] := FORMULA(Eta*X0/P0[i:=gp]);
Al[g,h] := FORMULA(X0 - SUM(gp: S*P0[i:=gp]) - Cl*Y0);
Etest[h] := FORMULA(SUM(g: Epsi*Alpha) - 1);
Htest[g,h] := FORMULA(SUM(gp: Eta) + Epsi);
Ctest[g,h] := FORMULA(SUM(gp: Alpha*Eta) + Alpha);
VARIABLE
P[i] INITIAL P0;
X[i,h] INITIAL X0;
R[k] INITIAL R0;
Q[i,t];
Y[h] INITIAL Y0;
MODEL
MAX Obj = SUM(g,h: X*P[i:=g]) - SUM(k: B*R);
SUBJECT TO
Cb[i]: SUM(h: X) <= SUM(t: Q - SUM(j: A*Q));
Rc[k]: SUM(i,t: D*Q) <= B;
De[g,h]: X <= Gamma + Beta*(Y-SUM(gp: Gamma[g:=gp]*P[i:=gp]))/P[i:=g];
Dl[g,h]: X <= Al + SUM(gp: S*P[i:=gp]) + Cl*Y;
Dn[g,h]: X <= An*DatAn*Y^Epsi;
Bc[h]: SUM(g: X*P) <= Y;
Id[h]: Y <= SUM(k: Bb*B*R);
Mp[i,t]: P <= SUM(j: A[i:=j,j:=i]*P[i:=j]) + SUM(k: D*R);
BOUNDS
0.2 <= P <= M;
0 <= X <= M;
0 <= R <= M;
0 <= Q <= M;
0 <= Y <= M;
END
Back To Top
|
Maximal Home Page
|
List of Models |
Previous Page
|
Next Page