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

​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.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Matlab科研辅导帮

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值