lingo 约束条件 顺序lingo中,约束条件的顺序对结果有什么影响?为什么?程序1model:sets:worker/w1..w5/:;job/j1..j5/:;links(worker,job):c,x;endsetsdata:c=8,6,10,9,12,9,12,7,11,9,7,4,3,5,8,9,5,8,11,8,4,6,7,5,11;enddatamin=@sum(links:c*x);@for(job(j):@sum(worker(i):x(i,j))=1);@for(worker(i):@sum(job(j):x(i,j))=1);@for(links:@bin(x));end 程序2model:sets:worker/w1..w5/:;job/j1..j5/:;links(worker,job):c,x;endsetsdata:c=8,6,10,9,12,9,12,7,11,9,7,4,3,5,8,9,5,8,11,8,4,6,7,5,11;enddatamin=@sum(li

问题描述:

lingo 约束条件 顺序
lingo中,约束条件的顺序对结果有什么影响?为什么?
程序1
model:
sets:
worker/w1..w5/:;
job/j1..j5/:;
links(worker,job):c,x;
endsets
data:
c=8,6,10,9,12,
9,12,7,11,9,
7,4,3,5,8,
9,5,8,11,8,
4,6,7,5,11;
enddata
min=@sum(links:c*x);
@for(job(j):@sum(worker(i):x(i,j))=1);
@for(worker(i):@sum(job(j):x(i,j))=1);
@for(links:@bin(x));
end
程序2
model:
sets:
worker/w1..w5/:;
job/j1..j5/:;
links(worker,job):c,x;
endsets
data:
c=8,6,10,9,12,
9,12,7,11,9,
7,4,3,5,8,
9,5,8,11,8,
4,6,7,5,11;
enddata
min=@sum(links:c*x);
@for(worker(i):@sum(job(j):x(i,j))=1);
@for(job(j):@sum(worker(i):x(i,j))=1);
@for(links:@bin(x));
end
的结果不一样,为什么呢?

没有影响,只是这两个都是问题的解罢了。

mei you

没什么大的影响.