【智能优化算法】改进的侏儒猫鼬优化算法(IDMO)附matlab代码

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

智能优化算法       神经网络预测       雷达通信       无线传感器        电力系统

信号处理              图像处理               路径规划       元胞自动机        无人机 

⛄ 内容介绍

This paper proposes a new metaheuristic algorithm called dwarf mongoose optimization algorithm (DMO) to solve the classical and CEC 2020 benchmark functions and 12 continuous/discrete engineering optimization problems. The DMO mimics the foraging behavior of the dwarf mongoose. The restrictive mode of prey capture (feeding) has dramatically affected the mongooses' social behavior and ecological adaptations to compensate for efficient family nutrition. The compensatory behavioral adaptations of the mongoose are prey size, space utilization, group size, and food provisioning. Three social groups of the dwarf mongoose are used in the proposed algorithm, the alpha group, babysitters, and the scout group. The family forage as a unit, and the alpha female initiates foraging, determines the foraging path, the distance covered, and the sleeping mounds. A certain number of the mongoose population (usually a mixture of males and females) serve as the babysitters. They remain with the young until the group returns at midday or evening. The babysitters are exchanged for the first to forage with the group (exploitation phase). The dwarf mongooses do not build a nest for their young; they move them from one sleeping mound to another and do not return to the previously foraged site. The dwarf mongoose has adopted a seminomadic way of life in a territory large enough to support the entire group (exploration phase). The nomadic behavior prevents overexploitation of a particular area. It also ensures exploration of the whole territory because no previously visited sleeping mound is returned. The performance of the proposed DMO algorithm is compared with seven other algorithms to show its effectiveness in terms of different performance metrics and statistics. In most cases, the near-optimal solutions achieved by the DMO are better than the best solutions obtained by the current state-of-the-art algorithms.

————————————————

版权声明:本文为CSDN博主「Matlab科研工作室」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

原文链接:https://blog.csdn.net/qq_59747472/article/details/128464882​

⛄ 部分代码

%_______________________________________________________________________________________%

%  Dwarf Mongoose Optimization Algorithm source codes (version 1.0)                     %

%                                                                                       %

%  Developed in MATLAB R2015a (7.13)                                                    %

%  Author and programmer: Jeffrey O. Agushaka and Absalom E. Ezugwu and Laith Abualigah %

%         e-Mail:  EzugwuA@ukzn.ac.za                                                   %

%                                                                                       %

%   Main paper:                                                                         %

%__Dwarf Mongoose Optimization Algorithm: A new nature-inspired metaheuristic optimizer %

%__Main paper: please, cite it as follws:_______________________________________________%

%_______________________________________________________________________________________%

function [LB,UB,Dim,F_obj] = Get_F(F)

switch F

    case 'F1'

        F_obj = @F1;

        LB=-100;

        UB=100;

        Dim =10;

        

    case 'F2'

        F_obj = @F2;

        LB=-10;

        UB=10;

        Dim = 10;        

    case 'F3'

        F_obj = @F3;

        LB=-100;

        UB=100;

        Dim = 10;        

    case 'F4'

        F_obj = @F4;

        LB=-100;

        UB=100;

        Dim = 10;        

    case 'F5'

        F_obj = @F5;

        LB=-30;

        UB=30;

        Dim = 10;        

    case 'F6'

        F_obj = @F6;

        LB=-100;

        UB=100;

        Dim = 10;        

    case 'F7'

        F_obj = @F7;

        LB=-1.28;

        UB=1.28;

        Dim = 10;        

    case 'F8'

        F_obj = @F8;

        LB=-500;

        UB=500;

        Dim = 10;        

    case 'F9'

        F_obj = @F9;

        LB=-5.12;

        UB=5.12;

        Dim = 10;        

    case 'F10'

        F_obj = @F10;

        LB=-32;

        UB=32;

        Dim = 10;        

    case 'F11'

        F_obj = @F11;

        LB=-600;

        UB=600;

        Dim = 10;        

    case 'F12'

        F_obj = @F12;

        LB=-50;

        UB=50;

        Dim = 10;        

    case 'F13'

        F_obj = @F13;

        LB=-50;

        UB=50;

        Dim = 10;        

    case 'F14'

        F_obj = @F14;

        LB=-65.536;

        UB=65.536;

        Dim=2;

        

    case 'F15'

        F_obj = @F15;

        LB=-5;

        UB=5;

        Dim=4;

        

    case 'F16'

        F_obj = @F16;

        LB=-5;

        UB=5;

        Dim=2;

        

    case 'F17'

        F_obj = @F17;

        LB=[-5,0];

        UB=[10,15];

        Dim=2;

        

    case 'F18'

        F_obj = @F18;

        LB=-2;

        UB=2;

        Dim=2;

        

    case 'F19'

        F_obj = @F19;

        LB=0;

        UB=1;

        Dim=3;

        

    case 'F20'

        F_obj = @F20;

        LB=0;

        UB=1;

        Dim=6;     

        

    case 'F21'

        F_obj = @F21;

        LB=0;

        UB=10;

        Dim=4;    

        

    case 'F22'

        F_obj = @F22;

        LB=0;

        UB=10;

        Dim=4;    

        

    case 'F23'

        F_obj = @F23;

        LB=0;

        UB=10;

        Dim=4;

end

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% F1

function o = F1(x)

o=sum(x.^2);

end

% F2

function o = F2(x)

o=sum(abs(x))+prod(abs(x));

end

% F3

function o = F3(x)

dim=size(x,2);

o=0;

for i=1:dim

    o=o+sum(x(1:i))^2;

end

end

% F4

function o = F4(x)

o=max(abs(x));

end

% F5

function o = F5(x)

dim=size(x,2);

o=sum(100*(x(2:dim)-(x(1:dim-1).^2)).^2+(x(1:dim-1)-1).^2);

end

% F6

function o = F6(x)

o=sum(abs((x+.5)).^2);

end

% F7

function o = F7(x)

dim=size(x,2);

o=sum([1:dim].*(x.^4))+rand;

end

% F8

function o = F8(x)

o=sum(-x.*sin(sqrt(abs(x))));

end

% F9

function o = F9(x)

dim=size(x,2);

o=sum(x.^2-10*cos(2*pi.*x))+10*dim;

end

% F10

function o = F10(x)

dim=size(x,2);

o=-20*exp(-.2*sqrt(sum(x.^2)/dim))-exp(sum(cos(2*pi.*x))/dim)+20+exp(1);

end

% F11

function o = F11(x)

dim=size(x,2);

o=sum(x.^2)/4000-prod(cos(x./sqrt([1:dim])))+1;

end

% F12

function o = F12(x)

dim=size(x,2);

o=(pi/dim)*(10*((sin(pi*(1+(x(1)+1)/4)))^2)+sum((((x(1:dim-1)+1)./4).^2).*...

(1+10.*((sin(pi.*(1+(x(2:dim)+1)./4)))).^2))+((x(dim)+1)/4)^2)+sum(Ufun(x,10,100,4));

end

% F13

function o = F13(x)

dim=size(x,2);

o=.1*((sin(3*pi*x(1)))^2+sum((x(1:dim-1)-1).^2.*(1+(sin(3.*pi.*x(2:dim))).^2))+...

((x(dim)-1)^2)*(1+(sin(2*pi*x(dim)))^2))+sum(Ufun(x,5,100,4));

end

% F14

function o = F14(x)

aS=[-32 -16 0 16 32 -32 -16 0 16 32 -32 -16 0 16 32 -32 -16 0 16 32 -32 -16 0 16 32;,...

-32 -32 -32 -32 -32 -16 -16 -16 -16 -16 0 0 0 0 0 16 16 16 16 16 32 32 32 32 32];

for j=1:25

    bS(j)=sum((x'-aS(:,j)).^6);

end

o=(1/500+sum(1./([1:25]+bS))).^(-1);

end

% F15

function o = F15(x)

aK=[.1957 .1947 .1735 .16 .0844 .0627 .0456 .0342 .0323 .0235 .0246];

bK=[.25 .5 1 2 4 6 8 10 12 14 16];bK=1./bK;

o=sum((aK-((x(1).*(bK.^2+x(2).*bK))./(bK.^2+x(3).*bK+x(4)))).^2);

end

% F16

function o = F16(x)

o=4*(x(1)^2)-2.1*(x(1)^4)+(x(1)^6)/3+x(1)*x(2)-4*(x(2)^2)+4*(x(2)^4);

end

% F17

function o = F17(x)

o=(x(2)-(x(1)^2)*5.1/(4*(pi^2))+5/pi*x(1)-6)^2+10*(1-1/(8*pi))*cos(x(1))+10;

end

% F18

function o = F18(x)

o=(1+(x(1)+x(2)+1)^2*(19-14*x(1)+3*(x(1)^2)-14*x(2)+6*x(1)*x(2)+3*x(2)^2))*...

    (30+(2*x(1)-3*x(2))^2*(18-32*x(1)+12*(x(1)^2)+48*x(2)-36*x(1)*x(2)+27*(x(2)^2)));

end

% F19

function o = F19(x)

aH=[3 10 30;.1 10 35;3 10 30;.1 10 35];cH=[1 1.2 3 3.2];

pH=[.3689 .117 .2673;.4699 .4387 .747;.1091 .8732 .5547;.03815 .5743 .8828];

o=0;

for i=1:4

    o=o-cH(i)*exp(-(sum(aH(i,:).*((x-pH(i,:)).^2))));

end

end

% F20

function o = F20(x)

aH=[10 3 17 3.5 1.7 8;.05 10 17 .1 8 14;3 3.5 1.7 10 17 8;17 8 .05 10 .1 14];

cH=[1 1.2 3 3.2];

pH=[.1312 .1696 .5569 .0124 .8283 .5886;.2329 .4135 .8307 .3736 .1004 .9991;...

.2348 .1415 .3522 .2883 .3047 .6650;.4047 .8828 .8732 .5743 .1091 .0381];

o=0;

for i=1:4

    o=o-cH(i)*exp(-(sum(aH(i,:).*((x-pH(i,:)).^2))));

end

end

% F21

function o = F21(x)

aSH=[4 4 4 4;1 1 1 1;8 8 8 8;6 6 6 6;3 7 3 7;2 9 2 9;5 5 3 3;8 1 8 1;6 2 6 2;7 3.6 7 3.6];

cSH=[.1 .2 .2 .4 .4 .6 .3 .7 .5 .5];

o=0;

for i=1:5

    o=o-((x-aSH(i,:))*(x-aSH(i,:))'+cSH(i))^(-1);

end

end

% F22

function o = F22(x)

aSH=[4 4 4 4;1 1 1 1;8 8 8 8;6 6 6 6;3 7 3 7;2 9 2 9;5 5 3 3;8 1 8 1;6 2 6 2;7 3.6 7 3.6];

cSH=[.1 .2 .2 .4 .4 .6 .3 .7 .5 .5];

o=0;

for i=1:7

    o=o-((x-aSH(i,:))*(x-aSH(i,:))'+cSH(i))^(-1);

end

end

% F23

function o = F23(x)

aSH=[4 4 4 4;1 1 1 1;8 8 8 8;6 6 6 6;3 7 3 7;2 9 2 9;5 5 3 3;8 1 8 1;6 2 6 2;7 3.6 7 3.6];

cSH=[.1 .2 .2 .4 .4 .6 .3 .7 .5 .5];

o=0;

for i=1:10

    o=o-((x-aSH(i,:))*(x-aSH(i,:))'+cSH(i))^(-1);

end

end

function o=Ufun(x,a,k,m)

o=k.*((x-a).^m).*(x>a)+k.*((-x-a).^m).*(x<(-a));

end

⛄ 运行结果

⛄ 参考文献

⛳️ 完整代码

❤️部分理论引用网络文献,若有侵权联系博主删除

❤️ 关注我领取海量matlab电子书和数学建模资料

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

天天Matlab科研工作室

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

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

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

打赏作者

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

抵扣说明:

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

余额充值