1 简介
世界杯算法(World Cup Optimization(WCO))是于2016年提出的,一种基于国际足联世界杯比赛的数学函数优化方法。该方法具有收敛速度快,寻优能力强等特点。
This paper presents a new optimization algorithm based on human society’s intelligent contests. FIFA World Cup is an international association football competition competed by the senior men’s national teams. This contest is one of the most significant competitions among the humans in which people/teams try hard to overcome the others to earn the victory. In this competition there is only one winner which has the best position rather than the others. This paper introduces a new technique for optimization of mathematic functions based on FIFA World Cup competitions. The main difficulty of the optimization problems is that each type of them can be interpreted in a specific manner. World Cup Optimization (WCO) algorithm has a number of parameters to solve any type of problems due to defined parameters. For analyzing the system performance, it is applied on some benchmark functions. It is also applied on an optimal control problem as a practical case study to find the optimal parameters of PID controller with considering to the nominal operating points (Kg(Kg, Tg)Tg) changes of the AVR system. The main objective of the proposed system is to minimize the steady-state error and also to improve the transient response of the AVR system by optimal PID controller. Optimal values of the PID controller which are achieved by WCO algorithm are then compared with particle swarm optimization and imperialist competitive algorithm in different situations. Finally for illustrating the system capability against the disturbance, it is applied on a generator with disturbance on it and the results are compared by the other algorithms. The simulation results show the excellence of WCO algorithm performance into the nature base and other competitive algorithms.
2 部分代码
%% ---------------------------Function-------------------------------------
%1.wca
Main Function
%2.my_cost_function Fitness (Cost) Function
%% ------------------INITIALIZATION OF PARAMETERS--------------------------
commandwindow
clear all;
close all;
clc;
disp('************************************** ')
disp(' World Cup Optimization Algorithm ')
disp('************************************** ')
tic
warning('off')
itr=0;
iter=100; %no_competition_periods
no_par=2;
% countries=4;
% continents=5;
% popsize=countries*continents;
le1=length(current_position1);
dle1=popsize-le1;
if dle1>0
current_position1=[current_position1 zeros(no_par,t)]; % in this part, we can utilize the high rating countries instead of zeros
else if dle1<0
current_position1=current_position1(:,1:popsize);
end
end
le2=length(current_position2);
dle2=popsize-le2;
if dle2>0
current_position2=[current_position2 zeros(no_par,t)];
else if dle2<0
current_position2=current_position2(:,1:popsize);
end
end
le3=length(current_position3);
dle3=popsize-le3;
if dle3>0
current_position3=[current_position3 zeros(no_par,t)];
else if dle3<0
current_position3=current_position3(:,1:popsize);
end
end
le4=length(current_position4);
dle4=popsize-le4;
if dle1>0
current_position4=[current_position4 zeros(no_par,t)];
else if dle4<0
current_position4=current_position4(:,1:popsize);
end
end
le5=length(current_position5);
dle5=popsize-le5;
if dle5>0
current_position5=[current_position5 zeros(no_par,t)];
else if dle5<0
current_position5=current_position5(:,1:popsize);
end
end
le6=length(current_position6);
dle6=popsize-le6;
if dle6>0
current_position6=[current_position6 zeros(no_par,t)];
else if dle6<0
current_position6=current_position6(:,1:popsize);
end
end
% l_b_p_n=[current_position1 current_position2 current_position3 current_position4 current_position5 current_position6];
%% plot%%%
grid on
%%% Plot the fitness reaching manner%%%%%%%%%%%%%%%%%%%%%
% whitebg([.2 1 .8])
% set(gcf,'Color',[0.2,0.6,0.8])
% rectangle('Position',[-.1,-.1,.2,.2],'LineWidth',2)
% hold on
% h = stem(zeros(1),(final_best_fitness),'fill','--');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%% Plot the final_best_fitness manner%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot(itr,abs(final_best_fitness),'-bs','LineWidth',2,'MarkerFaceColor','g','MarkerSize',5)
hold on
xlabel('Cup','FontSize',10);
ylabel('Fitness','FontSize',10);
% xlabel('Cup');
% ylabel('Fitness');
title('Mean of Best function values','FontSize',10);
grid on
% title(['min cost is ',num2str(final_best_fitness)]);
% pause(0.05)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end
toc
disp('-------------------------------------- ')
final_best_position
disp('-------------------------------------- ')
final_best_fitness
disp('-------------------------------------- ')
% End of Algorithm
3 仿真结果
4 参考文献
[1] Navid Razmjooy et al., A New Meta-Heuristic Optimization Algorithm Inspired by FIFA World Cup Competitions: Theory and Its Application in PID Designing for AVR System[J]. J. Control Autom. Electr Syst. 2016.
部分理论引用网络文献,若有侵权联系博主删除。
5 MATLAB代码与数据下载地址
见博客主页