数学建模社区-数学中国
标题:
lingo中集循环函数i,j下标可以去掉吗?
[打印本页]
作者:
LCYMATH
时间:
2015-7-28 13:21
标题:
lingo中集循环函数i,j下标可以去掉吗?
model:
sets:
row/1..5/;
col/1..5/;
links(row,col):a,x;
endsets
data:
a=3 8 2 10 3
8 7 2 9 7
6 4 2 7 5
8 4 2 3 5
9 10 6 9 10;
enddata
min=@sum(links:a*x);
@for(links:@bnd(0,x,2));
@for(row(i):@sum(col(j):x(i,j))=1);
@for(col(j):@sum(row(i):x(i,j))=1);
@for(row(i):@sum(col(j):x(i,j))=1);
@for(col(j):@sum(row(i):x(i,j))=1);
中的i,j下标去掉为什么会对程序结果有影响?就是改成@for(row:@sum(col:x)=1);
作者:
liwenhui
时间:
2015-7-28 13:57
在你的另一个帖子里已经回答你了。
欢迎光临 数学建模社区-数学中国 (http://www.madio.net/)
Powered by Discuz! X2.5