Zero profit

Hey,
I am a new GAMS user. I am trying to build a partial equilibirum model. Ideally, in the results profit function should be equal to zero. However, the results give positive profit.
Could you please advise what I might done wrong?

Thanks,
Aziz


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Hey,



Any idea how anybody could answer your question with almost no information. Please read the guidelines to this forum

Cheers



Renger


\


Modelworks

Gewerbestrasse 15

3600 Thun – Switzerland

+41 79 818 53 73

Info@modelworks.ch

blog.modelworks.ch









From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Azizbek Daujanov
Sent: Friday, October 31, 2014 1:43 PM
To: gamsworld@googlegroups.com
Subject: Zero profit



Hey,
I am a new GAMS user. I am trying to build a partial equilibirum model. Ideally, in the results profit function should be equal to zero. However, the results give positive profit.
Could you please advise what I might done wrong?

Thanks,
Aziz


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Hey,
I am a new GAMS user. I am trying to build a partial equilibirum model. Ideally, in the results profit function should be equal to zero. However, the results give positive profit.
Could you please advise what I might done wrong?

Thanks,
Aziz




$offlisting
Option solprint = on;
Option limrow = 0;
Option limcol = 0;

SETS
ITER Negishi Iterations /IT1*IT6/
J Farmers that produce commodity G (A=Cotton and B=Wheat and C=Vegetables) /A,B,C/
;

PARAMETERS
scale only relative prices matter so scale all prices
RESULT(,,*) parameter for storing results
KS capital supply
LS labour supply
AS land supply
p(J) price of goods
R price of capital
w price of labour
i price of land
Y Total income
alpha(J) Expenditure shares of capital for production function
gamma(J) Expenditure shares of land for production function
beta(J) Technology level parameter for production function
Kappa Share of cotton in utility function (elasticity of cotton with respect to utility)
lambda Share of wheat in utility function (elasticity of wheat with respect to utility)

;


KS = 100
;
LS = 100
;
AS = 100
;
*the land supply (AS) is given as 100% and then the benchmark scenario is calibrated as distrubution of this 100% for different crops

alpha(“A”) = 0.951375516;
alpha(“B”) = 0.731496622;
alpha(“C”) = 0.707058144;
gamma(“A”) = 0;
gamma(“B”) = 0.239240717;
gamma(“C”) = 0.220353187;
beta(“A”) = 0.470455045
;
beta(“B”) = 0.69868095
;
beta(“C”) = 0.848599911
;

kappa = 0.3576
;
lambda = 0.0220
;

*initialization of prices
p(J) = 0.1;
R = 0.1;
w = 0.1;
i = 0.1;

POSITIVE VARIABLES
Q(J) crop G produced
C(J) consumption of crop G
K(J) capital demand for producing G
L(J) labor demand for producing G
A(J) land demand for producing G

;

VARIABLES
U utility from consumption
PRF(J) profits
;

initialization and bounds for variables
K.L(J) = 0.1KS;
K.LO(J) = 0.01; K.UP(J) = KS;
L.L(J) = 0.5LS;
L.LO(J) = 0.01; L.UP(J) = LS;
A.LO(J) = 0.01; A.UP(J) = AS;
Y = r
KS + wLS+iAS;
C.LO(J) = 0.01;


EQUATIONS
EqU Utility function
EqQ(J) Production function of all three producers
EqO(J) Balance of consumption and production
EqKS Capital maximum is equal to capital stock
EqLS Labour maximum is equal to labour stock
EqAS Land maximum is equal to land stock
EqY Budget constraint
EqPRF(J) Profit function to ensure zero profit condition

;

EqU… U =E= (C(“A”)kappa)(C(“B”)**lambda)(C(“C”)(1-kappa-lambda));
EqQ(J)… Q(J) =E= beta(J)(K(J)**alpha(J))(A(J)gamma(J))*(L(J)(1-alpha(J)-gamma(J)));
EqO(J)… C(J) =L= Q(J);
EqKS… KS =G= sum(J, K(J));
EqLS… LS =G= sum(J, L(J));
EqAS… AS =G= sum (J, A(J));
EqY… Y =G= sum(J, p(J)C(J));
EqPRF(J)… PRF(J) =E= p(J)Q(J)-rK(J)-w
L(J)-i*A(J);




MODEL APEM /ALL/;

LOOP (ITER,
SOLVE APEM MAXIMIZING U USING DNLP;
p(J) = ABS(EqO.m(J));
R = ABS(EqKS.m);
w = ABS(EqLS.m);
i = ABS(EqAS.m);
Y = rKS + wLS+i*AS;
);

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, i, scale;
Y = Y/scale;
p(J) = p(J)/scale;
R = R/scale;
w = w/scale;
i= i/scale;
PRF.l(J) = P(J)Q.l(J)-rK.l(J)-w
L.l(J)-i*A.l(J);

RESULT(“0. base”, “commodity price”,J) = p(J);
RESULT(“0. base”, “Capital price”,“total”) = R;
RESULT(“0. base”, “Wage”,“total”) = w;
RESULT(“0. base”, “income”,“total”) = Y;
RESULT(“0. base”, “production”,J) =Q.L(J);
RESULT(“0. base”, “consumption”,J)=C.L(J);
RESULT(“0. base”, “Utility”,“total”)=U.L;
RESULT(“0. base”, “A”,J)=A.L(J);
RESULT(“0. base”, “K”,J)=K.L(J);
RESULT(“0. base”, “L”,J)=L.L(J);
RESULT(“0. base”, “AT”,“total”)=A.L(“A”)+A.L(“B”)+A.L(“C”);
RESULT(“0. base”, “LT”,“total”)=L.L(“A”)+L.L(“B”)+L.L(“C”);
RESULT(“0. base”, “KT”,“total”)=K.L(“A”)+K.L(“B”)+K.L(“C”);
RESULT(“0. base”, “PRF”,J)=PRF.l(J);

DISPLAY RESULT;


AS = 950

MODEL APEM_LD /ALL/;

LOOP (ITER,
SOLVE APEM_LD MAXIMIZING U USING DNLP;
p(J) = ABS(EqO.m(J));
R = ABS(EqKS.m);
w = ABS(EqLS.m);
i = ABS(EqAS.m);
Y = rKS + wLS+i*AS;
);

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, i, scale;
Y = Y/scale;
p(J) = p(J)/scale;
R = R/scale;
w = w/scale;
i= i/scale;
PRF.l(J) = P(J)Q.l(J)-rK.l(J)-w
L.l(J)-i*A.l(J);

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”, “A”,J)=A.L(J);
RESULT(“1. base”, “K”,J)=K.L(J);
RESULT(“1. base”, “L”,J)=L.L(J);
RESULT(“1. base”, “AT”,“total”)=A.L(“A”)+A.L(“B”)+A.L(“C”);
RESULT(“1. base”, “LT”,“total”)=L.L(“A”)+L.L(“B”)+L.L(“C”);
RESULT(“1. base”, “KT”,“total”)=K.L(“A”)+K.L(“B”)+K.L(“C”);
RESULT(“1. base”, “PRF”,J)=PRF.l(J);

DISPLAY RESULT;
189 PARAMETER RESULT parameter for storing results

A B C total

  1. base.A 0.010 3.707 96.283
  2. base.commodity price 28.772 21.772 18.239
  3. base.Capital price 12.605
  4. base.Wage 1.000
  5. base.income 1585.665
  6. base.production 19.708 1.602 53.937
  7. base.consumption 19.708 1.602 53.937
  8. base.Utility 34.828
  9. base.K 42.796 2.024 55.180
  10. base.L 27.571 1.021 71.408
  11. base.AT 100.000
  12. base.LT 100.000
  13. base.KT 100.000
  14. base.PRF -0.023 4.179262E-6 -6.21145E-9
  15. base.A 0.010 100.000 100.000
  16. base.commodity price 28.772 9.898 18.087
  17. base.Capital price 12.605
  18. base.Wage 1.000
  19. base.income 1360.528
  20. base.production 19.708 3.524 54.389
  21. base.consumption 19.708 3.524 54.389
  22. base.Utility 35.621
  23. base.K 42.796 2.024 55.180
  24. base.L 27.571 1.021 71.408
  25. base.AT 200.010
  26. base.LT 100.000
  27. base.KT 100.000
  28. base.PRF 4.60894E-11 8.346 216.769



    EXECUTION TIME = 0.000 SECONDS 3 MB 24.2.2 r44857 WIN-VS8


    USER: GAMS Development Corporation, Washington, DC G871201/0000CA-ANY
    Free Demo, 202-342-0180, sales@gams.com, www.gams.com DC0000



    To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
    To post to this group, send email to gamsworld@googlegroups.com.
    Visit this group at http://groups.google.com/group/gamsworld.
    For more options, visit https://groups.google.com/d/optout.