-
Notifications
You must be signed in to change notification settings - Fork 2
/
Main.m
64 lines (47 loc) · 3.04 KB
/
Main.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
%---------------------------------------------------------------------------------------------------------------------------
% RUNge Kutta optimizer (RUN)
% RUN Beyond the Metaphor: An Efficient Optimization Algorithm Based on Runge Kutta Method
% Codes of RUN:http://imanahmadianfar.com/codes/
% Website of RUN:http://www.aliasgharheidari.com/RUN.html
% Iman Ahmadianfar, Ali asghar Heidari, Amir H. Gandomi , Xuefeng Chu, and Huiling Chen
% Last update: 04-22-2021
% e-Mail: [email protected],[email protected].
% e-Mail: [email protected], [email protected],
% e-Mail (Singapore): [email protected], [email protected]
%---------------------------------------------------------------------------------------------------------------------------
% Co-author: Ali Asghar Heidari([email protected]),Amir H Gandomi,Xuefeng Chu, Huiling Chen([email protected]),
%---------------------------------------------------------------------------------------------------------------------------
% After use, please refer to the main paper:
% Iman Ahmadianfar, Ali Asghar Heidari,Amir H Gandomi,Xuefeng Chu,Huiling Chen,
% RUN Beyond the Metaphor: An Efficient Optimization Algorithm Based on Runge Kutta Method
% Expert Systems With Applications, 2021, 115079, https://doi.org/10.1016/j.eswa.2021.115079 (Q1, 5-Year Impact Factor: 5.448, H-INDEX: 184)
%---------------------------------------------------------------------------------------------------------------------------
% You can also follow the paper for related updates in researchgate: https://www.researchgate.net/profile/Iman_Ahmadianfar
% Researchgate: https://www.researchgate.net/profile/Ali_Asghar_Heidari.
% Website of RUN:% http://www.aliasgharheidari.com/RUN.html
% You can also use and compare with our other new optimization methods:
%(GBO)-2020-http://www.imanahmadianfar.com/codes.
%(HGS)-2021- http://www.aliasgharheidari.com/HGS.html
%(SMA)-2020- http://www.aliasgharheidari.com/SMA.html
%(HHO)-2019- http://www.aliasgharheidari.com/HHO.html
%---------------------------------------------------------------------------------------------------------------------------
clear
close all
clc
nP=50; % Number of Population
Func_name='F1'; % Name of the test function, range from F1-F14
MaxIt=500; % Maximum number of iterations
% Load details of the selected benchmark function
[lb,ub,dim,fobj]=BenchmarkFunctions(Func_name);
[Best_fitness,BestPositions,Convergence_curve] = RUN(nP,MaxIt,lb,ub,dim,fobj);
%% Draw objective space
figure,
hold on
semilogy(Convergence_curve,'Color','r','LineWidth',4);
title('Convergence curve')
xlabel('Iteration');
ylabel('Best fitness obtained so far');
axis tight
grid off
box on
legend('RUN')