【优化求解】基于黄金正弦算法Gold-SA求解最优目标matlab代码

164 阅读1分钟

​1 简介

黄金正弦算法(Gold-SA)是 Tanyildizi 等 于2017 年提出的一种新型元启发式优化算法。

2 部分代码

%  Main paper:                                                                                        

%  E. Tanyildizi, G. Demir, "Golden Sine Algorithm: A Novel Math-Inspired Algorithm," Advances in Electrical and Computer Engineering, vol.17, no.2, pp.71-78, 2017, doi:10.4316/AECE.2017.02010

%________________________________________________

% func_obj = @CostFunction

% dim = number of your variables

% Max_iteration = maximum number of iterations

% Population = number of search agents

% Lb=Lower bound

% Ub=Upper bound

% To run GoldSA: [Best_value,Best_pos]=GoldSA(Population,Max_Iter,Lb,Ub,dim,func_obj)

%________________________________________________

clear 

clc

Population=30; % Number of population

Function='F2'; % Name of the test function that can be from F1 to F5 (Table 1,2,3 in the paper)

Max_Iter=200; % Maximum numbef of iterations

% Load details of the selected benchmark function

[Lb,Ub,dim,func_obj]=Get_Functions_details(Function);

[Best_value,Best_pos]=GoldSA(Population,Max_Iter,Lb,Ub,dim,func_obj);

  figure(1)

plot(Best_value)

xlabel('迭代次数')

ylabel('适应度值')


3 仿真结果

4 参考文献

[1]周有荣, 李娜, & 周发辉. (2020). 黄金正弦算法在水文地质参数优化中的应用. 人民珠江, 041(006), 117-120,128.

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

5 MATLAB代码与数据下载地址

见博客主页