✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
🍎个人主页:Matlab科研工作室
🍊个人信条:格物致知。
更多Matlab仿真内容点击👇
⛄ 内容介绍
基于厨师的优化算法(Chef-Based Optimization Algorithm (CBOA)),是于2022年提出的一种基于人类行为的优化算法,该算法通过模拟厨师的烹饪行为来进行寻优,具有寻优能力强,收敛速度快等特点。元启发式算法在处理优化问题方面有着广泛的应用。在这项研究中,开发了一种新的元启发式算法,称为基于厨师的优化算法(CBOA)。CBOA设计的根本灵感来自于培训课程中学习烹饪技能的过程。对各个阶段的烹饪训练过程进行数学建模,目的是提高探索中的全局搜索能力和开发中的局部搜索能力。52 个标准目标函数的集合用于评估 CBOA 在解决优化问题方面的表现。优化结果表明,CBOA能够通过在探索和利用之间建立平衡来提供可接受的解决方案,并且在处理优化问题方面非常高效。此外,CBOA 处理实际应用的有效性还通过四个工程问题进行了测试。选择了 12 种著名的元启发式算法与 CBOA 进行比较。仿真结果表明,CBOA 的性能远远优于竞争算法,并且在解决优化问题方面更有效。
烹饪学生和年轻厨师参加培训课程,提高烹饪技能并成为厨师。这个概念类似于元启发式算法,其中初始化几个候选解决方案,然后通过迭代过程进行改进,以确定最佳候选解决方案作为算法实现结束时问题的解决方案。因此,将烹饪学生转变为烹饪学校厨师的过程是拟议 CBOA 设计的灵感来源。
假设烹饪学校中有一定数量的厨师教练。每位厨师导师负责授课。每个烹饪学生都可以选择参加哪些课程。厨师教练教授学生烹饪技巧和技巧。不过,厨师导师也会根据学校最好的厨师导师的指导和个人练习,努力提高自己的技能。烹饪学生尝试学习和模仿厨师教练的技能。此外,烹饪学生试图通过实践来提高他们所学到的技能。课程结束后,烹饪学生在接受的培训下成为熟练的厨师。








⛄ 部分代码
%%% Designed and Developed by Eva Trojovská and Mohammad Dehghani %%%function [lowerbound,upperbound,dimension,fitness] = fun_info(F)switch Fcase 'F1'fitness = @F1;lowerbound=-100;upperbound=100;dimension=30;case 'F2'fitness = @F2;lowerbound=-10;upperbound=10;dimension=30;case 'F3'fitness = @F3;lowerbound=-100;upperbound=100;dimension=30;case 'F4'fitness = @F4;lowerbound=-100;upperbound=100;dimension=30;case 'F5'fitness = @F5;lowerbound=-30;upperbound=30;dimension=30;case 'F6'fitness = @F6;lowerbound=-100;upperbound=100;dimension=30;case 'F7'fitness = @F7;lowerbound=-1.28;upperbound=1.28;dimension=30;case 'F8'fitness = @F8;lowerbound=-500;upperbound=500;dimension=30;case 'F9'fitness = @F9;lowerbound=-5.12;upperbound=5.12;dimension=30;case 'F10'fitness = @F10;lowerbound=-32;upperbound=32;dimension=30;case 'F11'fitness = @F11;lowerbound=-600;upperbound=600;dimension=30;case 'F12'fitness = @F12;lowerbound=-50;upperbound=50;dimension=30;case 'F13'fitness = @F13;lowerbound=-50;upperbound=50;dimension=30;case 'F14'fitness = @F14;lowerbound=-65.536;upperbound=65.536;dimension=2;case 'F15'fitness = @F15;lowerbound=-5;upperbound=5;dimension=4;case 'F16'fitness = @F16;lowerbound=-5;upperbound=5;dimension=2;case 'F17'fitness = @F17;lowerbound=[-5,0];upperbound=[10,15];dimension=2;case 'F18'fitness = @F18;lowerbound=-2;upperbound=2;dimension=2;case 'F19'fitness = @F19;lowerbound=0;upperbound=1;dimension=3;case 'F20'fitness = @F20;lowerbound=0;upperbound=1;dimension=6;case 'F21'fitness = @F21;lowerbound=0;upperbound=10;dimension=4;case 'F22'fitness = @F22;lowerbound=0;upperbound=10;dimension=4;case 'F23'fitness = @F23;lowerbound=0;upperbound=10;dimension=4;endend% F1function R = F1(x)R=sum(x.^2);end% F2function R = F2(x)R=sum(abs(x))+prod(abs(x));end% F3function R = F3(x)dimension=size(x,2);R=0;for i=1:dimensionR=R+sum(x(1:i))^2;endend% F4function R = F4(x)R=max(abs(x));end% F5function R = F5(x)dimension=size(x,2);R=sum(100*(x(2:dimension)-(x(1:dimension-1).^2)).^2+(x(1:dimension-1)-1).^2);end% F6function R = F6(x)R=sum(floor((x+.5)).^2);end% F7function R = F7(x)dimension=size(x,2);R=sum([1:dimension].*(x.^4))+rand;end% F8function R = F8(x)R=sum(-x.*sin(sqrt(abs(x))));end% F9function R = F9(x)dimension=size(x,2);R=sum(x.^2-10*cos(2*pi.*x))+10*dimension;end% F10function R = F10(x)dimension=size(x,2);R=-20*exp(-.2*sqrt(sum(x.^2)/dimension))-exp(sum(cos(2*pi.*x))/dimension)+20+exp(1);end% F11function R = F11(x)dimension=size(x,2);R=sum(x.^2)/4000-prod(cos(x./sqrt([1:dimension])))+1;end% F12function R = F12(x)dimension=size(x,2);R=(pi/dimension)*(10*((sin(pi*(1+(x(1)+1)/4)))^2)+sum((((x(1:dimension-1)+1)./4).^2).*...(1+10.*((sin(pi.*(1+(x(2:dimension)+1)./4)))).^2))+((x(dimension)+1)/4)^2)+sum(Ufun(x,10,100,4));end% F13function R = F13(x)dimension=size(x,2);R=.1*((sin(3*pi*x(1)))^2+sum((x(1:dimension-1)-1).^2.*(1+(sin(3.*pi.*x(2:dimension))).^2))+...((x(dimension)-1)^2)*(1+(sin(2*pi*x(dimension)))^2))+sum(Ufun(x,5,100,4));end% F14function R = 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:25bS(j)=sum((x'-aS(:,j)).^6);endR=(1/500+sum(1./([1:25]+bS))).^(-1);end% F15function R = 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;R=sum((aK-((x(1).*(bK.^2+x(2).*bK))./(bK.^2+x(3).*bK+x(4)))).^2);end% F16function R = F16(x)R=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% F17function R = F17(x)R=(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% F18function R = F18(x)R=(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% F19function R = 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];R=0;for i=1:4R=R-cH(i)*exp(-(sum(aH(i,:).*((x-pH(i,:)).^2))));endend% F20function R = 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];R=0;for i=1:4R=R-cH(i)*exp(-(sum(aH(i,:).*((x-pH(i,:)).^2))));endend% F21function R = 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];R=0;for i=1:5R=R-((x-aSH(i,:))*(x-aSH(i,:))'+cSH(i))^(-1);endend% F22function R = 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];R=0;for i=1:7R=R-((x-aSH(i,:))*(x-aSH(i,:))'+cSH(i))^(-1);endend% F23function R = 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];R=0;for i=1:10R=R-((x-aSH(i,:))*(x-aSH(i,:))'+cSH(i))^(-1);endendfunction R=Ufun(x,a,k,m)R=k.*((x-a).^m).*(x>a)+k.*((-x-a).^m).*(x<(-a));end
⛄ 运行结果



⛄ 参考文献
[1] Trojovská, E., Dehghani, M. A new human-based metahurestic optimization method based on mimicking cooking training. Sci Rep 12, 14861 (2022). https://doi.org/10.1038/s41598-022-19313-2
文章介绍了2022年提出的基于厨师行为的优化算法(CBOA),它模拟烹饪过程进行寻优,展示了在多种标准目标函数上的优秀性能,且在实际工程问题中验证了其高效性,超越其他元启发式算法。
155

被折叠的 条评论
为什么被折叠?



