发布网友 发布时间: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