正文描述:《优化设计上机作业-杨洋》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、中国地质大学(武汉)优化设计上机实验报告……基于Matlab软件的数学模型分析学院:机械与电子信息学院专业班级:072132班任课老师:陈祯学生姓名:杨连优化设计上机作业求解如下最优化问题min/(x)=-2%!一6x2+彳一2xix2+subjecttox}+x2<2-X]+2x?<2xex2>0步骤1:数学模型分析与建立min/(x)=-2%j一6x2+彳一2xlx2+2x
2、subjectto州+兀2§2-x,4-2x2<2X],x2>0步骤2:matlab程序编辑clearh=[2-2;-24];f=[-
3、2;-6];a=[l1;-12];b=[2;2];lb二[0;0];[x/favl]=quadprog(h,f/a,b,[],[],lb)步骤3:matlab运行结果Warning:Large-scalemethoddoesnotcurrentlysolvethisproblemformulation,switchingtomedium-scalemethod.>Inquadprogat236Optimizationterminated.10.80001.2000favl=-7.2000<・F:MATLAB
4、Untitled.mI
5、Untitled.mX+1—clear2-h=:2-2;-24J;3-f=[-2;-6]:4一a=:l1;-12]:5-b=:2;2];6—lb=.0;0]:7一Cx,favl]=quadprog(h,f,a,b,lb)Optimizationcompletedbecausetheobjectivefunctionisnon-decreasinginfeasibledirections,towithinthedefaultvalueofthefunctiontolerance,andco
6、nstraintsaresatisfiedtowithinthedefaultvalueoftheconstrainttolerance.
7、40兀rhSubjectto7rr~h+—nr一300=00
8、;10],@zxw2)步骤3:matlab运行结果>Infminconat260Optimizationterminated:first-orderoptimalitymeasurelessthanoptions.TolFunandmaximumconstraintviolationislessthanoptions.TolCon.Activeinequalities(towithinoptions.TolCon=le-006):lowerupperineqlinineqnonlin13.00008.6103f
9、avl=2・9372e+0040英丄•,回"三、已知轴一端作用载荷P=1000N,扭矩M=100Nm,轴长不小于8cm,材料的许用弯曲应力为120MPa,许用扭剪应力为80MPa,许用挠度为0.01cm,密度为7.8t/m,弹性模量为200000MPa,设计该轴,使得满足上述条件,且重量最轻。.M步骤数学模型分析与建立Minf(x)=t^pldSubjectro32F//-120*106<016M/^/3-80*106<064FZ3/3E^J4-10(-4)<0-I<-0.08-h<0步骤2:matlab程序编
10、辑(1)新建mubiao3.m文件functionf=mubiao3(x);p=7800;f=0.25*pi*p*x(l)*x(2)A2;(2)新建zxw3.m文件function[c,ceq]=zxw3(x)F=1000;M=100;E=200000000000;c=[32*F*x(l)/(pi*x(2)A3)-120*10A6;16*M/(pi*x(2)A3)-80*10A6;64
显示全部收起