0
点赞
收藏
分享

微信扫一扫

【优化求解】基于tent混沌改进粒子群优化算法matlab源码

Separes 2022-01-05 阅读 51
matlab算法

 1 基于tent混沌改进粒子群

为改善基本粒子群优化算法的寻优性能,通过算法混合,在粒子群优化算法中遥步引入优进策略和混沌搜索机制,以加强粒子群的局部寻优效率和全局寻优性能.井将粒子分为两类,分别执行不同的进化机制,实现协同寻优,从而构建为一种新的混沌混合粒子群优化算法.标准测试函数的仿真优化结果表明,该混合算法对较大规模的复杂问题具有较强的求解能力.算法寻优效率高,全局性能好,优化结果稳定,性能明显优于标准粒子群优化算法以及遗传算法等单一的随机搜索方法.

 2 部分代码

```matlab

%_________________________________________________________________________%

% 基于Tent混沌映射改进的粒子群优化算法             %

%_________________________________________________________________________%

% 使用方法

%__________________________________________

% 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   变量上边界

clear all

clc

close all

SearchAgents_no=10; % 种群数量

Function_name='F4'; % Name of the test function that can be from F1 to F23 (Table 1,2,3 in the paper) 设定适应度函数

Vmax=5;%速度上限

Vmin=-5;%速度下限

Max_iteration=50;% 进化次数

a=0.5;%混沌系数

c1 = 1.49445;%个体学习率

c2 = 1.49445;%群体学习率

% Load details of the selected benchmark function

[lb,ub,dim,fobj]=Get_Functions_details(Function_name);  %设定边界以及优化函数

%lb%粒子最小值

%ub%粒子最大值

%dim%粒子维数

[Best_pos_tent,pso_curve_tent,Best_score_tent]=psoNew(SearchAgents_no,Max_iteration,lb,ub,dim,fobj,Vmax,Vmin,a,c1,c2); %tent混沌粒子群

[Best_pos,pso_curve,Best_score]=pso(SearchAgents_no,Max_iteration,lb,ub,dim,fobj,Vmax,Vmin,c1,c2); %基本粒子群

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);

plot(pso_curve_tent,'Color','r')

hold on;

plot(pso_curve,'Color','b')

title('Objective space')

xlabel('Iteration');

ylabel('Best score obtained so far');

axis tight

grid on

box on

legend('Tent混沌策略pso','基本粒子群')

%

display(['The best solution obtained by Tent混沌策略PSO is : ', num2str(Best_pos_tent)]);

display(['The best optimal value of the objective funciton found by Tent混沌策略PSO is : ', num2str(Best_score_tent)]);

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

display(['The best optimal value of the objective funciton found by Tent混沌策略PSO is : ', num2str(Best_score)]);

```

![点击并拖拽以移动](data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==)

 3 仿真结果

4 参考文献

[1]程志刚, 张立庆, 李小林,等. 基于Tent映射的混沌混合粒子群优化算法[J]. 系统工程与电子技术, 2007(01):103-106.

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

举报

相关推荐

0 条评论