Dears, I have an error 125. The problem with the EQBOP, if I eliminate it, savings are equal investments, due to NX (net export) is 0. When I use EQBOP I have this error. What is wrong?
1 set
2 T time periods /20142064/
3 J producers (A=oil sector and B=non-oil sector) /A,B/
4 ;
5
6 PARAMETERS
7 A(J,T) technology level parameter for production function
8 alpha(J) expenditure shares of capital for production function
9 r discount rate
10 gl rate of labour force
11 delta depreciation rate
12 L0 labour force at t = 0 /96379/
13 K0 captial stock at t = 0 /676144/
14 gamma share of good A and B in utility function
15 p(J) price of goods
16
17 ;
18
19 Parameter values
20 A(J,T) = 1;
21 r=0.02;
22 gl = 0.01;
23 delta = 0.10;
24 alpha(“A”) = 0.20;
25 alpha(“B”) = 0.15;
26 gamma = 0.5;
27 p(J) = 1;
28
29
30 VARIABLES
31
32 C(J,T) consumption
33 L(J,T) labour force
34 LT(T) total labour
35 K(J,T) capital
36 I(J,T) investment
37 Y(J,T) economic activity or output
38 Y1(J,T) economic activity or output Y1
39 U(T) utility
40 TOTU objective function
41 EX(J,T) export
42 IM(J,T) import
43 NX(J,T) net export
44 S(J,T) savings
45 BOP
46 ;
47
48
49 POSITIVE VARIABLES C(J,T), L(J,T), K(J,T), I(J,T), Y1(J,T), LB(J,T);
50
51
52 EQUATIONS
53
54 EQL(J,T) labour force for A and B
55 EQLT(T) total labour
56 EQLB(J,T) labour force distributed
57 EQK(J,T) capital
58 EQY(J,T) economic activity
59 EQY1(J,T) economic activity Y1
60 EQU(T) utility
61 EQTOTU objectie fuction
62 EQEX(J,T) export
63 EQIM(J,T) import
64 EQNX(J,T) net export
65 EQS(J,T) savings
66 EQBOP(J,T)
67
68 ;
69
70 EQL(J,T)… L(J,T) =E= L0(1+gl)**(ORD(T));
71 EQLT(T)… LT(T) =E= sum(J,L(J,T));
72 EQLB(J,T)… LT(T) =E= LB(“A”,T)+LB(“B”,T);
73 EQK(J,T)… K(J,T) =E= (K0$(ord(T)=1)+K(J,T-1))(1-delta)+I(J,T);
74 EQY(J,T)… Y(J,T) =E= A(J,T)K(J,T)alpha(J)*L(J,T)(1-ALPHA(J));
75 EQY1(J,T)… Y(J,T) =E= C(J,T)+I(J,T)+NX(J,T);
76 EQU(T)… U(T) =E= (C(“A”,T)**gamma)(C(“B”,T)(1-gamma))/((1+r)(O
RD(T)-1));
77 EQTOTU… TOTU =E= sum(T,U(T));
78 EQNX(J,T)… NX(J,T) =E= EX(J,T)-IM(J,T);
79 EQIM(J,T)… IM(J,T) =E= 0.5C(J,T);
80 EQEX(J,T)… EX(J,T) =E= IM(J,T);
81 EQS(J,T)… S(J,T) =E= Y(J,T)-C(J,T);
82 EQBOP(J,T)… SUM(J,p(J)(EX(J,T)-IM(J,T)))=E=0;
**** $125
83
84
85
86 L.L(J,T)=L0;
87 K.L(J,T)=K0;
88
89
90
91 MODEL INVEST /ALL/;
92 SOLVE INVEST USING DNLP MAXIMIZING TOTU;
**** $257
93
94
95 DISPLAY Y.L, C.L, L.L, K.L, I.L, S.L, U.L, TOTU.L, EX.L, IM.L, NX.L;
**** $141 $141 $141 $141 $141 $141 $141 $141 $141
GAMS Rev 148 x86/MS Windows 09/11/14 15:15:30 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
Error Messages
125 Set is under control already
141 Symbol neither initialized nor assigned
A wild shot: You may have spurious commas in the explanatory
text of a declaration. Check symbol reference list.
257 Solve statement not checked because of previous errors
–
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.