首页 > 化工知识 > 【优化求解】基于混沌反向学习改进灰狼优化算法求解单目标优化问题matlab代码

【优化求解】基于混沌反向学习改进灰狼优化算法求解单目标优化问题matlab代码

时间:2021-12-04 来源: 浏览:

【优化求解】基于混沌反向学习改进灰狼优化算法求解单目标优化问题matlab代码

原创 天天Matlab 天天Matlab
天天Matlab

TT_Matlab

每天分享一点Matlab资料,一起成长进步。需要定制程序添加qq1575304183

收录于话题 #智能优化算法及应用 212个 内容

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.

天天Matlab

赞赏二维码 微信扫一扫赞赏作者 赞赏

已喜欢, 对作者说句悄悄话
最多40字,当前共

  人赞赏

1 / 3

长按二维码向我转账

赞赏二维码

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

版权:如无特殊注明,文章转载自网络,侵权请联系cnmhg168#163.com删除!文件均为网友上传,仅供研究和学习使用,务必24小时内删除。
相关推荐