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

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.

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Matlab科研辅导帮

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值