sum(bc:c(i,m)*x(i,j)*y(m,j)));
sum(worker(i):x(i,j))=3);
sum(cell(j):x(i,j))=1);
sum(cell(j):y(m,j))=1);
sum(batch(m):y(m,j))=6);运行时显示 Error Code:63
Error Text:
Model is ill defined.
Check for undefined indices and/or conditions in expression:1
这个错误什么意思,怎么改变程序才合理呢!
谢谢拉!
给你修改了一下,没有错误了,不过不清楚是不是和你原先的模型一样,最好把模型放上来看看!
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(wc
sum(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 |