资源描述:
《遗传算法多目标函数优化》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、多目标遗传算法优化铣削正交试验结果序号vc(m/min)fz(mm/z)ae(mm)ap(mm)F(N)Ra(μm)1400.020.25446.30.1742400.040.5659.70.2113400.060.758106.50.2884400.081.010123.00.3485600.020.25899.30.2526600.040.510134.00.3027600.061.04139.70.2388600.080.756130.40.2769800.020.7510255.80.29810800.041.08255.80.28811
2、800.060.256110.40.25912800.080.54140.80.258131000.021.06314.20.240141000.040.754233.40.239151000.060.510278.60.330161000.080.258144.70.328说明:1.建立切削力和表面粗糙度模型如:(1)此模型你们来拟合(上面有实验数据,剩下的两个方程已经是我帮你们拟合好的了)(2)Ra=10-0.92146vc0.14365fz0.16065ae0.047691ap0.38457(3)变量约束范围:公式(1)和(2)值越小越好,
3、公式(3)值越大越好。π=3.14D=82.请将多目标优化操作过程录像(同时考虑三个方程,优化出最优的自变量数值),方便我后续进行修改;将能保存的所有图片及源文件发给我;将最优解多组发给我,类似于下图(黄色部分为达到的要求)遗传算法的结果:vcfzaeapFRaQ69.49510.02010.59362.030144.45690.1507-133.92377.76040.080.80047.7189298.80560.3241-3058.3469.84320.04290.79237.316175.06530.2827-1383.0170.2130
4、.02820.69457.6443117.280.2673-837.41369.49510.02010.59362.030144.45690.1507-133.923程序如下:clear;clc;%遗传算法直接求解多目标优化D=8;%FunctionhandletothefitnessfunctionF=@(X)[10^(3.19)*(X(1).^(-0.0836)).*(X(2).^0.825).*(X(3).^0.564).*(X(4).^0.454)];Ra=@(X)[10^(-0.92146)*(X(1).^0.14365).*(X(2)
5、.^0.16065).*(X(3).^0.047691).*(X(4).^0.38457)];Q=@(X)[-1000*2*X(1).*X(2).*X(3).*X(4)/(pi*D)];nvars=4;%Numberofdecisionvariableslb=[40,0.02,0.25,2];%Lowerboundub=[100,0.08,1.0,10];%UpperboundA=[];b=[];%NolinearinequalityconstraintsAeq=[];beq=[];%Nolinearequalityconstraints%遗传算
6、法设定约束options=gaoptimset('ParetoFraction',0.3,'PopulationSize',200,'Generations',300,'StallGenLimit',200,'TolFun',1e-100,'PlotFcns',@gaplotpareto);%thedataofPareto1FUN=@(X)[F(X);Ra(X)];[x,fval]=gamultiobj(FUN,nvars,A,b,Aeq,beq,lb,ub,options);%开启一个新的图形figure;%画出Pareto1plot(fval
7、(:,1),fval(:,2),'mp');%画出网格gridon;%设定横坐标xlabel('F');%设定纵坐标ylabel('Ra');%设定题目title('Paretofront1');%thedataofPareto2FUN=@(X)[F(X);Q(X)];[x,fval]=gamultiobj(FUN,nvars,A,b,Aeq,beq,lb,ub,options);%开启一个新的图形figure;%画出Pareto2plot(fval(:,1),fval(:,2),'mp');%画出网格gridon;%设定横坐标xlabel('F
8、');%设定纵坐标ylabel('Q');%设定题目title('Paretofront2');%thedataofPareto3FUN