运筹学实验报告

上传人:ni****g 文档编号:507003664 上传时间:2023-09-10 格式:DOC 页数:29 大小:85KB
返回 下载 相关 举报
运筹学实验报告_第1页
第1页 / 共29页
运筹学实验报告_第2页
第2页 / 共29页
运筹学实验报告_第3页
第3页 / 共29页
运筹学实验报告_第4页
第4页 / 共29页
运筹学实验报告_第5页
第5页 / 共29页
点击查看更多>>
资源描述

《运筹学实验报告》由会员分享,可在线阅读,更多相关《运筹学实验报告(29页珍藏版)》请在金锄头文库上搜索。

1、运筹学实验报告专 业: 班 级: 姓 名: 学 号: 指导教师: 数学与应用数学专业2015-12-18实 验 目 录一、实验目的3二、实验要求3三、实验容31、 线性规划32、 整数规划63、 非线性规划134、 动态规划145、 排队论19四、需用仪器设备26五、MATLAB优化工具箱使用方法简介26六、LINGO优化软件简介26七、实验总结27一、实验目的 1、 会利用适当的方法建立相关实际问题的数学模型;2、 会用数学规划思想及方法解决实际问题;3、 会用排队论思想及方法解决实际问题;4、 会用决策论思想及方法解决实际问题;5、 掌握MATLAB、LINGO等数学软件的应用;二、 实验

2、要求1、 七人一组每人至少完成一项实验容;2、 每组上交一份实验报告;3、 每人进行12分钟实验演示;4、 实验成绩比例: 出 勤:40% 课堂提问:20% 实验报告:30% 实验演示:10%。三、 实验容1、 线性规划例运筹学74页14题 Min z=-2x1-x2 s.t. 2x1+5x260 x1+x218 3x1+x244 X210 X1,x20用matlab运行后得到以下结果:the program is with the linear programmingPlease input the constraints number of the linear programming m

3、=6m = 6Please input the variant number of the linear programming n=2n = 2Please input cost array of the objective function c(n)_T=-2,-1c = -2 -1Please input the coefficient matrix of the constraints A(m,n)=2,5;1,1;3,1;0,1;-1,0;0,-1A = 2 5 1 1 3 1 0 1 -1 0 0 -1Please input the resource array of the p

4、rogram b(m)_T=60,18,44,10,0,0b = 60 18 44 10 0 0Optimization terminated.The optimization solution of the programming is:x = 13.0000 5.0000The optimization value of the programming is:opt_value = -31.0000LINDO程序在命令窗口键入以下容:max -2x-ysubject to2x+5y=60x+y=183x+y=44y=10end按solve键在reports window出现:Global

5、optimal solution found. Objective value: 0.000000 Total solver iterations: 0 Variable Value Reduced Cost X 0.000000 2.000000 Y 0.000000 1.000000 Row Slack or Surplus Dual Price 1 0.000000 1.000000 2 60.00000 0.000000 3 18.00000 0.000000 4 44.00000 0.000000 5 10.00000 0.0000002、 整数规划课本第二章79页1题 Max z=

6、100x1+180x2+70x3 s.t. 40x1+50x2+60x310000 3 x1+6x2+ 2x3600 x1130 X280 x3200 x1 x2 x30程序运行及结果:biprogramtheprogramiswiththebinarylinearprogrammingPleaseinputtheconstraintsnumberoftheprogrammingm=5m=5Pleaseinputthevariantnumberoftheprogrammingn=5n=5Pleaseinputcostarrayoftheobjectivefunctionc(n)_T=100,1

7、80,70c=10018070PleaseinputthecoefficientmatrixoftheconstraintsA(m,n)=40,50,60;3,6,2;1,0,0;0,1,0;0,0,1A=405060362100010001Pleaseinputtheresourcearrayoftheprogramb(m)_T=10000;600;130;80;200b=1000060013080200Optimizationterminated.Theoptimizationsolutionoftheprogrammingis:x=000Theoptimizationvalueofthe

8、programmingis:opt_value= 0程序名:intprogram b程序说明:%theprogrammiswiththeintegerlinearprogrammingusebranchandboundmethod!%这个程序是用分支定界法解决整数规划问题%pleaseinputtheparametersinthemainfunctioninthecommandwinows%请在命令窗口输入这个主要定义函数的参数functionx,f=ILp(c,A,b,vlb,vub,x0,neqcstr,pre)%minf=c*x,s.t.A*x=b,vlb=x=vub%f的最小值等于c的

9、转置乘以x,A乘以x小于等于b,x大于等于vlb小于等于vub%thevectorsofxisrequiredasintegersaswhole%x是整个的整数需要%x0istheinitialization,isalsook%x0是初始值,也可以是。%neqcstristhenumberofequationalconstraints,when0canbedelete%neqcstr是平均约束条件的数目,当0能删除时%preistheconciserate%pre是简明率%xistheintegeroptimizationandfistheoptimalvalue%x是整数规划,f是最优值%i

10、fnargin8,pre=0;%narginisthefactuallyinputvariantsnumber(这个参数是实际输入的变量个数)ifnargin7,neqcstr=0;ifnargin6,x0=;ifnargin5,vub=;ifnargin4,vlb=;endendendendend%settocolumnvectors%建立列向量x0=x0(:);c=c(:);b=b(:);vlb=vlb(:);vub=vub(:);mm=1;j=1;nvars=length(c);%numberofvariants(变量的个数)fvub=inf;xall=;fall=;x_f_b=;xtemp,ztemp,how=lp(c,A,b,vlb,vub,x0,neqcstr,-1);ftemp=c*xtemp;%ifstrcmp(how,ok)%comparebetweenhowandok(how和ok之间的比较)temp0=round(xtemp);%临时变量四舍五入temp1=floor(xtemp);%取比其小的整数temp2=find(abs(xte

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 商业计划书

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号