lingo达人帮忙分析下下面哪里有语法错误啊 大谢~OK后必有厚报~
lingo达人帮忙分析下下面哪里有语法错误啊 大谢~OK后必有厚报~
model:
sets:
amy/1/;
ig/1..3/;
jc/1..5/;
ns/1..8/;
kw/1..10/;
xx(ig,jc,kw):x; 未知量X3,5,8;
yy(jc,ns,kw):y; 未知量Y5,8,10;
ab(ig,kw):a,b; 年产量和订购单价矩阵3,10;
cc(ig,jc):cg; 运输价格3,5;
save(amy,kw):v,m; 10种物资的体积和单件库存费;
ff(jc,ns):f; 运输价格5,8;
ee(ns,kw):e; 需求量8,10;
cw(jc,kw):p; 5个仓库的10种物品5,10;
endsets
data:
a=2000 30000 3000 1000 3200 1000 300000 2000 1500 1500
2000 1300 300000 1000 200000 1500 2000 1500 200000 1200
200000 2500 800 1500 200000 1000 1400 200000 2500 1500;
b=100 10000 210 250 290 300 20000 430 450 500
90 180 20000 240 20000 305 380 435 30000 490
20000 170 210 245 20000 285 400 30000 450 480;
cg=2000 10 14 17 13
10 8 2000 9 16
15 16 9 15 2000;
v=1.5 1 1.5 2 1.5 0.5 1.5 2 1 0.5;
m=40 70 90 100 120 120 150 160 180 200;
f=3 2 3 6 3 1 4 5
1000 3 3 1000 5 2 5 3
5 1000 2 5 1000 5 1000 4
4 1 4 4 2 1000 2 1000
2 2 5 3 5 2 5 2;
e=60 300 800 100 200 600 400 80 150 600
90 800 500 1200 500 400 200 100 800 500
150 500 400 800 600 100000 800 800 400 100000
300 400 200 400 150 800 500 150 1500 400
400 100000 150 100 200 300 100000 400 90 800
500 200 1000 100000 400 150 1000 1000 200 400
800 1200 90 150 90 1000 90 500 100 1000
1500 200 500 500 1000 90 150 200 500 200;
enddata
min=!工厂购货;@sum(ab(I,K):b(I,K)*(@sum(jc(J):x(I,J,K))))+!
A-B运输费用;@sum(cc(I,J):cg(I,J)*(@sum(kw(k):x(I,J,K))))+!
储存费用;@sum(save(1,K):m(1,K)*@sum(jc(J):@sum(ig(I):x(I,J,K))))+!
B-C运输费用;@sum(ff(J,N):f(J,N)*@sum(kw(K):y(J,N,K)))+!
缺货费;2*@sum(save(1,K):m(1,K)*@sum(ns(N):e(N,K)))-2*@sum(save(1,K):m(1,K)*@sum(ns(N):@sum(jc(J):y(J,N,K))));
@for(ab(I,K):(@sum(jc(J):x(I,J,K)))
你的amy集是什么 只有一个元素还定义个集 不是找麻烦吗model:sets:amy/1/;ig/1..3/;jc/1..5/;ns/1..8/;kw/1..10/;xx(ig,jc,kw):x; !未知量X3,5,8;yy(jc,ns,kw):y; !未知量Y5,8,10;ab(ig,kw)...