问题描述:
请问下面这个LINGO程序为什么不出结果呢.
model:
sets:
score/1..3/;
team/1..6/;
match(team,team):x;
endsets
x(1,2)+x(1,4)+x(1,5)+x(1,6)=6;
x(2,1)+x(2,3)+x(2,4)+x(2,5)+x(2,6)=4;
x(3,2)+x(3,4)+x(3,6)=6;
x(4,1)+x(4,2)+x(4,3)+x(4,5)+x(4,6)=3;
x(5,1)+x(5,2)+x(5,4)+x(5,6)=8;
x(6,1)+x(6,2)+x(6,3)+x(6,4)+x(6,5)=8;
@for(match:@gin(x));!x取整;
@for(match:@bnd(0,x,3));!x取0,1,2,3;
@for(match(i,j):@abs(x(i,j)-2)
model:
sets:
score/1..3/;
team/1..6/;
match(team,team):x;
endsets
x(1,2)+x(1,4)+x(1,5)+x(1,6)=6;
x(2,1)+x(2,3)+x(2,4)+x(2,5)+x(2,6)=4;
x(3,2)+x(3,4)+x(3,6)=6;
x(4,1)+x(4,2)+x(4,3)+x(4,5)+x(4,6)=3;
x(5,1)+x(5,2)+x(5,4)+x(5,6)=8;
x(6,1)+x(6,2)+x(6,3)+x(6,4)+x(6,5)=8;
@for(match:@gin(x));!x取整;
@for(match:@bnd(0,x,3));!x取0,1,2,3;
@for(match(i,j):@abs(x(i,j)-2)
问题解答:
我来补答展开全文阅读