Lingo执行时有一个下标超出范围,求高人指点啊~~~

MODEL:!daya,dayb;sets:Daya/0,1,2,3/:a;Dayb/1..4/:b;Dayk/1..4/:k;Link(Daya,Dayb):r,w,d... MODEL:
!daya,dayb;
sets:
Daya/0,1,2,3/:a;
Dayb/1..4/:b;
Dayk/1..4/:k;
Link(Daya,Dayb):r,w,d,x;
Link1(Daya,Dayb,Dayk);
endsets
data:
a=0,1,2,3;
b=1,2,3,4;
k=1,2,3,4;

r=780,0,0,0,
1560,780,0,0,
2340,1560,780,0,
3120,2340,1560,780;

w=588,90000,90000,90000,
1176,588,90000,90000,
1764,1176,588,90000,
2352,1764,1176,588;

d=20,0,0,0,
35,20,0,0,
90,25,17,0,
120,120,30,50;
enddata
[OBJ]max=0.10*@sum(Link(a,b):r(a,b)*x(a,b))-0.1*@sum(Link(a,b):w(a,b)*x(a,b))-0.1*500*@sum(Link(a,b):d(a,b)+0.1*x(a,b)-x(a,b));
@sum(Link(a,b):x(a,b))+@sum(Link1(a,b,k):x(k,b))-@sum(Link1(a,b,k):x(a,k))<=400;
@sum(Link(a,b):x(0,b))<=400;
@for(Link(a,b):x(a,b)<=123);
@for(Link(a,b):@gin(x(a,b)));
END
展开
 我来答
wswhk
2010-05-27 · TA获得超过7.1万个赞
知道顶级答主
回答量:4.6万
采纳率:68%
帮助的人:7.4亿
展开全部
你变量名和指标都重复了 当然不行了 你的集操作很有问题
MODEL:
!daya,dayb;
sets:
Day/1..4/:;
Link(Day,Day):r,w,d,x;
Link1(Day,Day,Day);
endsets
data:

r=780,0,0,0,
1560,780,0,0,
2340,1560,780,0,
3120,2340,1560,780;

w=588,90000,90000,90000,
1176,588,90000,90000,
1764,1176,588,90000,
2352,1764,1176,588;

d=20,0,0,0,
35,20,0,0,
90,25,17,0,
120,120,30,50;
enddata
[OBJ]max=0.10*@sum(Link(a,b):r(a,b)*x(a,b))-0.1*@sum(Link(a,b):w(a,b)*x(a,b))-0.1*500*@sum(Link(a,b):d(a,b)+0.1*x(a,b)-x(a,b));
@sum(Link(a,b):x(a,b))+@sum(Link1(a,b,k):x(k,b))-@sum(Link1(a,b,k):x(a,k))<=400;
@sum(day(b):x(1,b))<=400;
@for(Link(a,b):x(a,b)<=123);
@for(Link(a,b):@gin(x(a,b)));
END
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式