model:
title arrange;
sets:
people/1..2/:;
jobs/1..7/:;
link(people,jobs):a,x;
endsets
data:
a=2 3 8 9 10 7 6
3 8 5 9 7 6 4;
enddata
[OBJ]min=@max(people:@sum(jobs:a(i,j)*x(i,j)));
@for(jobs:@sum(people:x(i,j))=1;);
@for(people:@for(jobs:@bin(x(i,j))));
end
lingo 错误代码63、161,好像把倒数第二行改为ef(i,j):错误代码就变成161了
答案:1 悬赏:40 手机版
解决时间 2021-03-16 01:48
- 提问者网友:捧腹剧
- 2021-03-15 01:11
最佳答案
- 五星知识达人网友:傲气稳了全场
- 2021-03-15 02:48
修改如下:
model:
title arrange;
sets:
people/1..2/:;
jobs/1..7/:;
link(people,jobs):a,x;
endsets
data:
a=2 3 8 9 10 7 6
3 8 5 9 7 6 4;
enddata
min=@max(people(i):@sum(jobs(j):a(i,j)*x(i,j)));
@for(jobs(k):
@sum(people(t):x(t,k))=1;);
!@for(people(i):@for(jobs(j):@bin(x(i,j))));
@for(link: @bin(x));
end
部分结果:
Local optimal solution found.
Objective value: 19.00000
Objective bound: 19.00000
Infeasibilities: 0.000000
Extended solver steps: 1
Total solver iterations: 282
model:
title arrange;
sets:
people/1..2/:;
jobs/1..7/:;
link(people,jobs):a,x;
endsets
data:
a=2 3 8 9 10 7 6
3 8 5 9 7 6 4;
enddata
min=@max(people(i):@sum(jobs(j):a(i,j)*x(i,j)));
@for(jobs(k):
@sum(people(t):x(t,k))=1;);
!@for(people(i):@for(jobs(j):@bin(x(i,j))));
@for(link: @bin(x));
end
部分结果:
Local optimal solution found.
Objective value: 19.00000
Objective bound: 19.00000
Infeasibilities: 0.000000
Extended solver steps: 1
Total solver iterations: 282
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯