求改lingo程序,用sets:endsets
答案:1 悬赏:0 手机版
解决时间 2021-02-23 04:31
- 提问者网友:鼻尖触碰
- 2021-02-22 04:21
求改lingo程序,用sets:endsets
最佳答案
- 五星知识达人网友:往事隔山水
- 2021-02-22 04:57
sets:
r/1..7/:d1,d2,d3;
c/1..2/:;
link(r,c):x;
endsets
data:
d1= 48.7 52.0 61.3 72.0 48.7 52.0 64.0;
d2= 2 3 1 0.5 4 2 1;
d3= 8 7 9 6 6 4 8;
enddata
min=1020*2-@sum(link(i,j):d1(i)*x(i,j));
@for(c(j):@sum(r(i):d2(i)*x(i,j))<=40);
@for(c(j):@sum(r(i):d1(i)*x(i,j))<=1020);
@for(r:@sum(c:x)<=d3);
@for(c(j):@sum(r(i)|i#ge#5:d1(i)*x(i,j))<=302.7);
@for(link:@gin(x));
end
r/1..7/:d1,d2,d3;
c/1..2/:;
link(r,c):x;
endsets
data:
d1= 48.7 52.0 61.3 72.0 48.7 52.0 64.0;
d2= 2 3 1 0.5 4 2 1;
d3= 8 7 9 6 6 4 8;
enddata
min=1020*2-@sum(link(i,j):d1(i)*x(i,j));
@for(c(j):@sum(r(i):d2(i)*x(i,j))<=40);
@for(c(j):@sum(r(i):d1(i)*x(i,j))<=1020);
@for(r:@sum(c:x)<=d3);
@for(c(j):@sum(r(i)|i#ge#5:d1(i)*x(i,j))<=302.7);
@for(link:@gin(x));
end
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯