【优化求解】基于混沌反向学习改进灰狼优化算法求解单目标优化问题matlab代码
【优化求解】基于混沌反向学习改进灰狼优化算法求解单目标优化问题matlab代码
TT_Matlab
每天分享一点Matlab资料,一起成长进步。需要定制程序添加qq1575304183
1 简介
提出一种基于混沌和精英反向学习的混合灰狼优化算法以解决高维优化问题.首先,采用混沌序列产生初始种群为算法进行全局搜索奠定基础;然后,对当前精英个体分别执行精英反向学习策略以协调算法的勘探和开采能力;最后,在搜索过程中对决策层个体进行混沌扰动,以避免算法陷入局部最优的可能性.选取10个高维(100维,500维和1 000维)标准测试函数进行数值实验,结果表明,混合灰狼优化算法在求解精度及收敛速度指标上均明显优于对比算法.
灰狼优化 (GWO) 算法是由 Mirialili 等[8]于 2014年提出的一种新型群体智能优化算法, 它源于对自然界中灰狼种群的等级层次机制和捕食行为的模拟, 通过狼群跟踪、包围、追捕、攻击猎物等过程实现优化的目的. GWO 算法具有原理简单、参数设置少、较强的全局搜索能力等特点, 在函数优化方面, 已被证明在求解精度和收敛速度上均优于粒子群优化算法
2 部分代码
clear all clc SearchAgents_no = 30 ; % Number of search agents Max_iteration = 1000 ; % Maximum numbef of iterations Function_name = ’F2’ ; % Name of the test function that can be from F1 to F23 (Table 1,2,3 in the paper) %for func_num=18:23; % initial_flag=0; %Function_name=strcat(’F’,num2str(func_num)); % time=cputime; % Load details of the selected benchmark function [ lb , ub , dim , fobj ]= Get_Functions_details ( Function_name ); [ Best_score , Best_pos , GWO_cg_curve ]= GWO ( SearchAgents_no , Max_iteration , lb , ub , dim , fobj ); [ Best_score , Best_pos , IGWO_cg_curve ]= IGWO ( SearchAgents_no , Max_iteration , lb , ub , dim , fobj ); % PSO_cg_curve=PSO(SearchAgents_no,Max_iteration,lb,ub,dim,fobj); % run PSO to compare to results [ Best_score , Best_pos , CGWO_cg_curve ]= CGWO ( SearchAgents_no , Max_iteration , lb , ub , dim , fobj ); [ Best_score , Best_pos , FGWO_cg_curve ]= FGWO ( SearchAgents_no , Max_iteration , lb , ub , dim , fobj ); [ Best_score , Best_pos , SCA_cg_curve ]= SCA ( SearchAgents_no , Max_iteration , lb , ub , dim , fobj ); figure ( ’Position’ ,[ 500 500 660 290 ]) %Draw search space subplot ( 1 , 2 , 1 ); func_plot ( Function_name ); title ( ’Parameter space’ ) xlabel ( ’x_1’ ); ylabel ( ’x_2’ ); zlabel ([ Function_name , ’( x_1 , x_2 )’ ]) %Draw objective space subplot ( 1 , 2 , 2 ); semilogy ( GWO_cg_curve , ’Color’ , ’r’ ) hold on % semilogy(PSO_cg_curve,’Color’,’b’) title ( ’Objective space’ ) xlabel ( ’Iteration’ ); ylabel ( ’Best score obtained so far’ ); hold on semilogy ( IGWO_cg_curve , ’Color’ , ’g’ ) title ( ’Objective space’ ) xlabel ( ’Iteration’ ); ylabel ( ’Best score obtained so far’ ); hold on semilogy ( CGWO_cg_curve , ’Color’ , ’c’ ) title ( ’Objective space’ ) xlabel ( ’Iteration’ ); ylabel ( ’Best score obtained so far’ ); hold on semilogy ( FGWO_cg_curve , ’Color’ , ’m’ ) title ( ’Objective space’ ) xlabel ( ’Iteration’ ); ylabel ( ’Best score obtained so far’ ); hold on semilogy ( SCA_cg_curve , ’Color’ , ’k’ ) title ( ’Objective space’ ) xlabel ( ’Iteration’ ); ylabel ( ’Best score obtained so far’ ); CGWO_ave = mean2 ( CGWO_cg_curve ); CGWO_std = std2 ( CGWO_cg_curve ); GWO_ave = mean2 ( GWO_cg_curve ); GWO_std = std2 ( GWO_cg_curve ); FGWO_ave = mean2 ( FGWO_cg_curve ); FGWO_std = std2 ( FGWO_cg_curve ); IGWO_ave = mean2 ( IGWO_cg_curve ); IGWO_std = std2 ( IGWO_cg_curve ); % PSO_ave=mean2(PSO_cg_curve); % PSO_std=std2(PSO_cg_curve); SCA_ave = mean2 ( SCA_cg_curve ); SCA_std = std2 ( SCA_cg_curve ); axis tight grid on box on legend ( ’GWO’ , ’IGWO’ , ’CGWO’ , ’FGWO’ , ’SCA’ ) display ([ ’The best solution obtained by CGWO is : ’ , num2str ( Best_pos )]); display ([ ’The best optimal value of the objective funciton found by CGWO is : ’ , num2str ( Best_score )]);
3 仿真结果
4 参考文献
[1]龙文, 蔡绍洪, 焦建军,等. 求解高维优化问题的混合灰狼优化算法[J]. 控制与决策, 2016, 31(11):7.
微信扫一扫赞赏作者
赞赏
发送给作者
人赞赏
长按二维码向我转账
受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。
-
Origin(Pro):学习版的窗口限制【数据绘图】 2020-08-07
-
如何卸载Aspen Plus并再重新安装,这篇文章告诉你! 2020-05-29
-
AutoCAD 保存时出现错误:“此图形中的一个或多个对象无法保存为指定格式”怎么办? 2020-08-03
-
OriginPro:学习版申请及过期激活方法【数据绘图】 2020-08-06
-
CAD视口的边框线看不到也选不中是怎么回事,怎么解决? 2020-06-04
-
教程 | Origin从DSC计算焓和比热容 2020-08-31
-
如何评价拟合效果-Origin(Pro)数据拟合系列教程【数据绘图】 2020-08-06
-
Aspen Plus安装过程中RMS License证书安装失败的解决方法,亲测有效! 2021-10-15
-
CAD外部参照无法绑定怎么办? 2020-06-03
-
CAD中如何将布局连带视口中的内容复制到另一张图中? 2020-07-03