【黏菌優(yōu)化算法】基于平衡黏菌優(yōu)化算法求解單目標(biāo)優(yōu)化問題 (ESMA)含Matlab源碼
【黏菌優(yōu)化算法】基于平衡黏菌優(yōu)化算法求解單目標(biāo)優(yōu)化問題 (ESMA)含Matlab源碼
TT_Matlab
博主簡(jiǎn)介:擅長(zhǎng)智能優(yōu)化算法、神經(jīng)網(wǎng)絡(luò)預(yù)測(cè)、信號(hào)處理、元胞自動(dòng)機(jī)、圖像處理、路徑規(guī)劃、無人機(jī)等多種領(lǐng)域的Matlab仿真,完整matlab代碼或者程序定制加qq1575304183。
1 簡(jiǎn)介
黏菌優(yōu)化算法(Slime mould algorithm,SMA)由 Li等于 2020 年提出,其靈感來自于黏菌的擴(kuò)散和覓食行為,屬于元啟發(fā)算法。具有收斂速度快,尋優(yōu)能力強(qiáng)的特點(diǎn)。 黏菌優(yōu)化算法用數(shù)學(xué)模型模仿黏菌覓食行為和形態(tài)變化 , SMA 包括三個(gè)階段 , 分別為接近食物階段 、 包圍食物階段和抓 取食物階段 。
2 部分代碼
%
Equlibrium Slime Mould
Algorithm
(
LSMA
)
%
% Developed
in
MATLAB R2019b
%_____________________________________________________________________________________________________
clearvars
close all
clc
disp
(
’The ESMA is tracking the problem’
)
;
N=
20
; % 粘菌數(shù)
Function_name=
’F1’
% 測(cè)試功能的名稱,可以從 F1 到 F23
MaxIT=
200
; % 最大迭代次數(shù)
[
lb,ub,dim,fobj
]=Get_Functions_details(Function_name); % Function details
Times=
11
; %您想要運(yùn)行 ESMA 的獨(dú)立次數(shù)
display([
’Number of independent runs: ’
, num2str(Times)]);
for
i=
1
:Times
[
Destination_fitness(i),bestPositions(i,:),Convergence_curve(i,:)
]=ESMA(N,MaxIT,lb,ub,dim,fobj);
display([
’The optimal fitness of ESMA is: ’
, num2str(Destination_fitness(i))]);
end
[
bestfitness,index
]=min(Destination_fitness);
disp(
’--------Best Fitness, Average Fitness, Standard Deviation and Best Solution--------’
);
display([
’The best fitness of ESMA is: ’
, num2str(bestfitness)]);
display([
’The average fitness of ESMA is: ’
, num2str(mean(Destination_fitness))]);
display([
’The standard deviation fitness of ESMA is: ’
, num2str(std(Destination_fitness))]);
display([
’The best location of ESMA is: ’
, num2str(bestPositions(index,:))]);
figure(
’Position’
,[
269
240
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(Convergence_curve(index,:),
’LineWidth’
,
1
);
xlabel(
’迭代’
);
ylabel(
’最優(yōu)值’
);
legend(
’ESMA’
);
box
on
;
axis tight;
grid off;
3 仿真結(jié)果
4 參考文獻(xiàn)
[1]郭雨鑫,劉升,張磊,黃倩.精英反向與二次插值改進(jìn)的黏菌算法[J/OL].計(jì)算機(jī)應(yīng)用研究:1-7
博主簡(jiǎn)介:擅長(zhǎng)智能優(yōu)化算法、神經(jīng)網(wǎng)絡(luò)預(yù)測(cè)、信號(hào)處理、元胞自動(dòng)機(jī)、圖像處理、路徑規(guī)劃、無人機(jī)等多種領(lǐng)域的Matlab仿真,相關(guān)matlab代碼問題可私信交流。
部分理論引用網(wǎng)絡(luò)文獻(xiàn),若有侵權(quán)聯(lián)系博主刪除。
-
2023年各省最新電價(jià)一覽!8省中午執(zhí)行谷段電價(jià)! 2023-01-03
-
PPT導(dǎo)出高分辨率圖片的四種方法 2022-09-22
-
全國(guó)消防救援總隊(duì)主官及簡(jiǎn)歷(2023.2) 2023-02-10
-
我們的前輩!歷屆全國(guó)工程勘察設(shè)計(jì)大師完整名單! 2022-11-18
-
關(guān)于某送變電公司“4·22”人身死亡事故的快報(bào) 2022-04-26
