关于 LINGO @FOR 语句
请问下面的@for语句中为什么@for(set1(i):@sum(set1(k):x(k))=1);ijk总是在换啊?具体是什么意思呢?model:sets:set1/1...
请问下面的@for 语句中为什么@for(set1(i):@sum(set1(k):x(k))=1); i j k 总是在换啊?具体是什么意思呢?
model:
sets:
set1/1..2/:x;
set2/1..2/:y;
link(set1,set2):a,b;
endsets
@for(set1(i):@sum(set1(k):x(k))=1);
@for(set2(j):@sum(set2(k):y(k))=1);
@for(link(i,j):@sum(link(p,q):x(p)*a(p,q)*y(q))
>=@sum(link(i,q):a(i,q)*y(q)));
@for(link(i,j):@sum(link(p,q):x(p)*b(p,q)*y(q))
>=@sum(link(t,j):x(t)*b(t,j)));
data:
a=70 100
40 140;
b=70 40
100 140;
enddata
end 展开
model:
sets:
set1/1..2/:x;
set2/1..2/:y;
link(set1,set2):a,b;
endsets
@for(set1(i):@sum(set1(k):x(k))=1);
@for(set2(j):@sum(set2(k):y(k))=1);
@for(link(i,j):@sum(link(p,q):x(p)*a(p,q)*y(q))
>=@sum(link(i,q):a(i,q)*y(q)));
@for(link(i,j):@sum(link(p,q):x(p)*b(p,q)*y(q))
>=@sum(link(t,j):x(t)*b(t,j)));
data:
a=70 100
40 140;
b=70 40
100 140;
enddata
end 展开
若以下回答无法解决问题,邀请你更新回答
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询