一、MVO
1.基本概念
MVO算法的思想启发于物理学中多元宇宙理论,通过对白/黑洞(宇宙)和虫洞等概念及其相互作用机理的数学化描述实现待优化问题的求解。
白洞:是一个只发射不吸收的特殊天体,并且是诞生一个宇宙的主要成分;
黑洞:刚好与白洞相反,它吸引宇宙中一切事物,所有的物理定律在黑洞中都会失效;
虫洞:连结白洞和黑洞的多维时空隧道,将个体传送到宇宙的任意角落,甚至是从一个宇宙到另一个宇宙,而多元宇宙通过白洞、黑洞、虫洞相互作用达到一个稳定状态。
2.算法原理
MVO算法依据多元宇宙理论的3个主要概念:白洞、黑洞和虫洞来建立数学模型,定义候选解为宇宙,候选解的适应度为宇宙的膨胀率。迭代过程中,每一个候选解为黑洞,适应度好的宇宙依轮盘赌原理成为白洞,黑洞和白洞交换物质(维度更换),部分黑洞可以通过虫洞链接穿越到最优宇宙附近(群体最优附近搜索)。
3.算法的优缺点
3.1优点
主要的性能参数是虫洞存在概率和虫洞旅行距离率,参数相对较少,低维度数值实验表现出了相对较优异的性能。
3.2缺点
求解大规模优化问题的性能较差,算法缺乏跳出局部极值的能力,导致无法寻取全局最优解。
4.算法流程
%_______________________________________________________________________________________%
% Multi-Verse Optimizer (MVO) source codes demo version 1.0 %
% %
%
% %
%_______________________________________________________________________________________%
% You can simply define your cost in a seperate file and load its handle to fobj
% The initial parameters that you need are:
%__________________________________________
% fobj = @YourCostFunction
% dim = number of your variables
% Max_iteration = maximum number of generations
% SearchAgents_no = number of search agents
% lb=[lb1,lb2,...,lbn] where lbn is the lower bound of variable n
% ub=[ub1,ub2,...,ubn] where ubn is the upper bound of variable n
% If all the variables have equal lower bound you can just
% define lb and ub as two single number numbers
% To run MVO: [Best_score,Best_pos,cg_curve]=MVO(Universes_no,Max_iteration,lb,ub,dim,fobj)
%__________________________________________
clear all
clc
Universes_no=60; %Number of search agents (universes)
Function_name='F1'; %Name of the test function that can be from F1 to F23 (Table 1,2,3 in the paper)
Max_iteration=500; %Maximum numbef of iterations
%Load details of the selected benchmark function
[lb,ub,dim,fobj]=Get_Functions_details(Function_name);
[Best_score,Best_pos,cg_curve]=MVO(Universes_no,Max_iteration,lb,ub,dim,fobj);
figure('Position',[290 206 648 287])
%Draw the search space
subplot(1,2,1);
func_plot(Function_name);
title('Test function')
xlabel('x_1');
ylabel('x_2');
zlabel([Function_name,'( x_1 , x_2 )'])
grid off
shading interp;
light;
lighting phong;
shading interp;
%Draw the convergence curve
subplot(1,2,2);
semilogy(cg_curve,'Color','r')
title('Convergence curve')
xlabel('Iteration');
ylabel('Best score obtained so far');
axis tight
grid off
box on
legend('MVO')
display(['The best solution obtained by MVO is : ', num2str(Best_pos)]);
display(['The best optimal value of the objective funciton found by MVO is : ', num2str(Best_score)]);
- 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.
- 65.
- 66.
- 67.
- 68.
- 69.
- 70.
- 71.
- 72.
- 73.
- 74.
- 75.
- 76.
- 77.
- 78.
- 79.
- 80.
- 81.
- 82.
- 83.
- 84.
- 85.
- 86.
- 87.
- 88.
- 89.
- 90.
- 91.
- 92.
- 93.
- 94.
- 95.
- 96.
- 97.
- 98.
- 99.
- 100.
- 101.
- 102.
- 103.
- 104.
- 105.
- 106.
- 107.
- 108.
- 109.
- 110.
- 111.
- 112.
- 113.
- 114.
- 115.
- 116.