【优化求解】基于野马算法求解单目标优化问题附matlab代码

2024-03-09 23:59

本文主要是介绍【优化求解】基于野马算法求解单目标优化问题附matlab代码,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

1 简介

Nowadays, the design of optimization algorithms is very popular to solve problems in various scientifc felds. The optimization algorithms usually inspired by the natural behaviour of an agent, which can be humans, animals, plants, or a physical or chemical agent. Most of the algorithms proposed in the last decade inspired by animal behaviour. In this article, we present a new optimizer algorithm called the wild horse optimizer (WHO), which is inspired by the social life behaviour of wild horses. Horses usually live in groups that include a stallion and several mares and foals. Horses exhibit many behaviours, such as grazing, chasing, dominating, leading, and mating. A fascinating behaviour that distinguishes horses from other animals is the decency of horses. Horse decency behaviour is such that the foals of the horse leave the group before reaching puberty and join other groups. This departure is to prevent the father from mating with the daughter or siblings. The main inspiration for the proposed algorithm is the decency behaviour of the horse. The proposed algorithm was tested on several sets of test functions such as CEC2017 and CEC2019 and compared with popular and new optimization methods. The results showed that the proposed algorithm presented very competitive results compared to other algorithms

2 部分代码

% _____________________________________________________

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

clear  

close all

clc

N=30; % Number of search agents

Function_name='F12'; % % Name of the test function that can be from F1 to F13 and cec01 to cec10

Max_iter=500; % Maximum number of iterations

% Load details of the selected benchmark function

[dim,fobj,ub, lb]  = Select_Functions(Function_name);

[Convergence_curve,gBest,gBestScore]=WHO(N,Max_iter,lb,ub,dim,fobj);

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,'Color','r')

title('Objective space')

xlabel('Iteration');

ylabel('Best score obtained so far');

axis tight

grid on

box on

legend('WHO')

display(['The best location of WHO is: ', num2str(gBest)]);

display(['The best fitness of WHO is: ', num2str(gBestScore)]);

gBestScore

        

3 仿真结果

4 参考文献

Naruei, Iraj, and Farshid Keynia. “Wild Horse Optimizer: a New Meta-Heuristic Algorithm for Solving Engineering Optimization Problems.” Engineering with Computers, Springer Science and Business Media LLC, June 2021, doi:10.1007/s00366-021-01438-z.

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

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

这篇关于【优化求解】基于野马算法求解单目标优化问题附matlab代码的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/792367

相关文章

C++使用栈实现括号匹配的代码详解

《C++使用栈实现括号匹配的代码详解》在编程中,括号匹配是一个常见问题,尤其是在处理数学表达式、编译器解析等任务时,栈是一种非常适合处理此类问题的数据结构,能够精确地管理括号的匹配问题,本文将通过C+... 目录引言问题描述代码讲解代码解析栈的状态表示测试总结引言在编程中,括号匹配是一个常见问题,尤其是在

Java调用DeepSeek API的最佳实践及详细代码示例

《Java调用DeepSeekAPI的最佳实践及详细代码示例》:本文主要介绍如何使用Java调用DeepSeekAPI,包括获取API密钥、添加HTTP客户端依赖、创建HTTP请求、处理响应、... 目录1. 获取API密钥2. 添加HTTP客户端依赖3. 创建HTTP请求4. 处理响应5. 错误处理6.

mybatis和mybatis-plus设置值为null不起作用问题及解决

《mybatis和mybatis-plus设置值为null不起作用问题及解决》Mybatis-Plus的FieldStrategy主要用于控制新增、更新和查询时对空值的处理策略,通过配置不同的策略类型... 目录MyBATis-plusFieldStrategy作用FieldStrategy类型每种策略的作

linux下多个硬盘划分到同一挂载点问题

《linux下多个硬盘划分到同一挂载点问题》在Linux系统中,将多个硬盘划分到同一挂载点需要通过逻辑卷管理(LVM)来实现,首先,需要将物理存储设备(如硬盘分区)创建为物理卷,然后,将这些物理卷组成... 目录linux下多个硬盘划分到同一挂载点需要明确的几个概念硬盘插上默认的是非lvm总结Linux下多

使用 sql-research-assistant进行 SQL 数据库研究的实战指南(代码实现演示)

《使用sql-research-assistant进行SQL数据库研究的实战指南(代码实现演示)》本文介绍了sql-research-assistant工具,该工具基于LangChain框架,集... 目录技术背景介绍核心原理解析代码实现演示安装和配置项目集成LangSmith 配置(可选)启动服务应用场景

Python Jupyter Notebook导包报错问题及解决

《PythonJupyterNotebook导包报错问题及解决》在conda环境中安装包后,JupyterNotebook导入时出现ImportError,可能是由于包版本不对应或版本太高,解决方... 目录问题解决方法重新安装Jupyter NoteBook 更改Kernel总结问题在conda上安装了

pip install jupyterlab失败的原因问题及探索

《pipinstalljupyterlab失败的原因问题及探索》在学习Yolo模型时,尝试安装JupyterLab但遇到错误,错误提示缺少Rust和Cargo编译环境,因为pywinpty包需要它... 目录背景问题解决方案总结背景最近在学习Yolo模型,然后其中要下载jupyter(有点LSVmu像一个

解决jupyterLab打开后出现Config option `template_path`not recognized by `ExporterCollapsibleHeadings`问题

《解决jupyterLab打开后出现Configoption`template_path`notrecognizedby`ExporterCollapsibleHeadings`问题》在Ju... 目录jupyterLab打开后出现“templandroidate_path”相关问题这是 tensorflo

如何解决Pycharm编辑内容时有光标的问题

《如何解决Pycharm编辑内容时有光标的问题》文章介绍了如何在PyCharm中配置VimEmulator插件,包括检查插件是否已安装、下载插件以及安装IdeaVim插件的步骤... 目录Pycharm编辑内容时有光标1.如果Vim Emulator前面有对勾2.www.chinasem.cn如果tools工

Python中顺序结构和循环结构示例代码

《Python中顺序结构和循环结构示例代码》:本文主要介绍Python中的条件语句和循环语句,条件语句用于根据条件执行不同的代码块,循环语句用于重复执行一段代码,文章还详细说明了range函数的使... 目录一、条件语句(1)条件语句的定义(2)条件语句的语法(a)单分支 if(b)双分支 if-else(