
%% Center for Engineering Applications (CEATS), Ho Chi Minh City Open University, Vietnam
%  Exponential-Trigonometric Optimization (ETO) algorithm (Developed in MATLAB)
%
%  Title:Exponential-Trigonometric Optimization Algorithm for Solving Complicated Engineering Problems
%  Author: Tran Minh Luan, Samir Khatir, Minh Thi Tran, Bernard De Baets, Thanh Cuong-Le
%  Corresponding author: Thanh Cuong-Le
%  Email: cuong.lt@ou.edu.vn
%  Programmer: Tran Minh Luan
%   
%  Computer Methods in Applied Mechanics and Engineering
%% ---- PROGRAM FOR 23 BENCHMARK FUNCTIONS ---
clear all
clc
maxFunc = 23;
SearchAgents_no = 30;
Max_Iter= 500; 
runs = 30;
for fn = 1:maxFunc

    Function_name=strcat('F',num2str(fn));
    [LB,UB,Dim,Fobj]=Get_Functions_details(Function_name);    
    Best_score_T = zeros(runs,1);
    AvgConvCurve = zeros(1, Max_Iter);
    Convergence_curve=zeros(runs,Max_Iter);
    for run=1:runs
        [Best_score,Best_pos,cg_curve]=ETO(SearchAgents_no,Max_Iter,LB,UB,Dim,Fobj);
        Best_score_T(run) = Best_score;
        Convergence_curve(run,:)=cg_curve;
    end
    Best_score_Best = min(Best_score_T);
    Best_Score_Mean = mean(Best_score_T);
    Best_Score_std = std(Best_score_T);
    format long
    display([Function_name, ' Best:  ', num2str(Best_score_Best), '     ', 'Mean:  ', num2str(Best_Score_Mean), '     ', 'Std. Deviation:  ', num2str(Best_Score_std)]);
end
