某商店拟制定某种商品7—12月的进货、销售计划.已知商店最大库存量为1500件, 6月底已有存货300件, 年底的库存以不少于300件为宜. 以后每月进货一次, 假设各月份该商品买进, 售出单价如下表, 若每件每月的库存费为0.5元, 问各月进货,售货多少件, 才能使净收益最大, 试建立数学模型, 并求解.
月 7 8 9 10 11 12
买进(元/件) 28 26 25 27 24 23.5
卖出(元/件) 29 27 26 28 25 25
下面是我建的lingo的模型,高手帮我看看,问题出在哪里?结果出不来,出错了。
model:
max=32*y1+29.5*y2+28*y3+29.5*y4+26*y5+25.5*y6-31*x1-28.5*x2-27*x3-28.5*x4-25*x5-24*x6-900;
x1-y1<=1200;
x1-y1+x2-y2<=1200;
x1-y1+x2-y2+x3-y3<=1200;
x1-y1+x2-y2+x3-y3<+x4-y4<=1200;
x1-y1+x2-y2+x3-y3<+x4-y4+x5-y5<=1200;
x1-y1+x2-y2+x3-y3<+x4-y4+x5-y5+x6-y6<=1200;
x1-y1+x2-y2+x3-y3+x4-y4+x5-y5+x6-y6>=0;
y1<=300;
y1+y2-x1<=300;
y1+y2+y3-x1-x2<=300;
y1+y2+y3+y4-x1-x2-x3<=300;
y1+y2+y3+y4+y5-x1-x2-x3-x4<=300;
y1+y2+y3+y4+y5+y6-x1-x2-x3-x4-x5<=300;
x1>=0;
x2>=0;
x3>=0;
x4>=0;
x5>=0;
x6>=0;
y1>=0;
y2>=0;
y3>=0;
y4>=0;
y5>=0;
y6>=0;
end
[ 本帖最后由 angxl 于 2008-1-1 18:30 编辑 ] |