model:
sets:
pipe/1..200/:n;
size/1..4/:length,need;
links(size,pipe):number;
endsets
data:
length=1.5 1.45 1.3 0.35;
need=200 200 300 1200;
enddata
@for(pipe(j)bin(n(j)));
@for(links(i,j)gin(number(i,j)));
@for(pipe(i)|i#lt#200:n(i)>=n(i+1));
@for(pipe(j)sum(size(i):length(i)*number(i,j))<=8*n(j));
@for(size(i):@sum(pipe(j):number(i,j))=need(i));
min=@sum(pipe(i):n(i));
以上是我写的lingo代码,运行时总是报错,求高人指点。
[ 本帖最后由 dingjun 于 2008-4-6 14:52 编辑 ] |