实验7最优化实验
1.Carpenter Problem.A carpenter makes tables and bookcases. He is trying to determine how many each
09 年级、专业级信息与计算科学姓名学号名单序号 20111215Matlab 实验时间年月日版本 注:实验报告的最后一部分是实验小结与收获 实验(7):最优化实验(Optimization) 1CarpenterProblem. . ● Acarpentermakestablesandbookcases.Heistryingtodeterminehowmany eachtypeoffurnitureheshouldmakeeachweek ● Thecarpenterrealizesanetunitprofitof$25pertableand$30perbookcase. ● Hehas600boardfeetoflumbertodevoteweeklytotheproject () upto 多达 andupto120hoursoflabor. ● 20boardfeetoflumberand5hoursoflaborto Heestimatesthatitrequires completeatable 30boardfeetoflumberand4houroflaborfora and bookcase. ● Moreover,hesignedacontracttodeliverfourtablesandtwobookcaseseach week.Thecarpenterwishestodetermineaweeklyproductionschedulefor tablesandbookcasesthatmaximizehisprofits. >>f=[-25;-30]; >>A=[20,30;5,4]; >>b=[600;120]; >>lb=[4;2]; >>[x,feval]=linprog(f,A,b,[],[],lb) 运行结果: x= 17.1429 8.5714 feval= -685.7143 178 所以每周制造张桌子,个书架,所得利益最大。 2.SolvetheLadderProblembyusingthreemethods.(Animationisoptional) ● Supposethereisabighousewithtwolevels.Aflowerhousemadeofglassis nexttoit. ● Onthesidewherethetwohousesarenexttoeachother,thereisawindow. ● Assumeweputaladderontothewallovertheglasshouse,sothatwecan cleanthewindowbystandingontopoftheladder. ● Whatistheshortestlengthoftheladder? 2011 秋季数学实验基础 7 实验报告():最优化实验 15 /

