lingo两次求和modelsets:p1/1..4/:b;p2/1..4/;link(p2,p1):x,v;endsetsdata:v=2800 4500 6000 73002800 4500 6000 7300 2800 4500 6000 7300 2800 4500 6000 7300 ;b=15,10,20,12;enddatamin=@sum(link:x*v);@sum(p1(i):(@sum p2(j):x(i,j)))
来源:学生作业帮助网 编辑:六六作业网 时间:2025/01/27 14:25:26
lingo两次求和modelsets:p1/1..4/:b;p2/1..4/;link(p2,p1):x,v;endsetsdata:v=2800 4500 6000 73002800 4500 6000 7300 2800 4500 6000 7300 2800 4500 6000 7300 ;b=15,10,20,12;enddatamin=@sum(link:x*v);@sum(p1(i):(@sum p2(j):x(i,j)))
lingo两次求和
model
sets:
p1/1..4/:b;
p2/1..4/;
link(p2,p1):x,v;
endsets
data:
v=2800 4500 6000 7300
2800 4500 6000 7300
2800 4500 6000 7300
2800 4500 6000 7300 ;
b=15,10,20,12;
enddata
min=@sum(link:x*v);
@sum(p1(i):(@sum p2(j):x(i,j)))
lingo两次求和modelsets:p1/1..4/:b;p2/1..4/;link(p2,p1):x,v;endsetsdata:v=2800 4500 6000 73002800 4500 6000 7300 2800 4500 6000 7300 2800 4500 6000 7300 ;b=15,10,20,12;enddatamin=@sum(link:x*v);@sum(p1(i):(@sum p2(j):x(i,j)))
看看是不是这样.
model:
sets:
p1/1..4/:b;
p2/1..4/;
link(p2,p1):x,v;
endsets
data:
v=2800 4500 6000 7300
2800 4500 6000 7300
2800 4500 6000 7300
2800 4500 6000 7300 ;
b=15,10,20,12;
enddata
min=@sum(link:x*v);
@for(p1(i):@sum(p2(j):x(i,j))