您好,欢迎访问三七文档
1运筹学例题及解答一、市场对I、II两种产品的需求量为:产品I在1-4月每月需10000件,5-9月每月需30000件,10-12月每月需100000件;产品II在3-9月每月需15000件,其它月份每月需50000件。某厂生产这两种产品成本为:产品I在1-5月内生产每件5元,6-12月内生产每件4.50元;产品II在1-5月内生产每件8元,6-12月内生产每件7元。该厂每月生产两种产品能力总和应不超过120000件。产品I容积每件0.2立方米,产品II容积每件0.4立方米,而该厂仓库容积为15000立方米,要求:(a)说明上述问题无可行解;(b)若该厂仓库不足时,可从外厂借。若占用本厂每月每平方米库容需1元,而租用外厂仓库时上述费用增加为1.5元,试问在满足市场需求情况下,该厂应如何安排生产,使总的生产加库存费用为最少。解:(a)10-12月份需求总计:100000X3+50000X3=450000件,这三个月最多生产120000X3=360000件,所以10月初需要(450000-360000=90000件)的库存,超过该厂最大库存容量,所以无解。••(b)考虑到生产成本,库存费用和生产费用和生产能力,该厂10-12月份需求的不足只需在7-9月份生产出来库存就行,则设xi第i个月生产的产品1的数量,yi第i个月生产的产品2的数量,zi,wi分别为第i个月末1,2的库存数s1i,s2i2分别为用于第i+1个月库存的原有及租借的仓库容量m3,可建立模型:Lingo程序为MODEL:sets:row/1..16/:;!这里n为控制参数;col/1..7/:;AZ(row,col):b,x;endsetsdata:12111277777787887898998910910109101110111110111211min(4.57)(1.5)30000150003000015000300001500030000150003000015000.iiiiiizxyssxzywxzzywwxzzywwxzzywwxzzywwstxz1211121100005000120000(712)0.20.415000(712)0iiiiiiiywxzizwsssi变量都大于等于3b=1.754167,1.737500,1.737500,1.770833,1.770833,1.762500,1.762500,1.667500,1.609167,1.609167,1.650833,1.650833,1.659167,1.659167,1.396667,1.380000,1.380000,1.438333,1.438333,1.413333,1.413333,1.658333,1.633333,1.633333,1.658333,1.658333,1.658333,1.658333,1.546667,1.513333,1.513333,1.555000,1.555000,1.546667,1.546667,1.538333,1.496667,1.496667,1.480000,1.480000,1.505000,1.505000,1.562500,1.545833,1.545833,1.579167,1.579167,1.570833,1.570833,1.645833,1.604167,1.604167,1.637500,1.637500,1.637500,1.637500,1.670833,1.645833,1.645833,1.645833,1.645833,1.654167,1.654167,1.454167,1.420833,1.420833,1.412500,1.412500,1.420833,1.420833,1.463333,1.480000,1.480000,1.421667,1.421667,1.430000,1.430000,1.682500,1.690833,1.690833,1.699167,1.699167,1.690833,1.690833,1.466667,1.483333,1.483333,1.475000,1.475000,1.466667,1.466667,1.508333,1.500000,1.500000,1.466667,1.466667,1.475000,1.475000,1.552500,1.535833,1.535833,1.569167,1.569167,1.560833,1.560833,1.542500,1.509167,1.509167,1.550833,1.550833,1.542500,1.542500;enddatamax=@sum(AZ(i,j):b(i,j)*x(i,j));@for(col(j):@sum(row(i):x(i,j))=2);@for(col(j):@sum(row(i):x(i,j))=1);4@sum(AZ(i,j):x(i,j))=8;@for(row(i):@sum(col(j):x(i,j))=1);@for(AZ(i,j):@bin(x(i,j)));运行结果:Rows=32Vars=112No.integervars=112(allarelinear)Nonzeros=591Constraintnonz=448(448are+-1)Density=0.163Smallestandlargestelementsinabsvalue=1.000008.00000No.:7No.=:17No.:7,Obj=MAX,GUBs=16Singlecols=0
本文标题:运筹学例题及解答
链接地址:https://www.777doc.com/doc-7208041 .html