求修改lingo代码,不知道哪里错了,代码如下:model:sets:need/1..4/:length,b;cut/1..3/:x;pattern(need,cut):r;endsetsdata:length=4 5 6 8;b=50 10 20 15;capacity=19;enddatamin=@sum(cut(i):x(i));@for(need(i):@sum(cut(j):x(j)*r(i,j))>b(i))
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/29 09:15:43
求修改lingo代码,不知道哪里错了,代码如下:model:sets:need/1..4/:length,b;cut/1..3/:x;pattern(need,cut):r;endsetsdata:length=4 5 6 8;b=50 10 20 15;capacity=19;enddatamin=@sum(cut(i):x(i));@for(need(i):@sum(cut(j):x(j)*r(i,j))>b(i))
求修改lingo代码,不知道哪里错了,
代码如下:
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-@min(need(i):length(i)));
@sum(cut(i):x(i))>26; @sum(cut(i):x(i))x(i+1));
@for(cut(j):@gin(x(j)));
@for(pattern(i,j):@gin(r(i,j)));
end
求修改lingo代码,不知道哪里错了,代码如下:model:sets:need/1..4/:length,b;cut/1..3/:x;pattern(need,cut):r;endsetsdata:length=4 5 6 8;b=50 10 20 15;capacity=19;enddatamin=@sum(cut(i):x(i));@for(need(i):@sum(cut(j):x(j)*r(i,j))>b(i))
标点都要用英文的
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-@min(need(i):length(i)));
@sum(cut(i):x(i))>26; @sum(cut(i):x(i))x(i+1));
@for(cut(j):@gin(x(j)));
@for(pattern(i,j):@gin(r(i,j)));
end