【優(yōu)化求解】基于混沌反向?qū)W習(xí)改進(jìn)灰狼優(yōu)化算法求解單目標(biāo)優(yōu)化問題matlab代碼
【優(yōu)化求解】基于混沌反向?qū)W習(xí)改進(jìn)灰狼優(yōu)化算法求解單目標(biāo)優(yōu)化問題matlab代碼
TT_Matlab
每天分享一點(diǎn)Matlab資料,一起成長(zhǎng)進(jìn)步。需要定制程序添加qq1575304183
1 簡(jiǎn)介
提出一種基于混沌和精英反向?qū)W習(xí)的混合灰狼優(yōu)化算法以解決高維優(yōu)化問題.首先,采用混沌序列產(chǎn)生初始種群為算法進(jìn)行全局搜索奠定基礎(chǔ);然后,對(duì)當(dāng)前精英個(gè)體分別執(zhí)行精英反向?qū)W習(xí)策略以協(xié)調(diào)算法的勘探和開采能力;最后,在搜索過程中對(duì)決策層個(gè)體進(jìn)行混沌擾動(dòng),以避免算法陷入局部最優(yōu)的可能性.選取10個(gè)高維(100維,500維和1 000維)標(biāo)準(zhǔn)測(cè)試函數(shù)進(jìn)行數(shù)值實(shí)驗(yàn),結(jié)果表明,混合灰狼優(yōu)化算法在求解精度及收斂速度指標(biāo)上均明顯優(yōu)于對(duì)比算法.
灰狼優(yōu)化 (GWO) 算法是由 Mirialili 等[8]于 2014年提出的一種新型群體智能優(yōu)化算法, 它源于對(duì)自然界中灰狼種群的等級(jí)層次機(jī)制和捕食行為的模擬, 通過狼群跟蹤、包圍、追捕、攻擊獵物等過程實(shí)現(xiàn)優(yōu)化的目的. GWO 算法具有原理簡(jiǎn)單、參數(shù)設(shè)置少、較強(qiáng)的全局搜索能力等特點(diǎn), 在函數(shù)優(yōu)化方面, 已被證明在求解精度和收斂速度上均優(yōu)于粒子群優(yōu)化算法
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 仿真結(jié)果
4 參考文獻(xiàn)
[1]龍文, 蔡紹洪, 焦建軍,等. 求解高維優(yōu)化問題的混合灰狼優(yōu)化算法[J]. 控制與決策, 2016, 31(11):7.
微信掃一掃贊賞作者
贊賞
發(fā)送給作者
人贊賞
長(zhǎng)按二維碼向我轉(zhuǎn)賬
受蘋果公司新規(guī)定影響,微信 iOS 版的贊賞功能被關(guān)閉,可通過二維碼轉(zhuǎn)賬支持公眾號(hào)。
-
Origin(Pro):學(xué)習(xí)版的窗口限制【數(shù)據(jù)繪圖】 2020-08-07
-
如何卸載Aspen Plus并再重新安裝,這篇文章告訴你! 2020-05-29
-
CAD視口的邊框線看不到也選不中是怎么回事,怎么解決? 2020-06-04
-
教程 | Origin從DSC計(jì)算焓和比熱容 2020-08-31
-
CAD外部參照無法綁定怎么辦? 2020-06-03
-
CAD中如何將布局連帶視口中的內(nèi)容復(fù)制到另一張圖中? 2020-07-03
