您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 市场营销 > 物流运作优化-实验课
有两家面包店(B1,B2)以及四个客户(C1,C2,C3,C4)。面包店B1每天最多生产800个面包,而面包店B2每天最多生产600个面包。客户(C1,C2,C3,C4)对于面包的需求分别为150,250,350and450个/天,面包店至客户的单位运输成本如下图所示,请问最便宜的运输计划是怎样的?简单配送问题举例运输问题数学模型4..1,2..1,04503502501506008003576542min241423132212211124232221141312112423222114131211jixxxxxxxxxxxxxxxxxtosubjectxxxxxxxxijTransportationProblemMathematicalmodel34..1,2..1,04..1,2..1,*min21412141jixjbxiaxtosubjectxcijjiijijijijijij面包店i的产量。我们定义为ai面包的销售j的销量,我们定义为bj练习试通过Xpress软件编写程序,解决以下问题,目标为总运费最小?CijB1B2B3B4产量A13113512A2698720A342141032销量261887运输问题—计算机解法关于XpressIVE(basicfeaturesforstudentrestrictedversion)•常常用于优化问题的解决。•Maximumnumberofconstraints限制条件(rows):400•Maximumnumberofvariables变量(columns):800•Maximumnumberofmatrixcoefficients矩阵的元素(elements):5000•Maximumnumberofbinaryandintegervariables二元变量,etc(globalelements):400FICOXpress-IVEStartProgramsXpressXpressIVEFICOXpress-IVEFICOXpress-IVEFICOXpress-IVEFICOXpress-IVEMoselXpress-IVEWritingamodelinMoselmodelTransportationuses“mmxprs”定义模型名称变量声明declarationsa:array(1..2)ofintegerb:array(1..4)ofintegerc:array(1..2,1..4)ofintegerx:array(1..2,1..4)ofmpvarend-declarationsforall(iin1..2,jin1..4)x(i,j)is_integerinitializationsfromexampleoftext.txtabcend-initializations!引入数据4..1,2..1,04..1,2..1,*min21412141jixjbxiaxtosubjectxcijjiijijijijijijWritingamodelinMosel目标函数与限制条件!设置总成本函数Cost:=sum(iin1..2,jin1..4)c(i,j)*x(i,j)!设置限制条件forall(iin1..2)sum(jin1..4)x(i,j)=a(i)forall(jin1..4)sum(iin1..2)x(i,j)=b(j)minimize(Cost)!设置目标函数,成本变量不需要声明WritingamodelinMoselOutput&results!输出目标函数getobjval表示优化后的值writeln(“Totalcost:“,getobjval)!输出各个变量的值forall(iin1..2,jin1..4)writeln(“x(”,i,”,”,j,”)=“,getsol(x(i,j)))HowtowriteamodelinMoselXpress-IVENameofthemodelDeclarations(decisionvariables,arrays,etc.)DatainputObjectivefunctionConstraintsOutput&results15Howtowriteamodel(1)NameofthemodelmodelModelNameuses“mmxprs”16Howtowriteamodel(2)Declarations(variables,arrays,etc.)declarationsVariable(变量名):mpvarVariableArray(变量名):array()ofmpvarend-declarations17Howtowriteamodel(3)Datainput–optionalsectioninitializationsfrom“Filename”UnitCost;end-initializations18Howtowriteamodel(4)ObjectivefunctionCost:=2*x1+3*x2!...constraintsminimize(Cost)!youdon’tneedtodeclareCostorProfit:=2*x1+3*x2!...constraintsminimize(Profit)!youdon’tneedtodeclareProfit19Howtowriteamodel(5)Constraints!simpleconstraintX1+3*X2-5*X3=8!multipleconstraintsusingloopforall(iin1..10)Z(i)=1!sumconstraintsum(iin1..10)X(i)=B!multiplesumconstraintsusingloopforall(iin1..5)sum(jin1..10)X(i,j)=120853321xxx10,..,11iforziBxii1015,..,11101iforxjijHowtowriteamodel(6)Output&results!Valueofobjectivefunction-getobjvalwriteln(“Objectivevalue:“,getobjval)!Vlueofdecisionvariablewriteln(“X1=“,getsol(X1))!Valuesofdecisionvariablesinarrayusingloopforall(iin1..M)writeln(Y(“,i,)=“,getsol(Y(i)))21Whatshouldbeansweredinthislesson?Whichdecisionsaremadewhenadistributionsystemisdesigned?Whichcostsmustbetakeninconsideration,ifwewanttoreachthemostefficientperformanceofthesystem?Howtodescribethedistributiondesignproblem,whichistobesolvedbycomputer?DistributionSystemAdistributionsystemisacompositionofprimarysourcesofgoods,customers,warehousesandstoresandatransportationsystem.Adistributionsystemsatisfiescustomer’sdemandsforgoodsfromasetofprimarysources.Theactivities,whichcausethemoveofgoodsfromaprimarysourcetoacustomer,formlogisticchains.DistributionSystemStructureHowmanyechelons(levels)shouldhavethedistributionsystem?Howmanywarehouses,ifany,shouldbelocatedandwhereshouldtheybeplaced?Howmanybufferstores,ifany,shouldberunandwhere?Whichfacilityshouldsupplyacustomer?Whichwarehouseorprimarysourceshouldsupplyabufferstore?Whatdoesthesystemstructuredesigncontribute?Don’tyoubelieveme?Money!!Followthenexttoyexample!LetusconsideroneproducerPandfourcustomers,whicharesuppliedeachdaywithoneitemofproducteach.Customerscanbesuppliedonlybytrucksandeachtruckcancarryexactlyoneitemoftheproductattransportationcost2RMBperunitdistance.Whatdoesthesystemstructuredesigncontribute?ProducerPCustomers11111111IfthecustomersaresupplieddirectlyfromP,twoitemsaredeliveredalongthedistanceof4unitsandanothertwoitemsarecarriedalongthedistanceof5units.Thetotaldistancetraversedis18unitsandtheassociatedcostis36RMB.Whatdoesthesystemstructuredesigncontribute?ProducerPCustomers11111111But,thereisarailway,whichstartsfromPandgoesneartothecustomersthroughtwoplaces,wheretransshipmentplacesmaybeconstituted(eachforsixRMBperday).ThistransportationmeansisabletotransportsoneitematoneRMBperdistanceunit.Whatdoesthesystemstructuredesigncontribute?ProducerPCustomers11111111Now,threeotherpossibilitieshavearisen.Thetransshipmentplacescanbeconstitutedatbothcrossingsoratoneofthetwopossibilities.Whatdoesthesystemstructuredesigncontribute?ProducerPCustomers11111111Here,twotransshipmentplacesareconstitutedatpriceof12rmb.Itemsarecarriedbyrailwaybytwo3and4distanceunitsrespectively,whatdoes14unitstotally(and14RMB).Thetotaldistancetraversedbytrucksis4andthecostis8.Thetotalcosti
本文标题:物流运作优化-实验课
链接地址:https://www.777doc.com/doc-791357 .html