求修改lingo代码,不知道哪里错了,求帮忙!

发布网友 发布时间:2024-10-24 12:54

我来回答

1个回答

热心网友 时间:2024-11-19 07:59

标点都要用英文的

model:
sets:
need/1..4/:length,b;
cut/1..3/:x;
pattern(need,cut):r;
endsets
data:
length=4 5 6 8;
b=50 10 20 15;
capacity=19;
enddata
min=@sum(cut(i):x(i));
@for(need(i):@sum(cut(j):x(j)*r(i,j))>b(i));
@for(cut(j):@sum(need(i):length(i)*r(i,j))<capacity);
@for(cut(j):@sum(need(i):length(i)*r(i,j))>capacity-@min(need(i):length(i)));
@sum(cut(i):x(i))>26; @sum(cut(i):x(i))<31;
@for(cut(i)|i#LT#@size(cut):x(i)>x(i+1));
@for(cut(j):@gin(x(j)));
@for(pattern(i,j):@gin(r(i,j)));
end

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com