【智能优化算法】成功历史智能优化器(SHIO)附matlab代码

简介: 【智能优化算法】成功历史智能优化器(SHIO)附matlab代码

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

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

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

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

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

⛄ 内容介绍

该论文提出了一种称为成功历史智能优化器 (SHIO) 的新型随机群智能算法。它通过基于搜索空间中找到的三个最佳解决方案提出新的探索和开发运动策略来创建新的运动向量,从而为单目标优化问题提供解决方案,其中每个最佳解决方案都存储在内存中并从到目前为止在优化过程中找到的三个最佳解决方案的平均值。拟议的 SHIO 确保了搜索空间探索和使用的效率。为了确认 SHIO 性能,测试了几种性能测量(搜索历史、轨迹和收敛曲线),并使用 SHIO 来解决 (23) 单目标优化基准函数。这些功能已被分类为单峰,多式联运和固定式多式联运。使用了平均值、标准差、最小值和最大值等各种指标,并记录了定量结果。此外,定性结果的轨迹和搜索历史可视化。测试函数和性能指标的结果表明,所提出的算法可以探索各种搜索区域位置,在优化的同时利用潜在的搜索空间位置,避免局部乐观并有效地收敛到全局最优。与比较算法相比,SHIO 在评估的单峰和多峰基准测试中提供了极具竞争力和卓越的结果。请注意,SHIO 算法源代码可在 并记录了定量结果。此外,定性结果的轨迹和搜索历史可视化。测试函数和性能指标的结果表明,所提出的算法可以探索各种搜索区域位置,在优化的同时利用潜在的搜索空间位置,避免局部乐观并有效地收敛到全局最优。与比较算法相比,SHIO 在评估的单峰和多峰基准测试中提供了极具竞争力和卓越的结果。请注意,SHIO 算法源代码可在 并记录了定量结果。此外,定性结果的轨迹和搜索历史可视化。测试函数和性能指标的结果表明,所提出的算法可以探索各种搜索区域位置,在优化的同时利用潜在的搜索空间位置,避免局部乐观并有效地收敛到全局最优。与比较算法相比,SHIO 在评估的单峰和多峰基准测试中提供了极具竞争力和卓越的结果。请注意,SHIO 算法源代码可在 在优化的同时利用潜在的搜索空间位置,避免局部乐观,高效收敛到全局最优。与比较算法相比,SHIO 在评估的单峰和多峰基准测试中提供了极具竞争力和卓越的结果。请注意,SHIO 算法源代码可在 在优化的同时利用潜在的搜索空间位置,避免局部乐观,高效收敛到全局最优。与比较算法相比,SHIO 在评估的单峰和多峰基准测试中提供了极具竞争力和卓越的结果。

⛄ 部分代码

% Success history intelligent optimizer (SHIO) optmization Code

% code for paper: Fakhouri, H. N., Hamad, F., & Alawamrah, A. (2022). Success history intelligent optimizer. The Journal of Supercomputing, 78(5), 6461-6502.

%please give citation of the above paper


% benchmarkfunction = @YourCostFunction

% dimensionension = number of your variables

% part of this code is referenced to : https://www.mathworks.com/matlabcentral/fileexchange/44974-grey-wolf-optimizer-gwo

% we have modified the open source code of GWO equations and code to make SHIO code

%                                                                   %

%   reference of code and credit to : S. Mirjalili, S. M. Mirjalili, A. Lewis             %

%               Grey Wolf Optimizer, Advances in Engineering        %

%               Software , in press,                                %



clear all

clc

visFlag = 0;

SHIO_Particles_number=50; % Number of search agents

Maximum_numbef_of_iterations=100;

% Load details of the selected benchmark function

number_of_runs=3;

for i= [ 1 :1 : 5]

%  for 23 function  use i= [ 1 :1 : 23]


if i== 1

       Function_name = 'F1';  

       display('The best optimal value of the objective funciton found F1 : ');

   end  

   

    if i== 2

       Function_name = 'F2';

        display('The best optimal value of the objective funciton found F2 : ');

    end

   if i== 3

       Function_name = 'F3';  

       display('The best optimal value of the objective funciton found F3 : ');

   end  

   

    if i== 4

       Function_name = 'F4';

        display('The best optimal value of the objective funciton found F4 : ');

   end

   if i== 5

       Function_name = 'F5';  

       display('The best optimal value of the objective funciton found F5 : ');

   end  

    if i== 6

       Function_name = 'F6';

        display('The best optimal value of the objective funciton found F6 : ');

   end  

   if i== 7

       Function_name = 'F7';  

       display('The best optimal value of the objective funciton found F7 : ');

   end  

    if i== 8

       Function_name = 'F8';

        display('The best optimal value of the objective funciton found F8 : ');

   end

   if i== 9

       Function_name = 'F9';  

       display('The best optimal value of the objective funciton found F9 : ');

   end  

    if i== 10

       Function_name = 'F10';

        display('The best optimal value of the objective funciton found F10 : ');

    end  

   if i== 11

       Function_name = 'F11';  

       display('The best optimal value of the objective funciton found F11 : ');

   end  

    if i== 12

       Function_name = 'F12';

        display('The best optimal value of the objective funciton found F12 : ');

   end

   if i== 13

       Function_name = 'F13';  

       display('The best optimal value of the objective funciton found F13 : ');

   end  

    if i== 14

       Function_name = 'F14';

        display('The best optimal value of the objective funciton found F14 : ');

    end

     if i== 15

       Function_name = 'F15';  

       display('The best optimal value of the objective funciton found F15 : ');

   end  

    if i== 16

       Function_name = 'F16';

        display('The best optimal value of the objective funciton found F16 : ');

   end  

   if i== 17

       Function_name = 'F17';  

       display('The best optimal value of the objective funciton found F17 : ');

   end  

    if i== 18

       Function_name = 'F18';

        display('The best optimal value of the objective funciton found F18 : ');

    end

    if i== 19

       Function_name = 'F19';

        display('The best optimal value of the objective funciton found F19 : ');

    end

    if i== 20

       Function_name = 'F20';

        display('The best optimal value of the objective funciton found F20 : ');

    end

    if i== 21

       Function_name = 'F21';

        display('The best optimal value of the objective funciton found F21 : ');

    end

    if i== 22

       Function_name = 'F22';

        display('The best optimal value of the objective funciton found F22 : ');

    end

    if i== 23

       Function_name = 'F23';

        display('The best optimal value of the objective funciton found F23 : ');

    end

   

bestsolutionsofSHIO=zeros(1,number_of_runs);

%bestsolutionsofPSO=zeros(1,number_of_runs);

[lowerbound,upperbound,dimension,benchmarkfunction]=Get_Functions_details(Function_name);


for k= [ 1 :1 : number_of_runs]

[SHIO_best_solution_value,SHIO_best_particle_position,SHIO_convergence_curve, Trajectories,fitness_history, position_history]=SHIOoptmizer(SHIO_Particles_number,Maximum_numbef_of_iterations,lowerbound,upperbound,dimension,benchmarkfunction);

bestsolutionsofSHIO(k)=SHIO_best_solution_value;

disp(['run number', num2str(k)]);

disp(['is', num2str(SHIO_best_solution_value)]);

%[gBestScore, PSO_cg_curve]=PSO(SHIO_Particles_number,Maximum_numbef_of_iterations,lowerbound,upperbound,dimension,benchmarkfunction); % run PSO to compare to results

end

disp(['the avarage for SHIO', num2str(k)]);

mm=mean(bestsolutionsofSHIO);

disp(['the mean OF SHIO is ',num2str(mm)]);


%mm2=mean(bestsolutionsofPSO);

%disp(['the mean OF PSO is ',num2str(mm2)]);


MINSSHIO=min(bestsolutionsofSHIO);

disp(['the min OF SHIO is ',num2str(MINSSHIO)]);


MAXSSHIO=max(bestsolutionsofSHIO);

disp(['the max OF SHIO is ',num2str(MAXSSHIO)]);



disp(['the std for ', num2str(k)]);

stdSHIO=std(bestsolutionsofSHIO);

disp(['the std OF SHIO is ',num2str(stdSHIO)]);

    end

% %***********************************************************

%draw last function values

% %***********************************************************

%draw curve compare with Pso

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

hold on

%semilogy(PSO_cg_curve,'Color','b')

%title('Objective space')

xlabel('Iteration');

ylabel('Best score obtained so far');


axis tight


box on




%******************************************************** draw all shapes togather


%please wait it take time


figure('Position',[454   445   894   297])

%Draw search space

subplot(1,5,1);

func_plot(Function_name);

title('Parameter space')

xlabel('x_1');

ylabel('x_2');

zlabel([Function_name,'( x_1 , x_2 )'])

box on

axis tight


subplot(1,5,2);

hold on

for k1 = 1: size(position_history,1)

   for k2 = 1: size(position_history,2)

       plot(position_history(k1,k2,1),position_history(k1,k2,2),'.','markersize',1,'MarkerEdgeColor','k','markerfacecolor','k');

   end

end

plot(SHIO_best_particle_position(1),SHIO_best_particle_position(2),'.','markersize',10,'MarkerEdgeColor','r','markerfacecolor','r');

title('Search history (x1 and x2 only)')

xlabel('x1')

ylabel('x2')

box on

axis tight


subplot(1,5,3);

hold on

plot(Trajectories(1,:));

title('Trajectory of 1st Particle')

xlabel('Iteration#')

box on

axis tight


subplot(1,5,4);

hold on

semilogy(mean(fitness_history),'Color','g', 'LineWidth',2);

title('Average fitness of all Particles')

xlabel('Iteration#')

box on

axis tight


%Draw objective space

subplot(1,5,5);

semilogy(SHIO_convergence_curve,'Color','r')

title('Convergence curve')

xlabel('Iteration#');

ylabel('Best score obtained so far');

box on

axis tight

set(gcf, 'position' , [39         479        1727         267]);

%******************************************************** draw all shapes togather

⛄ 运行结果

⛄ 参考文献

Fakhouri, H. N., Hamad, F., & Alawamrah, A. (2022). Success history intelligent optimizer. The Journal of Supercomputing, 78(5), 6461-6502.

⛄ 完整代码

❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料


相关文章
|
1天前
|
机器学习/深度学习 人工智能 自然语言处理
【自然语言处理】TF-IDF算法在人工智能方面的应用,附带代码
TF-IDF算法在人工智能领域,特别是自然语言处理(NLP)和信息检索中,被广泛用于特征提取和文本表示。以下是一个使用Python的scikit-learn库实现TF-IDF算法的简单示例,并展示如何将其应用于文本数据。
115 64
|
6天前
|
算法
基于模糊控制算法的倒立摆控制系统matlab仿真
本项目构建了一个基于模糊控制算法的倒立摆控制系统,利用MATLAB 2022a实现了从不稳定到稳定状态的转变,并输出了相应的动画和收敛过程。模糊控制器通过对小车位置与摆的角度误差及其变化量进行模糊化处理,依据预设的模糊规则库进行模糊推理并最终去模糊化为精确的控制量,成功地使倒立摆维持在直立位置。该方法无需精确数学模型,适用于处理系统的非线性和不确定性。
基于模糊控制算法的倒立摆控制系统matlab仿真
|
2天前
|
机器学习/深度学习 人工智能 算法
【人工智能】传统语音识别算法概述,应用场景,项目实践及案例分析,附带代码示例
传统语音识别算法是将语音信号转化为文本形式的技术,它主要基于模式识别理论和数学统计学方法。以下是传统语音识别算法的基本概述
7 2
|
5天前
|
机器学习/深度学习 算法 定位技术
MATLAB - 遗传算法(GA)求解旅行商问题(TSP)
MATLAB - 遗传算法(GA)求解旅行商问题(TSP)
11 3
|
5天前
|
搜索推荐 算法 Java
插入排序算法(Java代码实现)
这篇文章通过Java代码示例详细解释了插入排序算法的实现过程,包括算法的基本思想、核心代码、辅助函数以及测试结果,展示了如何通过插入排序对数组进行升序排列。
|
5天前
|
算法
基于EM期望最大化算法的GMM模型参数估计matlab仿真
此程序在MATLAB 2022a中实现了基于EM算法的GMM参数估计,用于分析由多个高斯分布组成的混合数据。程序通过迭代优化各高斯组件的权重、均值与协方差,直至收敛,并输出迭代过程的收敛曲线及最终参数估计结果。GMM假设数据由K个高斯分布混合而成,EM算法通过E步计算样本归属概率,M步更新参数,循环迭代直至收敛。
|
11天前
|
安全
【2023高教社杯】D题 圈养湖羊的空间利用率 问题分析、数学模型及MATLAB代码
本文介绍了2023年高教社杯数学建模竞赛D题的圈养湖羊空间利用率问题,包括问题分析、数学模型建立和MATLAB代码实现,旨在优化养殖场的生产计划和空间利用效率。
30 6
【2023高教社杯】D题 圈养湖羊的空间利用率 问题分析、数学模型及MATLAB代码
|
12天前
|
存储 算法 搜索推荐
【2022年华为杯数学建模】B题 方形件组批优化问题 方案及MATLAB代码实现
本文提供了2022年华为杯数学建模竞赛B题的详细方案和MATLAB代码实现,包括方形件组批优化问题和排样优化问题,以及相关数学模型的建立和求解方法。
38 3
【2022年华为杯数学建模】B题 方形件组批优化问题 方案及MATLAB代码实现
|
12天前
|
数据采集 存储 移动开发
【2023五一杯数学建模】 B题 快递需求分析问题 建模方案及MATLAB实现代码
本文介绍了2023年五一杯数学建模竞赛B题的解题方法,详细阐述了如何通过数学建模和MATLAB编程来分析快递需求、预测运输数量、优化运输成本,并估计固定和非固定需求,提供了完整的建模方案和代码实现。
26 0
【2023五一杯数学建模】 B题 快递需求分析问题 建模方案及MATLAB实现代码
|
3月前
|
数据安全/隐私保护
耐震时程曲线,matlab代码,自定义反应谱与地震波,优化源代码,地震波耐震时程曲线
地震波格式转换、时程转换、峰值调整、规范反应谱、计算反应谱、计算持时、生成人工波、时频域转换、数据滤波、基线校正、Arias截波、傅里叶变换、耐震时程曲线、脉冲波合成与提取、三联反应谱、地震动参数、延性反应谱、地震波缩尺、功率谱密度