0
点赞
收藏
分享

微信扫一扫

【智能优化算法】基于闪电连接过程优化算法求解单目标优化问题含Matlab源码

1 简介

闪电连接过程算法( Lightning Attachment Procedure Optimization,LAPO)是受自然界中闪电上迎先导与下行先导连接过程的启发,于2017年提出的一种新型智能算法。该算法具有收敛速度快,精度高等特点。

【智能优化算法】基于闪电连接过程优化算法求解单目标优化问题含Matlab源码_参考文献

【智能优化算法】基于闪电连接过程优化算法求解单目标优化问题含Matlab源码_无人机_02

【智能优化算法】基于闪电连接过程优化算法求解单目标优化问题含Matlab源码_参考文献_03

【智能优化算法】基于闪电连接过程优化算法求解单目标优化问题含Matlab源码_优化算法_04

【智能优化算法】基于闪电连接过程优化算法求解单目标优化问题含Matlab源码_无人机_05

【智能优化算法】基于闪电连接过程优化算法求解单目标优化问题含Matlab源码_无人机_06

2 部分代码

%___________________________________________________________________%

%  Lightning Attachment Procedure Optimization (LAPO) source codes demo version 1.0           %

%                                                                   %

%  Developed in MATLAB R2015b                                       %

%                                                                   %

%         %

%___________________________________________________________________%


% 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


% To run LAPO_main: [Best_score,Best_pos,cg_curve]=LAPO(SearchAgents_no,Max_iteration,lb,ub,dim,fobj)



clc

clear

close all

Function_name='F4'; % Name of the test function


SearchAgents_no=40; % Number of test point


Max_iteration=1000; % Maximum numbef of iterations


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


tic

[Best_score,Best_pos,cg_curve]=LAPO(SearchAgents_no,Max_iteration,lb,ub,dim,fobj);

toc


figure('Position',[300 300 660 290])

%Draw search space

subplot(1,2,1);

func_plot(Function_name);

title('Test function')

xlabel('x_1');

ylabel('x_2');

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

grid off


% Draw objective space

subplot(1,2,2);

semilogy(cg_curve,'Color','r','linewidth',2)

title('Convergence curve')

xlabel('Iteration');

ylabel('Best score obtained so far');


axis tight

grid off

box on

legend('LAPO')


display(['The best solution obtained by LAPO is : ', num2str(Best_pos)]);

display(['The best optimal value of the objective funciton found by LAPO is : ', num2str(Best_score)]);

3 仿真结果


【智能优化算法】基于闪电连接过程优化算法求解单目标优化问题含Matlab源码_参考文献_07

【智能优化算法】基于闪电连接过程优化算法求解单目标优化问题含Matlab源码_参考文献_08

4 参考文献

[1]王春枝, 邢绍文, 严灵毓,等. 改进闪电连接过程优化算法的网络流量预测方法及系统:. 

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

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

【智能优化算法】基于闪电连接过程优化算法求解单目标优化问题含Matlab源码_优化算法_09


举报

相关推荐

0 条评论