一、黑猩猩算法

This article proposes a novel metaheuristic algorithm called Chimp Optimization Algorithm (ChOA) inspired by the individual intelligence and sexual motivation of chimps in their group hunting, which is different from the other social predators. ChOA is designed to further alleviate the two problems of slow convergence speed and trapping in local optima in solving high-dimensional problems. In this article, a mathematical model of diverse intelligence and sexual motivation is proposed. Four types of chimps entitled attacker, barrier, chaser, and driver are employed for simulating the diverse intelligence. Moreover, the four main steps of hunting, driving, blocking, and attacking, are implemented. Afterward, the algorithm is tested on 30 well-known benchmark functions, and the results are compared to four newly proposed meta-heuristic algorithms in term of convergence speed, the probability of getting stuck in local minimums, and the accuracy of obtained results. The results indicate that the ChOA outperforms the other benchmark optimization algorithms.

二、部分代码

%___________________________________________________________________%
% Chimp Optimization Algorithm (ChOA) source codes version 1.0
% By: M. Khishe, M. R. Musavi
% m_khishe@alumni.iust.ac.ir
%For more information please refer to the following papers:
% M. Khishe, M. R. Mosavi, 揅himp Optimization Algorithm,�Expert Systems
% With Applications, 2020.
% Please note that some files and functions are taken from the GWO algorithm
% such as: Get_Functions_details, PSO,
% For more information please refer to the following papers:
% Mirjalili, S., Mirjalili, S. M., & Lewis, A. (2014). Grey Wolf Optimizer. Advances in engineering software, 69, 46-61.           %
%___________________________________________________________________%% You can simply define your cost in a seperate file and load its handle to fobj
% The initial parameters that you need are:
%__________________________________________
% fobj = @YourCostFunction
% dim = number of your variables
% Max_iteration = maximum number of generations
% SearchAgents_no = number of search agents
% lb=[lb1,lb2,...,lbn] where lbn is the lower bound of variable n
% ub=[ub1,ub2,...,ubn] where ubn is the upper bound of variable n
% If all the variables have equal lower bound you can just
% define lb and ub as two single number numbers%
%__________________________________________clear all
clcSearchAgents_no=30; % Number of search agents
N=SearchAgents_no;
Function_name='F2'; % Name of the test function that can be from F1 to F23 (Table 3,4,5 in the paper)Max_iteration=500; % Maximum numbef of iterations
Max_iter=Max_iteration;% Load details of the selected benchmark function
[lb,ub,dim,fobj]=Get_Functions_details(Function_name);[ABest_scoreChimp,ABest_posChimp,Chimp_curve]=Chimp(SearchAgents_no,Max_iteration,lb,ub,dim,fobj);
[PSO_gBestScore,PSO_gBest,PSO_cg_curve]=PSO(N,Max_iteration,lb,ub,dim,fobj);
[TACPSO_gBestScore,TACPSO_gBest,TACPSO_cg_curve]=TACPSO(N,Max_iteration,lb,ub,dim,fobj);
[MPSO_gBestScore,MPSO_gBest,MPSO_cg_curve]=MPSO(N,Max_iteration,lb,ub,dim,fobj);% PSO_cg_curve=PSO(SearchAgents_no,Max_iteration,lb,ub,dim,fobj); % run PSO to compare to resultsfigure('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(MPSO_cg_curve,'Color','g')
hold on
semilogy(PSO_cg_curve,'Color','b')
hold on
semilogy(TACPSO_cg_curve,'Color','y')
hold on
semilogy(Chimp_curve,'--r')title('Objective space')
xlabel('Iteration');
ylabel('Best score obtained so far');axis tight
grid on
box on
legend('MPSO','PSO','TACPSO','Chimp')display(['The best optimal value of the objective funciton found by TACPSO is : ', num2str(TACPSO_gBestScore)]);
display(['The best optimal value of the objective funciton found by PSO is : ', num2str(PSO_gBestScore)]);
display(['The best optimal value of the objective funciton found by PSO is : ', num2str(MPSO_gBestScore)]);
display(['The best optimal value of the objective funciton found by Chimp is : ', num2str(ABest_scoreChimp)]);

三、仿真结果

四、参考文献

Khishe, M., and M. R. Mosavi. “Chimp Optimization Algorithm.” Expert Systems with Applications, vol. 149, Elsevier BV, July 2020, p. 113338, doi:10.1016/j.eswa.2020.113338.

5 MATLAB代码与数据下载地址

见博客主页头条

【优化求解-单目标求解】基于黑猩猩算法求解单目标问题matlab源码相关推荐

  1. 【PID优化】基于蝗虫算法PID控制器优化设计含Matlab源码

    1 内容介绍 该文针对广泛应用的PID控制器,在MATLAB仿真软件环境下,开发出一个过程控制系统的仿真软件包,能够实现模型辨识和PID参数调节,为过程控制系统仿真研究提供了方便. 该软件界面友好,操 ...

  2. matlab三维路径规划,【路径规划】基于A星算法的三维路径规划matlab源码

    %% 该函数用于演示基于A_Star算法的三维路径规划算法 %% 清空环境 clc clear %% 数据初始化 %下载数据 starttime=cputime; load HeightData z ...

  3. 【图像重建】基于matlab布雷格曼迭代算法集合ART算法CT图像重建【含Matlab源码 1905期】

    一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[图像重建]基于matlab布雷格曼迭代算法集合ART算法CT图像重建[含Matlab源码 1905期] 获取代码方式2: 通过订阅紫极神光 ...

  4. 【钟表识别】基于计算机视觉实现钟表时间识别含Matlab源码

    1 简介 基于计算机视觉实现钟表时间识别含Matlab源码​ 2 部分代码 function [time_clock]= read(filepath) I = imread(filepath); [e ...

  5. 蚁狮优化算法( Ant Lion Optimizer,ALO)-Matlab源码

    获取更多资讯,赶快关注上面的公众号吧! 文章目录 蚁狮优化器Ant Lion Optimizer (ALO) 启发 ALO算子 随机游走 困于蚁狮坑 构造陷阱 蚂蚁滑向蚁狮 捕捉猎物和重建坑 精英 A ...

  6. 【TWVRP】基于matlab模拟退火算法求解带时间窗的车辆路径规划问题【含Matlab源码 160期】

    ⛄一.VRP简介 1 VRP基本原理 车辆路径规划问题(Vehicle Routing Problem,VRP)是运筹学里重要的研究问题之一.VRP关注有一个供货商与K个销售点的路径规划的情况,可以简 ...

  7. 【路径规划】基于遗传算法求解带时间窗车辆路径规划问题(VRPTW)matlab源码

    1 简介 有时间窗的车辆路径问题(Vehicle Routing Problem with Time Windows,VRPTW)因为其有重要的现实意义而备受关注.其时间窗即为客户接受服务的时间范围, ...

  8. 多目标优化算法:MOFPA、MOFA、MOCS、MOBA、MOHHO五种多目标优化算法性能对比(提供MATLAB源码)

    多目标花朵授粉算法(MOFPA) 多目标萤火虫算法(MOFA) 多目标布谷鸟搜索算法(MOCS) 多目标蝙蝠优化算法(MOBA) 多目标哈里斯鹰优化算法(MOHHO) 参考文献: 将MOFPA.MOF ...

  9. 【配电网重构】基于粒子群算法实现配电网重构含Matlab源码

    1 简介 随着大规模,跨区域的配电网不断发展,对配电网运行的经济性和可靠性要求越来越高,在配电网发生大范围停电事故后,需要对配电网的拓扑结构进行重新组合,从而达到恢复供电的目的,这个重新组合配电网拓扑 ...

最新文章

  1. Oracle RAC(Real Application Clusters)
  2. 普通人学python有用吗-普通人学Python有什么用?
  3. Chart Share
  4. 一个大型虚拟项目包含位于不同地点的许多干系人_项目管理与人生
  5. Java中的抽象函数与C++中的虚函数
  6. 绵阳市:充分利用区块链等技术 为农民工证照办理提供线上便捷服务
  7. 计算机启动命令提示符,7种方式在Windows 10中打开或启动命令提示符 | MOS86
  8. oracle oem登录xdb,XDB sys_nc_oid$递归调用的案例一则
  9. 怎么安装光盘并重新启动计算机,如何用光盘重新安装电脑系统
  10. 千牛通知栏常驻是什么意思_我告诉你小米常驻通知是什么意思
  11. python100天发音_GitHub - hhttss999/Python-100-Days: Python - 100天从新手到大师
  12. python之pexpect模块
  13. FPGA之旅设计99例之第九例-----驱动0.96寸OLED屏
  14. 关于虚拟机.vmdk与.ovf 磁盘装载问题
  15. Gowild狗尾草推出HE琥珀,标贝科技为其提供更“温柔”的声音
  16. 网站域名服务器加密,网站实现全站https加密可以防止DNS劫持吗?
  17. 操作系统ucore lab1实验报告
  18. IllegalArgumentException
  19. git+小乌龟安装教程。。
  20. 【转载】【原帖名】如何通过紧急刷机模式dump几乎任何高通机型的存储设备

热门文章

  1. 【论文笔记】基于 VR 的移动机器人真实环境三维建模系统
  2. python 英语翻译_用Python将日语翻译成英语
  3. Android 以图找图功能
  4. 无需注解快速生成API文档,跟SpringBoot绝配
  5. 基于Java毕业设计在线云音乐系统源码+系统+mysql+lw文档+部署软件
  6. lrtimelapse中文教程_LRTimelapse中文教程
  7. 如何 获得 自身程序 的 版本号 ???? 急!!!!!!!!!!!!
  8. 计算机专业世界排名,2021计算机科学专业世界排名重磅出炉!CMU登顶,清华挺进前五...
  9. linux查询awk命令用法
  10. 上银驱动器使用手册_上银伺服电机调试说明书.ppt