软件编程版 #281212 层

请教一个lingo编程问题,谢谢阿

楼主 · 1 楼

model:
sets:
coordinates/0,1,2,3,4,5/:a;
securites/1..7/:x,R,mi,ma;
times/1..9/;
link1(coordinates,times):w;
link2(securites,times):y;
endsets
data:
y=-0.0
276 -0.031 0.0472 0.0554 0.0667 -0.0359 -0.0266 0.0159 -0.0324
0.0383 -0.0947 -0.0145 0.0044 0.1
275 -0.0189 0.0069 0.045 0.1252
-0.0359 -0.0018 0.0018 0.0118 0.0625 -0.0235 -0.0
293 0.0497 -0.0082
-0.0137 -0.0495 0.0811 0.0
295 0.0404 -0.0141 -0.0175 -0.0448 0.0193
0.0087 -0.0251 0.0147 0.0216 0.0321 -0.01
27 -0.032 -0.0343 0.0
294
0.0254 -0.0853 0.1203 0.0249 0.0402 0.1601 -0.0242 -0.2066 -0.0414
0.0
292 -0.0739 -0.0137 -0.0175 0.048 0.0579 -0.0402 -0.006 0.0359;
enddata@for(securites(j):R(j)=@sum(times(t):y(j,t))/9);@for(securites(j):mi(j)=@min(times(t):Y(j,t)-R(j)));
minn=@min(securites(j):mi(j));@for(securites(j):ma(j)=@max(times(t):Y(j,t)-R(j)));
maxx=@max(securites(j):ma(j));


end
我的目的是想求出min{y(j,t)-R(j),j=1,2,...7;t=1,2,....9}的值,运行时出错,请问,怎么修改阿? 可以发到我信箱阿,qchangcheng@126.com
2 楼
我知道了,不能对负数比较大小的[COLOR=red]