管理运筹实验报告.docx

  1. 1、本文档共10页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
管理运筹实验报告

实验五:用MATLAB求解线性规划2-10c=[-3,-1,-4]; a = [6,3,5;3,4,5]; b=[45,30]; [x,fval]=linprog(c,a,b);Exiting: One or more of the residuals, duality gap, or total relative errorhas grown 100000 times greater than its minimum value so far:the dual appears to be infeasible (and the primal unbounded). (The primal residual TolFun=1.00e-08.) xx = 1.0e+29 * -1.5497 -4.6492 4.64924-2 c=[-240,-1200,-700];A=[1,1,1;0.5,0.5,0.5]B=[30000;20000][x,fval]=linprog(c,A,B)A = 1.0000 1.0000 1.0000 0.5000 0.5000 0.5000B = 30000 20000Exiting: One or more of the residuals, duality gap, or total relative errorhas stalled:the dual appears to be infeasible (and the primal unbounded). (The primal residual TolFun=1.00e-08.)x = 1.0e+24 * -4.6326 4.6326 0.0000fval =-4.4473e+27实验六:非线性规划5-4 f=2*x(1)^2+2*x(2)^2-4*x(1)+2*x(1)*x(2)-4*x(1)-6*x(2);x0=[1,1];[x,f_min]=fminsearch(f,x0)x = 1.6667 0.6666f_min =-8.66675-10运用直接法编写程序:h=[2,1,0;1,4,0;0,0,0];f=[-6;-2;-12];a=[-1,2,0];b=[3];aeq=[1,1,1];beq=[2];[x,value]=quadprog(h,f,a,b,aeq,beq,zeros(3,1))结果即得:Warning: Trust-region-reflective algorithmdoes not solve this type of problem, usingactive-set algorithm. For more help, seeChoosing the Algorithm in the documentation. In quadprog at 371 Warning: Your current settings will run adifferent algorithm (interior-point-convex)in a future release. In quadprog at 375 Optimization terminated.x = 0 0 2value = -245-12.5-12 H=[2 0 0 0 ;0 1 0 0 ;0 0 0 0;0 0 0 0]; f=[0 0 0 0]; Aeq=[1 -1 1 0;-2 1 0 1]; beq=[2 1]; x0=[1;3;4;0]; lb=zeros(4,1); [x,fval,exitflag,output,lambda]=quadprog(H,f,[],[],Aeq,beq,lb,[],x0)The interior-point-convex algorithm does not accept an initial point.Ignoring X0.Minimum found that satisfies the constraints.Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance,and constraints are satisfied to within the default value

文档评论(0)

xcs88858 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档