lingo中说属性不正确
model:sets:demand/1..6/;warehouse/1..6/:y,p;item/1,2,3/;link1(demand,warehouse):c;lin...
model:
sets:
demand/1..6/;
warehouse/1..6/:y,p;
item/1,2,3/;
link1(demand,warehouse):c;
link2(demand,item):a;
link3(warehouse,item):s,b;
endsets
data:
a=600 500 700
400 600 300
500 600 400
500 400 700
700 300 500
600 500 600;
s=0.8 0.8 0.7
0.9 0.7 0.8
0.9 0.9 0.8
0.8 0.9 0.9
0.7 0.9 0.7
0.8 0.7 0.8;
b=3000 2700 3200
3500 3000 2800
2800 3000 3000
3000 3500 2900
3200 3000 3000
2800 2900 2700;
p=3;
enddata
max=@sum(link1(i,j):@sum(link2(i,m):a(i,m)*c(i,j)));
@for(warehouse(j):@sum(warehouse(j):y(j))=p);
@for(link1(i,j):c(i,j)<=y(j));
@for(demand(i):@sum(demand(i):a(i,m)*c(i,j))<=s(j,m)*b(j,m)*y(j));
@bin(c);@bin(y);
end 展开
sets:
demand/1..6/;
warehouse/1..6/:y,p;
item/1,2,3/;
link1(demand,warehouse):c;
link2(demand,item):a;
link3(warehouse,item):s,b;
endsets
data:
a=600 500 700
400 600 300
500 600 400
500 400 700
700 300 500
600 500 600;
s=0.8 0.8 0.7
0.9 0.7 0.8
0.9 0.9 0.8
0.8 0.9 0.9
0.7 0.9 0.7
0.8 0.7 0.8;
b=3000 2700 3200
3500 3000 2800
2800 3000 3000
3000 3500 2900
3200 3000 3000
2800 2900 2700;
p=3;
enddata
max=@sum(link1(i,j):@sum(link2(i,m):a(i,m)*c(i,j)));
@for(warehouse(j):@sum(warehouse(j):y(j))=p);
@for(link1(i,j):c(i,j)<=y(j));
@for(demand(i):@sum(demand(i):a(i,m)*c(i,j))<=s(j,m)*b(j,m)*y(j));
@bin(c);@bin(y);
end 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |