用lingo解体操阵容

来源:百度知道 编辑:UC知道 时间:2024/06/30 08:57:59
目标函数为:max∑∑Lij*Xij i从1——10 j从1——4
约束条件为:∑Mi=4
∑Xij-Mi<=4 j从1——4
∑Xij-4Mi》=0 j从1——4
∑Xij=6 i从1——10

Mi Xij取值为0和1
Lij的值为
8.4 8.4 9.1 8.7
9.3 8.4 8.4 8.9
8.4 8.1 8.4 9.5
8.1 8.7 9 8.4
8.4 9 8.3 9.4
9.4 8.7 8.5 8.4
9.5 8.4 8.3 8.4
8.4 8.8 8.7 8.2
8.4 8.4 8.4 9.3
9 8.1 8.2 9.1;

谢啦 急用哦
我运行了下面的程序,但是出现error108,怎么解决呢?

model:
sets:
row/1..10/:M;
column/1..4/;
square(row,column):X,L;
endsets
data:
L= 8.4 8.4 9.1 8.7
9.3 8.4 8.4 8.9
8.4 8.1 8.4 9.5
8.1 8.7 9 8.4
8.4 9 8.3 9.4
9.4 8.7 8.5 8.4
9.5 8.4 8.3 8.4
8.4 8.8 8.7 8.2
8.4 8.4 8.4 9.3
9 8.1 8.2 9.1;
enddata
Max=@sum(square(i,j):L(i,j)*X(i,j));
@sum(row(i):M(i))=4;
@for(row(i):(@sum(column(j):X(i,j))-M(i))<=4);
@for(row(i):(@sum(column(j):X(i,j))-M(i))>=0);
@for(column(j):@sum(row(i):X(i,j))=6);
@for(row(i):@bin(M(i)));
@for(square(i,j):@bin(X(i,j)));
end

自己看下应该没问题 我在自己电脑上运行没问题,你把error text给我看一下