lingo中的 error12报错,为什么,程序如下
问题描述:
lingo中的 error12报错,为什么,程序如下
model:
sets:
WH/W1..W6/:AL;VD/V1..V8/:DJ;
links(wh,vd):x,c;
endsets
data:
al=60,55,51,43,41,52;dj=35,37,33,32,41,32,43,38;
c=6,2,6,7,4,2,5,9
4,9,5,3,8,5,8,2
5,2,1,9,7,4,3,3
7,6,7,3,9,2,7,1
2,3,9,5,7,2,6,5
5,5,5,5,8,1,4,3;
ENDDATA
min=@sum(links(i,j):c(i,j)*x(i,j));
@for(wh(i):@sum(vd(j):x(i,j) @for(vd(j):@sum(wh(i):x(i,j)=dj(j));
end
小于等于号老是报错,error 12为什么
答
sets:
WH/W1..W6/:AL;
VD/V1..V8/:DJ;
links(wh,vd):x,c;
endsets
data:
al=60,55,51,43,41,52;dj=35,37,33,32,41,32,43,38;
c=6,2,6,7,4,2,5,9
4,9,5,3,8,5,8,2
5,2,1,9,7,4,3,3
7,6,7,3,9,2,7,1
2,3,9,5,7,2,6,5
5,5,5,5,8,1,4,3;
ENDDATA
min=@sum(links(i,j):c(i,j)*x(i,j));
@for(wh(i):@sum(vd(j):x(i,j) )能不能帮我看一下我的是哪里有问题呀仔细比较两个@for语句,
应该求和的值小于al(i)吧,x(i,j)