Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GAMS ERROR!!

375 views
Skip to first unread message

Özlem Şeker

unread,
Jan 4, 2013, 7:52:13 AM1/4/13
to
Dear friend,
Please, Can you help me? In equation6, "U" which is unit step function:
If (beta(i,j)-alpha)>0 than "u" must assign to 0
else "u" must assign to 1.

1 Sets
2 i /1*3/
3 j /1*3/
4 l /1*24/
5 h /1*20/
6
7 ;
8
9 alias(j,jj);
10 alias(l, ll,lll,llll);
11 scalars
12 radius "radius of circular farm" /500/
13 R "rotor radius" /38.5/
14 Vcutin "cut-in speed" /3.5/
15 Vrated "rated speed" /14/
16 Prated "rated power" /1500/
17 lamda /140.86/
18 ct "thrust coefficient" /0.8/
19 k "spreading factor" /0.075/
20 n "intercept parameter" /-500/
21 Nt "number of turbines" /4/ ;
22
23 parameters
24 teta(l) wind direction
25 /
26 1 15
27 2 30
28 3 45
29 4 60
30 5 75
31 6 90
32 7 105
33 8 120
34 9 135
35 10 150
36 11 165
37 12 180
38 13 195
39 14 210
40 15 225
41 16 240
42 17 255
43 18 270
44 19 285
45 20 300
46 21 315
47 22 330
48 23 345
49 24 360
50 /
51 t(l) shape parameter
52 /
53
54 1 2
55 2 2
56 3 2
57 4 2
58 5 2
59 6 2
60 7 2
61 8 2
62 9 2
63 10 2
64 11 2
65 12 2
66 13 2
67 14 2
68 15 2
69 16 2
70 17 2
71 18 2
72 19 2
73 20 2
74 21 2
75 22 2
76 23 2
77 24 2
78 /
79 c(l) scale parameter
80 /
81 1 13
82 2 13
83 3 13
84 4 13
85 5 13
86 6 13
87 7 13
88 8 13
89 9 13
90 10 13
91 11 13
92 12 13
93 13 13
94 14 13
95 15 13
96 16 13
97 17 13
98 18 13
99 19 13
100 20 13
101 21 13
102 22 13
103 23 13
104 24 13
105 /
106
107 v(h) wind speed
108 /
109 1 4.0
110 2 4.5
111 3 5.0
112 4 5.5
113 5 6.0
114 6 6.5
115 7 7.0
116 8 7.5
117 9 8.0
118 10 8.5
119 11 9.0
120 12 9.5
121 13 10.0
122 14 10.5
123 15 11.0
124 16 11.5
125 17 12.0
126 18 12.5
127 19 13.0
128 20 13.5
129 /
130 w(l) wind blowing probability of i th wind direction interval
131 /
132 1 0
133 2 0.01
134 3 0.01
135 4 0.01
136 5 0.01
137 6 0.2
138 7 0.6
139 8 0.01
140 9 0.01
141 10 0.01
142 11 0.01
143 12 0.01
144 13 0.01
145 14 0.01
146 15 0.01
147 16 0.01
148 17 0.01
149 18 0.01
150 19 0.01
151 20 0.01
152 21 0.01
153 22 0.01
154 23 0.01
155 24 0.00
156 /;
157 variables
158 Vdef(i,j)
159 velocitydeficit(i)
160 P
161 x
162 y
163 objz
164 d(i,j)
165 a
166 b
167 alpha
168 beta(i,j)
169 u;
170
171 equations
172 obj
173 equ1
174 equ2
175 equ3
176 equ4
177 equ5
178 equ6
179 equ7
180 equ8
181 equ9
182 equ10
183 equ11
184
185
186
187 ;
188
189 obj .. objz=e=sum(i,P(i));
190 equ1 .. a=e=1-sqrt(1-ct);
191 equ2 .. b=e=k/R;
192 equ3(i,j,l)$(ord(i)<>ord(j)) .. d(i,j)=e=abs((x(i)-x(j))*cos(teta(l))+(y(i
)-y(j))*sin(teta(l)));
193 equ4 .. alpha=e=arctan(k);
194 equ5(i,j,l)$(ord(i)<>ord(j)) .. beta(i,j)=e=arccos((d(i,j)+(R/k))/sqrt(((x
(i)-x(j)+R/k*cos(teta(l)))**2)+((y(i)-y(j)+R/k*sin(teta(l)))**2)));
195 equ6(i,j).. Vdef(i,j)=e=u(beta(i,j)-alpha)*(a/sqr(1+b*d(i,j)));
**** $121,8,409
196 equ7(i) .. velocitydeficit(i)=e=sqrt((sum(j,Vdef(i,j)))**2);
197 equ8(i,l) .. c(l)=e=c(l)*(1-velocitydeficit(i));
198 equ9(i,j)$(ord(i)<>ord(j)) .. (x(i)-x(j))**2+(y(i)-y(j))**2=g=64*R**2;
199 equ10(i,j)$(ord(i)<>ord(j)) .. x(i)**2+y(i)**2=l=r**2;
200 ;
201
202 equ11(i,h,l) .. P(i)=e=sum(jj,lamda*((v(h-1)+v(h))/2))*sum(ll,((teta(l)-t
eta(l-1))*w(l-1)*
203 (exp(-((v(h-1)/c(l))*((teta(l)+teta(l+1))/2))**(t(l)*((teta(l)+teta(l+1))/
2)))-exp(-((v(h)/c(l))*((teta(l)+teta(l+1))/2))**(t(l)*((teta(l)+teta(l+1)
)/2))))+
204 sum(lll,Prated*((teta(l)-teta(l-1))*w(l-1))*
205 exp(-(Vrated/c(l)*((teta(l)+teta(l+1))/2))**(t(l)*((teta(l)+teta(l+1))/2))
+
206 sum(llll,n*((teta(l+1)-teta(l)))*w(l-1)*
207 (exp(-((Vcutin/c(l))*((teta(l)+teta(l+1))/2))**(t(l)*((teta(l)+teta(l+1))/
2)))))-
208 exp(-((Vrated/c(l))*((teta(l)+teta(l+1))/2))**(t(l)*((teta(l)+teta(l+1))/2
)))))));
209 Model optimization /all/ ;
210 Solve optimization using MINLP maximizing objz ;
**** $257
GAMS Rev 239 WEX-WEI 23.9.3 x86_64/MS Windows 01/04/13 14:17:27 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


8 ')' expected
121 Set expected
257 Solve statement not checked because of previous errors
409 Unrecognizable item - skip to find a new statement
looking for a ';' or a key word to get started again
0 new messages