作业帮 > 综合 > 作业

Lingo 那里出错了啊?

来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/11 00:10:57
Lingo 那里出错了啊?
model:
title 物流仓库选址问题lingo求解程序;
sets:
store/1..12/:w,s,m;
sale/1..12/:d;
links(store,sale):C,p,x;
endsets
data:
从仓库i向销售中心j运送货物的运送总成本;
C=100,80,50,50,60,100,120,90,60,100,120,90,60,70,65,110
120,90,60,70,65,110,140,110,80,80,75,130
140,110,80,80,75,130,160,125,100,100,80,150
160,125,100,100,80,150,190,150,130,100000,100000,100000
190,150,130,100000,100000,100000,200,180,150,100000,100000,100000
200,180,150,100000,100000,100000,100,80,50,50,60,100
100,80,50,50,60,100,120,90,60,70,65,110
120,90,60,70,65,110,140,110,80,80,75,130,
140,110,80,80,75,130,160,125,100,100,80,150
160,125,100,100,80,150,190,150,130,100000,100000,100000
190,150,130,100000,100000,100000,200,180,150,100000,100000,100000
200,180,150,100000,100000,100000,100,80,50,50,60,100;
仓库i的固定成本;
w=3500,9000,10000,4000,3000,9000,9000,3000,4000,10000,9000,35000;
仓库i的容量上限;
s=300,250,100,180,275,300,200,220,270,250,230,180;
销售中心j的货物需求量;
d=120,80,75,100,110,100,90,60,30,150,95,120;
enddata
由各仓库向销售中心的总运费C(i,j)和销售中心的需求总量求单位运费;
calc:
@FOR(store(i):@FOR(sale(j):p(i,j)=C(i,j)/d(j)));
endcalc
min= @SUM(store(i):w(i)*m(i))*(1.0/5.0)+
@SUM(store(i):@SUM(sale(j):p(i,j)*x(i,j))*m(i));
@FOR(store(i):@SUM(sale(j):x(i,j))=d(j));
@FOR(store(i):@BIN(m(i)));
K=@sum(store(i):(m(i));
End
Lingo 那里出错了啊?
c有144个数 你这个多了
最后一句少右括号