lingo程序错在哪里?如何改?model:sets:yj/1..7/:z;yi/1..6/:;yk/1..5/:;sl1(yi,yj):x,d,s,k;sl2(yj,yk):a;sl3(yi,yk):b;endsetsdata:z=100 60 80 40 110 90 30;a=0.5 0.1 0.2 0.05 00.7 0.2 0 0.03 00 0 0.8 0 0.010 0.3 0 0.07 00.3 0 0 0.1 0.050.2 0.6 0 0
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/29 05:03:19
lingo程序错在哪里?如何改?model:sets:yj/1..7/:z;yi/1..6/:;yk/1..5/:;sl1(yi,yj):x,d,s,k;sl2(yj,yk):a;sl3(yi,yk):b;endsetsdata:z=100 60 80 40 110 90 30;a=0.5 0.1 0.2 0.05 00.7 0.2 0 0.03 00 0 0.8 0 0.010 0.3 0 0.07 00.3 0 0 0.1 0.050.2 0.6 0 0
lingo程序错在哪里?如何改?
model:
sets:
yj/1..7/:z;
yi/1..6/:;
yk/1..5/:;
sl1(yi,yj):x,d,s,k;
sl2(yj,yk):a;
sl3(yi,yk):b;
endsets
data:
z=100 60 80 40 110 90 30;
a=0.5 0.1 0.2 0.05 0
0.7 0.2 0 0.03 0
0 0 0.8 0 0.01
0 0.3 0 0.07 0
0.3 0 0 0.1 0.05
0.2 0.6 0 0 0
0.5 0 0.6 0.08 0.05;
b=3 2 3 1 1
4 2 2 1 1
4 2 3 0 1
4 1 3 1 1
3 2 3 1 1
4 2 2 1 0;
d=
500 1000 300 300 800 100 600
500 200 0 400 300 200 150
300 200 600 300 0 400 0
500 500 200 400 0 100 100
0 60 300 500 1000 1100 100
300 500 100 100 500 0 500;
enddata
max=@sum(sl1(i,j):z(j)*s(i,j)+5*k(i,j));
@for(yi(i):@for(yk(k):@sum(sl2(j):a(j,k)*x(i,j)=0);
end
lingo程序错在哪里?如何改?model:sets:yj/1..7/:z;yi/1..6/:;yk/1..5/:;sl1(yi,yj):x,d,s,k;sl2(yj,yk):a;sl3(yi,yk):b;endsetsdata:z=100 60 80 40 110 90 30;a=0.5 0.1 0.2 0.05 00.7 0.2 0 0.03 00 0 0.8 0 0.010 0.3 0 0.07 00.3 0 0 0.1 0.050.2 0.6 0 0
这样改语法就没问题了
model:
sets:
yj/1..7/:z;
yi/1..6/:;
yk/1..5/:;
sl1(yi,yj):x,d,s,k;
sl2(yj,yk):a;
sl3(yi,yk):b;
endsets
data:
z=100 60 80 40 110 90 30;
a=0.5 0.1 0.2 0.05 0
0.7 0.2 0 0.03 0
0 0 0.8 0 0.01
0 0.3 0 0.07 0
0.3 0 0 0.1 0.05
0.2 0.6 0 0 0
0.5 0 0.6 0.08 0.05;
b=3 2 3 1 1
4 2 2 1 1
4 2 3 0 1
4 1 3 1 1
3 2 3 1 1
4 2 2 1 0;
d=
500 1000 300 300 800 100 600
500 200 0 400 300 200 150
300 200 600 300 0 400 0
500 500 200 400 0 100 100
0 60 300 500 1000 1100 100
300 500 100 100 500 0 500;
enddata
max=@sum(sl1(i,j):z(j)*s(i,j)+5*k(i,j));
@for(yi(i):@for(yk(l):@sum(yj(j):a(j,l)*x(i,j))=0);
end