这lingo程序错在哪?model:sets:num_i/1..4/;num_j/1..4/;num_t/1..7/;link(num_i,num_j,num_t):x;link2(num_i,num_j):s;endsetsdata:s=1000,800,600,500,1500,800,700,600,1300,900,700,400,1000,800,700,500;enddata[obj]max=@sum(num_i(i):@sum(num_j(j):@sum(n
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/08 16:32:51
这lingo程序错在哪?model:sets:num_i/1..4/;num_j/1..4/;num_t/1..7/;link(num_i,num_j,num_t):x;link2(num_i,num_j):s;endsetsdata:s=1000,800,600,500,1500,800,700,600,1300,900,700,400,1000,800,700,500;enddata[obj]max=@sum(num_i(i):@sum(num_j(j):@sum(n
这lingo程序错在哪?
model:
sets:
num_i/1..4/;
num_j/1..4/;
num_t/1..7/;
link(num_i,num_j,num_t):x;
link2(num_i,num_j):s;
endsets
data:
s=1000,800,600,500,
1500,800,700,600,
1300,900,700,400,
1000,800,700,500;
enddata
[obj]max=@sum(num_i(i):@sum(num_j(j):@sum(num_t(t):x(i,j,t)*s(i,j))))
-250*12*7-200*25*7-170*17*7-110*10*7
-50*@sum(num_i(i):x(i,3,t))-50*@sum(num_i(i):x(i,4,t));
x(1,1,t)>=1;
x(1,1,t)=2;
x(1,2,t)=1;
x(1,4,t)=2;
x(2,2,t)>=2;
x(2,4,t)>=2;
x(2,4,t)=2;
x(3,2,t)>=2;
x(3,3,t)>=2;
x(3,4,t)>=1;
x(4,1,t)>=1;
x(4,2,t)>=3;
x(4,3,t)>=1;
x(4,4,t)=0;
x(1,1,t)+x(2,1,t)+x(3,1,t)+x(4,1,t)
这lingo程序错在哪?model:sets:num_i/1..4/;num_j/1..4/;num_t/1..7/;link(num_i,num_j,num_t):x;link2(num_i,num_j):s;endsetsdata:s=1000,800,600,500,1500,800,700,600,1300,900,700,400,1000,800,700,500;enddata[obj]max=@sum(num_i(i):@sum(num_j(j):@sum(n
错误很多,你对照着比较一下吧
model:
sets:
num_i/1..4/;
num_j/1..4/;
num_t/1..7/;
link(num_i,num_j,num_t):x;
link2(num_i,num_j):s;
endsets
data:
s=1000,800,600,500,
1500,800,700,600,
1300,900,700,400,
1000,800,700,500;
enddata
[obj]max=@sum(link(i,j,t):x(i,j,t)*s(i,j))
-250*12*7-200*25*7-170*17*7-110*10*7
-50*@sum(link(i,j,t):x(i,3,t))-50*@sum(link(i,j,t):x(i,4,t));
@for(num_t(t):@bnd(1,x(1,1,t),3));
@for(num_t(t):@bnd(2,x(1,2,t),5));
@for(num_t(t):@bnd(1,x(1,4,t),2));
@for(num_t(t):x(1,3,t)=2);
@for(num_t(t):x(2,1,t)>=2);
@for(num_t(t):x(2,2,t)>=2);
@for(num_t(t):@bnd(2,x(2,4,t),8));
@for(num_t(t):x(3,1,t)>=2);
@for(num_t(t):x(3,2,t)>=2);
@for(num_t(t):x(3,3,t)>=2);
@for(num_t(t):x(3,4,t)>=1);
@for(num_t(t):x(4,1,t)>=1);
@for(num_t(t):x(4,2,t)>=3);
@for(num_t(t):x(4,3,t)>=1);
@for(num_t(t):x(4,4,t)=0);
@for(num_t(t):@sum(num_i(i):x(i,1,t))