多目标黏菌算法(MOSMA)附带多个多目标性能指标

1 黏菌算法

http://t.csdnimg.cn/yArV5

2 多目标黏菌算法

%% Multiple Objective Slime Mould Algorithm (MOSMA)
clc
clear all
D = 30; % Number of decision variables
M = 2; % Number of objective functions
K=M+D;
LB = ones(1, D).*0; %  LB - A vector of decimal values which indicate the minimum value for each decision variable.
UB = ones(1, D).*1; % UB - Vector of maximum possible values for decision variables.
GEN = 200;  % Set the maximum number of generation (GEN)
ecosize = 200;      % Set the population size (NP)
ishow = 10;
%% Start the evolution process
Pareto = MOSMA(D,M,LB,UB,ecosize,GEN,ishow);
Obtained_Pareto= Pareto(:,D+1:D+M); % extract data to plot
Obtained_Pareto=sortrows(Obtained_Pareto,2);
True_Pareto=load('ZDT3.txt');
%% Plot data
if M == 2
    plot(Obtained_Pareto(:,1),Obtained_Pareto(:,2),'o','LineWidth',2,...
        'MarkerEdgeColor','r','MarkerSize',2);
    hold on
    plot(True_Pareto(:,1),True_Pareto(:,2),'k'); 
    title('Optimal Solution Pareto Set using MOSMA');
    legend('MOSMA');
    xlabel('F_1');
    ylabel('F_2');
elseif M == 3
    plot3(Obtained_Pareto(:,1),Obtained_Pareto(:,2),Obtained_Pareto(:,3),'o','LineWidth',2,...
        'MarkerEdgeColor','r','MarkerSize',2);
    hold on
    plot3(Obtained_Pareto(:,1),Obtained_Pareto(:,2),Obtained_Pareto(:,3),'.','LineWidth',2,...
        'MarkerEdgeColor','k','MarkerSize',6);
    title('Optimal Solution Pareto Set using MOSMA');
    legend('MOSMA');
    xlabel('F_1');
    ylabel('F_2');
    zlabel('F_3');
end
%%  Metric Value
M_IGD=IGD(Obtained_Pareto,True_Pareto);
M_GD=GD(Obtained_Pareto,True_Pareto);
M_HV=HV(Obtained_Pareto,True_Pareto);
M_Spacing=Spacing(Obtained_Pareto,True_Pareto);
M_Spread=Spread(Obtained_Pareto,True_Pareto);
M_DeltaP=DeltaP(Obtained_Pareto,True_Pareto);
display(['The IGD Metric obtained by MOSMA is     : ', num2str(M_IGD)]);
display(['The GD Metric obtained by MOSMA is      : ', num2str(M_GD)]);
display(['The HV Metric obtained by MOSMA is      : ', num2str(M_HV)]);
display(['The Spacing Metric obtained by MOSMA is : ', num2str(M_Spacing)]);
display(['The Spread Metric obtained by MOSMA is  : ', num2str(M_Spread)]);
display(['The DeltaP Metric obtained by MOSMA is  : ', num2str(M_DeltaP)]);

ZDT3运行结果:

The IGD Metric obtained by MOSMA is: 0.0026812
The GD Metric obtained by MOSMA is: 0.00043364
The HV Metric obtained by MOSMA is: 0.60026
The Spacing Metric obtained by MOSMA is: 0.0038203
The Spread Metric obtained by MOSMA is: 0.45104
The DeltaP Metric obtained by MOSMA is: 0.004529

3 性能指标 

        两个性能指标,超容量(HV)和扩展间距(STE)用于测量优化算法的性能。HV用于测量PF的收敛性和扩展性,而STE是PF的间距和范围之间的比率。

       其中\left | PF \right |表示所获得的PF中的解的数量,d_{i}是第i个解的目标函数向量与其最近邻居之间的欧几里得距离,d是所有d_{i}的平均值,M是目标函数的数量,f_{i}^{max}f_{i}^{min}分别是PF中第i个目标函数的最大值和最小值。优越的PF具有较大的HV值和较小的STE值。对于HV度量,值越大,表示PF的收敛性和覆盖性越好。对于STE度量,较小的值表示PF具有更好的一致性和扩展性。

         反向生成距离(IGD)来测量收敛性,IGD的数学公式与世代距离(GD)的数学公式相似。

        其中n是真实帕累托最优解的数目,并且d_{i}指示参考集中第i个真实帕累托最优解与最近获得的帕累托最佳解之间的欧几里得距离。所获得的解和参考集之间的欧几里得距离在这里是不同的。在IGD中,计算每个真解相对于其在目标空间中最近获得的Pareto最优解的欧氏距离。

猜你喜欢

转载自blog.csdn.net/qq_45823589/article/details/133499612