数学建模社区-数学中国

标题: [原创]求lingo高手指教 [打印本页]

作者: starada1221    时间: 2007-5-9 20:01
标题: [原创]求lingo高手指教
model:
sets:
worker/1..3/;
!the num of worker;
cell/1..3/;
!the num of cell;
batch/1..6/;
!the num of batch;
wc(worker,cell):x;
!the ith worker assigned to the jth  cell;
bc(batch,cell):y;
!the mth batch assigned to the jth cell;
matrix(worker,batch):c;
!the capacity of ith worker mading the mth batch;
endsets
sum(bc:c(i,m)*x(i,j)*y(m,j">min=@max(wcsum(bc:c(i,m)*x(i,j)*y(m,j)));
!the obj function;
@for(cell(j)sum(worker(i):x(i,j))=3);
@for(worker(i)sum(cell(j):x(i,j))=1);
@for(batch(m)sum(cell(j):y(m,j))=1);
@for(cell(j)sum(batch(m):y(m,j))=6);
data:
c=62720,73728,35200,120384,29295,55080,
8280,49152,48400,88704,37665,55080,
47040,43008,61600,101376,33480,41310;
enddata
end
作者: starada1221    时间: 2007-5-9 20:05

运行时显示  Error Code:63

    Error Text:

      Model is ill defined.

      Check for undefined indices and/or conditions in expression:1

 这个错误什么意思,怎么改变程序才合理呢!

  谢谢拉!


作者: madio    时间: 2007-5-13 12:33

给你修改了一下,没有错误了,不过不清楚是不是和你原先的模型一样,最好把模型放上来看看!

model:
sets:
worker/1..3/;
!the num of worker;
cell/1..3/;
!the num of cell;
batch/1..6/;
!the num of batch;
wc(worker,cell):x;
!the ith worker assigned to the jth  cell;
bc(batch,cell):y;
!the mth batch assigned to the jth cell;
matrix(worker,batch):c;
!the capacity of ith worker mading the mth batch;
endsets
sum(cell(j)sum(matrix(i,m):c(i,m)*x(i,j)*y(m,j">min=@max(wcsum(cell(j)sum(matrix(i,m):c(i,m)*x(i,j)*y(m,j))));
!the obj function;
@for(cell(j)sum(worker(i):x(i,j))=3);
@for(worker(i)sum(cell(j):x(i,j))=1);
@for(batch(m)sum(cell(j):y(m,j))=1);
@for(cell(j)sum(batch(m):y(m,j))=6);
data:
c=62720,73728,35200,120384,29295,55080,
8280,49152,48400,88704,37665,55080,
47040,43008,61600,101376,33480,41310;
enddata
end






欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) Powered by Discuz! X2.5