[原创]求lingo高手指教
model:<br/>sets:<br/>worker/1..3/;<br/>!the num of worker;<br/>cell/1..3/;<br/>!the num of cell;<br/>batch/1..6/;<br/>!the num of batch;<br/>wc(worker,cell):x;<br/>!the ith worker assigned to the jth cell;<br/>bc(batch,cell):y;<br/>!the mth batch assigned to the jth cell;<br/>matrix(worker,batch):c;<br/>!the capacity of ith worker mading the mth batch; <br/>endsets<br/><a href="mailto:min=@max(wc:@sum(bc:c(i,m)*x(i,j)*y(m,j">min=@max(wc:@sum(bc:c(i,m)*x(i,j)*y(m,j</a>)));<br/>!the obj function;<br/>@for(cell(j):@sum(worker(i):x(i,j))=3);<br/>@for(worker(i):@sum(cell(j):x(i,j))=1);<br/>@for(batch(m):@sum(cell(j):y(m,j))=1);<br/>@for(cell(j):@sum(batch(m):y(m,j))=6);<br/>data:<br/>c=62720,73728,35200,120384,29295,55080,<br/>8280,49152,48400,88704,37665,55080,<br/>47040,43008,61600,101376,33480,41310;<br/>enddata<br/>end <p>运行时显示 Error Code:63</p><p> Error Text:</p><p> Model is ill defined.</p><p> Check for undefined indices and/or conditions in expression:1</p><p> 这个错误什么意思,怎么改变程序才合理呢!</p><p> 谢谢拉!</p> <p>给你修改了一下,没有错误了,不过不清楚是不是和你原先的模型一样,最好把模型放上来看看!</p><p></p><p>model:<br/>sets:<br/>worker/1..3/;<br/>!the num of worker;<br/>cell/1..3/;<br/>!the num of cell;<br/>batch/1..6/;<br/>!the num of batch;<br/>wc(worker,cell):x;<br/>!the ith worker assigned to the jth cell;<br/>bc(batch,cell):y;<br/>!the mth batch assigned to the jth cell;<br/>matrix(worker,batch):c;<br/>!the capacity of ith worker mading the mth batch; <br/>endsets<br/><a href="mailto:min=@max(wc:@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</a>))));<br/>!the obj function;<br/>@for(cell(j):@sum(worker(i):x(i,j))=3);<br/>@for(worker(i):@sum(cell(j):x(i,j))=1);<br/>@for(batch(m):@sum(cell(j):y(m,j))=1);<br/>@for(cell(j):@sum(batch(m):y(m,j))=6);<br/>data:<br/>c=62720,73728,35200,120384,29295,55080,<br/>8280,49152,48400,88704,37665,55080,<br/>47040,43008,61600,101376,33480,41310;<br/>enddata<br/>end</p>
页:
[1]