多目标优化算法测试基准函数(CEC2009)以及评价标准

前言

        IEEE进化计算会议(IEEE on Evolutionary Computation,IEEE CEC)从2005年开始,后面每年举办一次,其中定义了很多测试案例,被用来作为各种进化算法的测试基准函数,下面将介绍2009年的多目标测试函数(UF1-UF10,以及CF1-CF10)以及相关性能评价标准。

1. 多目标测试集定义

1.1. 双目标测试函数

  • UF1

\left\{ \begin{aligned} &f_{1}(x)=x_{1}+\frac{2}{|J_{1}|}\sum_{j\in J_{1}}[x_{j}-sin(6\pi x_{1}+\frac{j\pi}{n})]^{2} \\ &f_{2}(x)=1-\sqrt x_{1} + \frac{2}{|J_{2}|}\sum_{j\in J_{2}}[x_{j}-sin(6\pi x_{1}+\frac{j\pi}{n})]^{2} \\ &J_{1}=\left\{j|j \,is \,odd \,and \,2 \leq j \leq n \right\}\\ &J_{2}=\left\{j|j \,is \,even \,and \,2 \leq j \leq n \right\}\\ \end{aligned} \right.

  • UF2

\left\{ \begin{aligned} &f_{1}(x)=x_{1}+\frac{2}{|J_{1}|}\sum_{j\in J_{1}}y^{2}_{j}\\ &f_{2}(x)=1-\sqrt x_{1} + \frac{2}{|J_{2}|}\sum_{j\in J_{2}}y^{2}_{j} \\ &J_{1}=\left\{j|j \,is \,odd \,and \,2 \leq j \leq n \right\}\\ &J_{2}=\left\{j|j \,is \,even \,and \,2 \leq j \leq n \right\}\\ \end{aligned} \right.

y_j=\left\{ \begin{aligned} &x_{j}-[0.3x^{2}_{1}cos(24\pi x_{1}+\frac{4j\pi}{n})+0.6x_{1}]cos(6\pi x_{1}+\frac{j\pi}{n})) \, j \in J_{1}\\ &x_{j}-[0.3x^{2}_{1}cos(24\pi x_{1}+\frac{4j\pi}{n})+0.6x_{1}]sin(6\pi x_{1}+\frac{j\pi}{n})) \, j \in J_{2}\\ \end{aligned} \right.

  • UF3

\left\{ \begin{aligned} &f_{1}(x)=x_{1}+\frac{2}{|J_{1}|}(4\sum_{j\in J_{1}}y^{2}_{j}-2 \prod_{j\in J_{1}}cos(\frac{20y_{j} \pi}{\sqrt j})+2) \\ &f_{2}(x)=\sqrt x_{1}+\frac{2}{|J_{2}|}(4\sum_{j\in J_{1}}y^{2}_{j}-2 \prod_{j\in J_{2}}cos(\frac{20y_{j} \pi}{\sqrt j})+2) \\ &J_{1} \, and \, J_{2} \, are \, the \, same \, as \, those \,of \, UF1 \end{aligned} \right.

y_{j}=x_{j}-x^{0.5(1+\frac{3(j-2)}{n-2})}_{1},\,j=2,3,...,n

  • UF4

\left\{ \begin{aligned} &f_{1}(x)=x_{1}+\frac{2}{|J_{1}|}\sum_{j\in J_{1}}h(y_{j})) \\ &f_{2}(x)=1- x_{2} + \frac{2}{|J_{2}|}\sum_{j\in J_{2}}h(y_{j})\\ &J_{1} \, and \, J_{2} \,are \,the \,same \,as \,those \,of \,UF1 \end{aligned} \right.

y_{j}=x_{j}-sin(6\pi x_{1}+\frac{j\pi}{n}),\,j=2,3,...,n,\, h(t)=\frac{|t|}{1+e^{2|t|}}

  • UF5

\left\{ \begin{aligned} &f_{1}(x)=x_{1}+(\frac{1}{2N}+\in)|sin(2N\pi x_{1})|+\frac{2}{|J_{1}|}\sum_{j\in J_{1}}h(y_{j})) \\ &f_{2}(x)=1-x_{1}+(\frac{1}{2N}+\in)|sin(2N\pi x_{1})|+\frac{2}{|J_{1}|}\sum_{j\in J_{2}}h(y_{j})) \\ &y_{j}=x_{j}-sin(6\pi x_{1}+\frac{j\pi}{n}),\,j=2,3,...,n,\,\\ &h(t)=2t^2-cos(4\pi t)+1\\ &J_{1} \, and \, J_{2} \,are \,the \,same \,as \,those \,of \,UF1 ,\in>0 \end{aligned} \right.

  • UF6

\left\{ \begin{aligned} &f_{1}(x)=x_{1}+max\left\{0,2(\frac{1}{2N}+\in)sin(2N\pi x)\right\}+\frac{2}{|J_{1}|}(4\sum_{j\in J_{1}}y^{2}_{j}-2 \prod_{j\in J_{1}}cos(\frac{20y_{j} \pi}{\sqrt j})+2) \\ &f_{2}(x)=1-x_{1}+max\left\{0,2(\frac{1}{2N}+\in)sin(2N\pi x)\right\}+\frac{2}{|J_{1}|}(4\sum_{j\in J_{1}}y^{2}_{j}-2 \prod_{j\in J_{1}}cos(\frac{20y_{j} \pi}{\sqrt j})+2) \\ &y_{j}=x_{j}-sin(6\pi x_{1} + \frac{j\pi}{n}),j=2,3,...,n\\ &J_{1} \, and \, J_{2} \, are \, the \, same \, as \, those \,of \, UF1,\in>0 \end{aligned} \right.

  • UF7

\left\{ \begin{aligned} &f_{1}(x)=\sqrt[5]{x_{1}}+\frac{2}{|J_{1}|}\sum_{j\in J_{1}}y^{2}_{j}\\ &f_{2}(x)=1-\sqrt[5]{ x_{1}} + \frac{2}{|J_{2}|}\sum_{j\in J_{2}}y^{2}_{j} \\ &y_{j}=x_{j}-sin(6\pi x_{1} + \frac{j\pi}{n}),j=2,3,...,n\\ &J_{1} \, and \, J_{2} \, are \, the \, same \, as \, those \,of \, UF1,\in>0 \end{aligned} \right.

1.2. 三目标测试函数

  • UF8

\left\{ \begin{aligned} &f_{1}(x)=cos(0.5x_{1}\pi)cos(0.5x_{2}\pi)+\frac{2}{|J_{1}|}\sum_{j\in J_{1}}(x_{j}-2x_{2}sin(2\pi x_{1}+\frac{j\pi}{n})^{2}) \\ &f_{2}(x)=cos(0.5x_{1}\pi)cos(0.5x_{2}\pi)+\frac{2}{|J_{2}|}\sum_{j\in J_{2}}(x_{j}-2x_{2}sin(2\pi x_{1}+\frac{j\pi}{n})^{2}) \\ &f_{3}(x)=sin(0.5x_{1}\pi)+\frac{2}{|J_{3}|}\sum_{j\in J_{3}}(x_{j}-2x_{2}sin(2\pi x_{1}+\frac{j\pi}{n})^{2}) \\ &J_{1}=\left\{j|3\leq j \leq n,and \,j-1\,is \,a \,multiplication \,of \,3 \right\}\\ &J_{2}=\left\{j|3\leq j \leq n,and \,j-2\,is \,a \,multiplication \,of \,3 \right\}\\ &J_{2}=\left\{j|3\leq j \leq n,and \,j\,is \,a \,multiplication \,of \,3 \right\}\\ \end{aligned} \right.

  • UF9

\left\{ \begin{aligned} &f_{1}(x)=0.5[max\left\{0,(1+\in)(1-4(2x_{1}-1)^{2})\right\}+2x_{1}]x_{2}+\frac{2}{|J_{1}|}\sum_{j\in J_{1}}(x_{j}-2x_{2}sin(2\pi x_{1}+\frac{j\pi}{n})^{2}) \\ &f_{2}(x)=0.5[max\left\{0,(1+\in)(1-4(2x_{1}-1)^{2})\right\}+2x_{1}]x_{2}+\frac{2}{|J_{2}|}\sum_{j\in J_{2}}(x_{j}-2x_{2}sin(2\pi x_{1}+\frac{j\pi}{n})^{2}) \\ &f_{3}(x)=1-x_{2}+\frac{2}{|J_{3}|}\sum_{j\in J_{3}}(x_{j}-2x_{2}sin(2\pi x_{1}+\frac{j\pi}{n})^{2}) \\ &J_{1}=\left\{j|3\leq j \leq n,and \,j-1\,is \,a \,multiplication \,of \,3 \right\}\\ &J_{2}=\left\{j|3\leq j \leq n,and \,j-2\,is \,a \,multiplication \,of \,3 \right\}\\ &J_{2}=\left\{j|3\leq j \leq n,and \,j\,is \,a \,multiplication \,of \,3 \right\},\in=0.1\end{aligned} \right.

  • UF10

\left\{ \begin{aligned} &f_{1}(x)=cos(0.5x_{1}\pi)cos(0.5x_{2}\pi)+\frac{2}{|J_{1}|}\sum_{j\in J_{1}}[4y^{2}_{j}-cos(8\pi y_{j})+1]\\ &f_{2}(x)=cos(0.5x_{1}\pi)cos(0.5x_{2}\pi)+\frac{2}{|J_{2}|}\sum_{j\in J_{2}}[4y^{2}_{j}-cos(8\pi y_{j})+1]\\ &f_{3}(x)=sin(0.5x_{1}\pi)+\frac{2}{|J_{3}|}\sum_{j\in J_{3}}[4y^{2}_{j}-cos(8\pi y_{j})+1] \\ &J_{1}=\left\{j|3\leq j \leq n,and \,j-1\,is \,a \,multiplication \,of \,3 \right\}\\ &J_{2}=\left\{j|3\leq j \leq n,and \,j-2\,is \,a \,multiplication \,of \,3 \right\}\\ &J_{2}=\left\{j|3\leq j \leq n,and \,j\,is \,a \,multiplication \,of \,3 \right\}\\ \end{aligned} \right.


带约束的问题,即CF1-CF10,这里就不累述,感兴趣的, 可以下载附件研读。

2. 评价标准

        在评价算法的性能时,最常见的通过下面几个标准进行定义:

  • Generational Distance(GD)

        

  • Inverted Generational Distance(IGD)

  • Spacing (SP)  

3. 测试函数code

3.1.CEC2009

% cec09.m
% 
% The Matlab version of the test instances for CEC 2009 Multiobjective
%   Optimization Competition.
% 
% Usage: fobj = cec09(problem_name), the handle of the function will be
%   with fobj
% 
% Please refer to the report for correct one if the source codes are not
%   consist with the report.
% History:
%   v1 Sept.08 2008
%   v2 Nov.18  2008
%   v3 Nov.26  2008

function fobj = cec09(name)

    switch name
        case 'UF1'
            fobj = @UF1;
        case 'UF2'
            fobj = @UF2; 
        case 'UF3'
            fobj = @UF3;  
        case 'UF4'
            fobj = @UF4;
        case 'UF5'
            fobj = @UF5; 
        case 'UF6'
            fobj = @UF6;
        case 'UF7'
            fobj = @UF7;
        case 'UF8'
            fobj = @UF8; 
        case 'UF9'
            fobj = @UF9; 
        case 'UF10'
            fobj = @UF10;
        case 'CF1'
            fobj = @CF1;
        case 'CF2'
            fobj = @CF2; 
        case 'CF3'
            fobj = @CF3;  
        case 'CF4'
            fobj = @CF4;
        case 'CF5'
            fobj = @CF5; 
        case 'CF6'
            fobj = @CF6;
        case 'CF7'
            fobj = @CF7;
        case 'CF8'
            fobj = @CF8; 
        case 'CF9'
            fobj = @CF9; 
        case 'CF10'
            fobj = @CF10;           
        otherwise
            fobj = @UF1;
    end
end

%% UF1
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function y = UF1(x)
    [dim, num]  = size(x);
    tmp         = zeros(dim,num);
    tmp(2:dim,:)= (x(2:dim,:) - sin(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]))).^2;
    tmp1        = sum(tmp(3:2:dim,:));  % odd index
    tmp2        = sum(tmp(2:2:dim,:));  % even index
    y(1,:)      = x(1,:)             + 2.0*tmp1/size(3:2:dim,2);
    y(2,:)      = 1.0 - sqrt(x(1,:)) + 2.0*tmp2/size(2:2:dim,2);
    clear tmp;
end

%% UF2
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function y = UF2(x)
    [dim, num]  = size(x);
    X1          = repmat(x(1,:),[dim-1,1]);
    A           = 6*pi*X1 + pi/dim*repmat((2:dim)',[1,num]);
    tmp         = zeros(dim,num);    
    tmp(2:dim,:)= (x(2:dim,:) - 0.3*X1.*(X1.*cos(4.0*A)+2.0).*cos(A)).^2;
    tmp1        = sum(tmp(3:2:dim,:));  % odd index
    tmp(2:dim,:)= (x(2:dim,:) - 0.3*X1.*(X1.*cos(4.0*A)+2.0).*sin(A)).^2;
    tmp2        = sum(tmp(2:2:dim,:));  % even index
    y(1,:)      = x(1,:)             + 2.0*tmp1/size(3:2:dim,2);
    y(2,:)      = 1.0 - sqrt(x(1,:)) + 2.0*tmp2/size(2:2:dim,2);
    clear X1 A tmp;
end

%% UF3
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function y = UF3(x)
    [dim, num]   = size(x);
    Y            = zeros(dim,num);
    Y(2:dim,:)   = x(2:dim,:) - repmat(x(1,:),[dim-1,1]).^(0.5+1.5*(repmat((2:dim)',[1,num])-2.0)/(dim-2.0));
    tmp1         = zeros(dim,num);
    tmp1(2:dim,:)= Y(2:dim,:).^2;
    tmp2         = zeros(dim,num);
    tmp2(2:dim,:)= cos(20.0*pi*Y(2:dim,:)./sqrt(repmat((2:dim)',[1,num])));
    tmp11        = 4.0*sum(tmp1(3:2:dim,:)) - 2.0*prod(tmp2(3:2:dim,:)) + 2.0;  % odd index
    tmp21        = 4.0*sum(tmp1(2:2:dim,:)) - 2.0*prod(tmp2(2:2:dim,:)) + 2.0;  % even index
    y(1,:)       = x(1,:)             + 2.0*tmp11/size(3:2:dim,2);
    y(2,:)       = 1.0 - sqrt(x(1,:)) + 2.0*tmp21/size(2:2:dim,2);
    clear Y tmp1 tmp2;
end

%% UF4
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function y = UF4(x)
    [dim, num]  = size(x);
    Y           = zeros(dim,num);
    Y(2:dim,:)  = x(2:dim,:) - sin(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]));
    H           = zeros(dim,num);
    H(2:dim,:)  = abs(Y(2:dim,:))./(1.0+exp(2.0*abs(Y(2:dim,:))));
    tmp1        = sum(H(3:2:dim,:));  % odd index
    tmp2        = sum(H(2:2:dim,:));  % even index
    y(1,:)      = x(1,:)          + 2.0*tmp1/size(3:2:dim,2);
    y(2,:)      = 1.0 - x(1,:).^2 + 2.0*tmp2/size(2:2:dim,2);
    clear Y H;
end

%% UF5
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function y = UF5(x)
    N           = 10.0;
    E           = 0.1;
    [dim, num]  = size(x);
    Y           = zeros(dim,num);
    Y(2:dim,:)  = x(2:dim,:) - sin(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]));
    H           = zeros(dim,num);
    H(2:dim,:)  = 2.0*Y(2:dim,:).^2 - cos(4.0*pi*Y(2:dim,:)) + 1.0;
    tmp1        = sum(H(3:2:dim,:));  % odd index
    tmp2        = sum(H(2:2:dim,:));  % even index
    tmp         = (0.5/N+E)*abs(sin(2.0*N*pi*x(1,:)));
    y(1,:)      = x(1,:)      + tmp + 2.0*tmp1/size(3:2:dim,2);
    y(2,:)      = 1.0 - x(1,:)+ tmp + 2.0*tmp2/size(2:2:dim,2);
    clear Y H;
end

%% UF6
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function y = UF6(x)
    N            = 2.0;
    E            = 0.1;
    [dim, num]   = size(x);
    Y            = zeros(dim,num);
    Y(2:dim,:)  = x(2:dim,:) - sin(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]));
    tmp1         = zeros(dim,num);
    tmp1(2:dim,:)= Y(2:dim,:).^2;
    tmp2         = zeros(dim,num);
    tmp2(2:dim,:)= cos(20.0*pi*Y(2:dim,:)./sqrt(repmat((2:dim)',[1,num])));
    tmp11        = 4.0*sum(tmp1(3:2:dim,:)) - 2.0*prod(tmp2(3:2:dim,:)) + 2.0;  % odd index
    tmp21        = 4.0*sum(tmp1(2:2:dim,:)) - 2.0*prod(tmp2(2:2:dim,:)) + 2.0;  % even index
    tmp          = max(0,(1.0/N+2.0*E)*sin(2.0*N*pi*x(1,:)));
    y(1,:)       = x(1,:)       + tmp + 2.0*tmp11/size(3:2:dim,2);
    y(2,:)       = 1.0 - x(1,:) + tmp + 2.0*tmp21/size(2:2:dim,2);
    clear Y tmp1 tmp2;
end

%% UF7
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function y = UF7(x)
    [dim, num]  = size(x);
    Y           = zeros(dim,num);
    Y(2:dim,:)  = (x(2:dim,:) - sin(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]))).^2;
    tmp1        = sum(Y(3:2:dim,:));  % odd index
    tmp2        = sum(Y(2:2:dim,:));  % even index
    tmp         = (x(1,:)).^0.2;
    y(1,:)      = tmp       + 2.0*tmp1/size(3:2:dim,2);
    y(2,:)      = 1.0 - tmp + 2.0*tmp2/size(2:2:dim,2);
    clear Y;
end

%% UF8
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function y = UF8(x)
    [dim, num]  = size(x);
    Y           = zeros(dim,num);
    Y(3:dim,:)  = (x(3:dim,:) - 2.0*repmat(x(2,:),[dim-2,1]).*sin(2.0*pi*repmat(x(1,:),[dim-2,1]) + pi/dim*repmat((3:dim)',[1,num]))).^2;
    tmp1        = sum(Y(4:3:dim,:));  % j-1 = 3*k
    tmp2        = sum(Y(5:3:dim,:));  % j-2 = 3*k
    tmp3        = sum(Y(3:3:dim,:));  % j-0 = 3*k
    y(1,:)      = cos(0.5*pi*x(1,:)).*cos(0.5*pi*x(2,:)) + 2.0*tmp1/size(4:3:dim,2);
    y(2,:)      = cos(0.5*pi*x(1,:)).*sin(0.5*pi*x(2,:)) + 2.0*tmp2/size(5:3:dim,2);
    y(3,:)      = sin(0.5*pi*x(1,:))                     + 2.0*tmp3/size(3:3:dim,2);
    clear Y;
end

%% UF9
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function y = UF9(x)
    E           = 0.1;
    [dim, num]  = size(x);
    Y           = zeros(dim,num);
    Y(3:dim,:)  = (x(3:dim,:) - 2.0*repmat(x(2,:),[dim-2,1]).*sin(2.0*pi*repmat(x(1,:),[dim-2,1]) + pi/dim*repmat((3:dim)',[1,num]))).^2;
    tmp1        = sum(Y(4:3:dim,:));  % j-1 = 3*k
    tmp2        = sum(Y(5:3:dim,:));  % j-2 = 3*k
    tmp3        = sum(Y(3:3:dim,:));  % j-0 = 3*k
    tmp         = max(0,(1.0+E)*(1-4.0*(2.0*x(1,:)-1).^2));
    y(1,:)      = 0.5*(tmp+2*x(1,:)).*x(2,:)     + 2.0*tmp1/size(4:3:dim,2);
    y(2,:)      = 0.5*(tmp-2*x(1,:)+2.0).*x(2,:) + 2.0*tmp2/size(5:3:dim,2);
    y(3,:)      = 1-x(2,:)                       + 2.0*tmp3/size(3:3:dim,2);
    clear Y;
end

%% UF10
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function y = UF10(x)
    [dim, num]  = size(x);
    Y           = zeros(dim,num);
    Y(3:dim,:)  = x(3:dim,:) - 2.0*repmat(x(2,:),[dim-2,1]).*sin(2.0*pi*repmat(x(1,:),[dim-2,1]) + pi/dim*repmat((3:dim)',[1,num]));
    H           = zeros(dim,num);
    H(3:dim,:)  = 4.0*Y(3:dim,:).^2 - cos(8.0*pi*Y(3:dim,:)) + 1.0;
    tmp1        = sum(H(4:3:dim,:));  % j-1 = 3*k
    tmp2        = sum(H(5:3:dim,:));  % j-2 = 3*k
    tmp3        = sum(H(3:3:dim,:));  % j-0 = 3*k
    y(1,:)      = cos(0.5*pi*x(1,:)).*cos(0.5*pi*x(2,:)) + 2.0*tmp1/size(4:3:dim,2);
    y(2,:)      = cos(0.5*pi*x(1,:)).*sin(0.5*pi*x(2,:)) + 2.0*tmp2/size(5:3:dim,2);
    y(3,:)      = sin(0.5*pi*x(1,:))                     + 2.0*tmp3/size(3:3:dim,2);
    clear Y H;
end

%% CF1
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function [y,c] = CF1(x)
    a            = 1.0;
    N            = 10.0;
    [dim, num]   = size(x);
    Y            = zeros(dim,num);
    Y(2:dim,:)   = (x(2:dim,:) - repmat(x(1,:),[dim-1,1]).^(0.5+1.5*(repmat((2:dim)',[1,num])-2.0)/(dim-2.0))).^2;
    tmp1         = sum(Y(3:2:dim,:));% odd index
    tmp2         = sum(Y(2:2:dim,:));% even index 
    y(1,:)       = x(1,:)       + 2.0*tmp1/size(3:2:dim,2);
    y(2,:)       = 1.0 - x(1,:) + 2.0*tmp2/size(2:2:dim,2);
    c(1,:)       = y(1,:) + y(2,:) - a*abs(sin(N*pi*(y(1,:)-y(2,:)+1.0))) - 1.0;
    clear Y;
end

%% CF2
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function [y,c] = CF2(x)
    a           = 1.0;
    N           = 2.0;
    [dim, num]  = size(x);
    tmp         = zeros(dim,num);
    tmp(2:dim,:)= (x(2:dim,:) - sin(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]))).^2;
    tmp1        = sum(tmp(3:2:dim,:));  % odd index
    tmp(2:dim,:)= (x(2:dim,:) - cos(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]))).^2;
    tmp2        = sum(tmp(2:2:dim,:));  % even index
    y(1,:)      = x(1,:)             + 2.0*tmp1/size(3:2:dim,2);
    y(2,:)      = 1.0 - sqrt(x(1,:)) + 2.0*tmp2/size(2:2:dim,2);
    t           = y(2,:) + sqrt(y(1,:)) - a*sin(N*pi*(sqrt(y(1,:))-y(2,:)+1.0)) - 1.0;
    c(1,:)      = sign(t).*abs(t)./(1.0+exp(4.0*abs(t)));
    clear tmp;
end

%% CF3
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function [y,c] = CF3(x)
    a            = 1.0;
    N            = 2.0;
    [dim, num]   = size(x);
    Y            = zeros(dim,num);
    Y(2:dim,:)   = x(2:dim,:) - sin(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]));
    tmp1         = zeros(dim,num);
    tmp1(2:dim,:)= Y(2:dim,:).^2;
    tmp2         = zeros(dim,num);
    tmp2(2:dim,:)= cos(20.0*pi*Y(2:dim,:)./sqrt(repmat((2:dim)',[1,num])));
    tmp11        = 4.0*sum(tmp1(3:2:dim,:)) - 2.0*prod(tmp2(3:2:dim,:)) + 2.0;  % odd index
    tmp21        = 4.0*sum(tmp1(2:2:dim,:)) - 2.0*prod(tmp2(2:2:dim,:)) + 2.0;  % even index
    y(1,:)       = x(1,:)          + 2.0*tmp11/size(3:2:dim,2);
    y(2,:)       = 1.0 - x(1,:).^2 + 2.0*tmp21/size(2:2:dim,2);
    c(1,:)       = y(2,:) + y(1,:).^2 - a*sin(N*pi*(y(1,:).^2-y(2,:)+1.0)) - 1.0;   
    clear Y tmp1 tmp2;
end

%% CF4
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function [y,c] = CF4(x)
    [dim, num]  = size(x);
    tmp         = zeros(dim,num);
    tmp(2:dim,:)= x(2:dim,:) - sin(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]));
    tmp1        = sum(tmp(3:2:dim,:).^2);  % odd index
    tmp2        = sum(tmp(4:2:dim,:).^2);  % even index
    index1      = tmp(2,:) < (1.5-0.75*sqrt(2.0));
    index2      = tmp(2,:)>= (1.5-0.75*sqrt(2.0));
    tmp(2,index1) = abs(tmp(2,index1));
    tmp(2,index2) = 0.125 + (tmp(2,index2)-1.0).^2;
    y(1,:)      = x(1,:)                  + tmp1;
    y(2,:)      = 1.0 - x(1,:) + tmp(2,:) + tmp2;
    t           = x(2,:) - sin(6.0*pi*x(1,:)+2.0*pi/dim) - 0.5*x(1,:) + 0.25;
    c(1,:)      = sign(t).*abs(t)./(1.0+exp(4.0*abs(t)));
    clear tmp index1 index2;
end

%% CF5
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function [y,c] = CF5(x)
    [dim, num]  = size(x);
    tmp         = zeros(dim,num);
    tmp(2:dim,:)= x(2:dim,:) - 0.8*repmat(x(1,:),[dim-1,1]).*cos(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]));
    tmp1        = sum(2.0*tmp(3:2:dim,:).^2-cos(4.0*pi*tmp(3:2:dim,:))+1.0);  % odd index
    tmp(2:dim,:)= x(2:dim,:) - 0.8*repmat(x(1,:),[dim-1,1]).*sin(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]));    
    tmp2        = sum(2.0*tmp(4:2:dim,:).^2-cos(4.0*pi*tmp(4:2:dim,:))+1.0);  % even index
    index1      = tmp(2,:) < (1.5-0.75*sqrt(2.0));
    index2      = tmp(2,:)>= (1.5-0.75*sqrt(2.0));
    tmp(2,index1) = abs(tmp(2,index1));
    tmp(2,index2) = 0.125 + (tmp(2,index2)-1.0).^2;
    y(1,:)      = x(1,:)                  + tmp1;
    y(2,:)      = 1.0 - x(1,:) + tmp(2,:) + tmp2;
    c(1,:)      = x(2,:) - 0.8*x(1,:).*sin(6.0*pi*x(1,:)+2.0*pi/dim) - 0.5*x(1,:) + 0.25;
    clear tmp;
end

%% CF6
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function [y,c] = CF6(x)
    [dim, num]  = size(x);
    tmp         = zeros(dim,num);
    tmp(2:dim,:)= x(2:dim,:) - 0.8*repmat(x(1,:),[dim-1,1]).*cos(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]));
    tmp1        = sum(tmp(3:2:dim,:).^2);  % odd index
    tmp(2:dim,:)= x(2:dim,:) - 0.8*repmat(x(1,:),[dim-1,1]).*sin(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]));    
    tmp2        = sum(tmp(2:2:dim,:).^2);  % even index
    y(1,:)      = x(1,:)            + tmp1;
    y(2,:)      = (1.0 - x(1,:)).^2 + tmp2;
    tmp         = 0.5*(1-x(1,:))-(1-x(1,:)).^2;
    c(1,:)      = x(2,:) - 0.8*x(1,:).*sin(6.0*pi*x(1,:)+2*pi/dim) - sign(tmp).*sqrt(abs(tmp));
    tmp         = 0.25*sqrt(1-x(1,:))-0.5*(1-x(1,:));
    c(2,:)      = x(4,:) - 0.8*x(1,:).*sin(6.0*pi*x(1,:)+4*pi/dim) - sign(tmp).*sqrt(abs(tmp));    
    clear tmp;
end

%% CF7
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function [y,c] = CF7(x)
    [dim, num]  = size(x);
    tmp         = zeros(dim,num);
    tmp(2:dim,:)= x(2:dim,:) - cos(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]));
    tmp1        = sum(2.0*tmp(3:2:dim,:).^2-cos(4.0*pi*tmp(3:2:dim,:))+1.0);  % odd index
    tmp(2:dim,:)= x(2:dim,:) - sin(6.0*pi*repmat(x(1,:),[dim-1,1]) + pi/dim*repmat((2:dim)',[1,num]));
    tmp2        = sum(2.0*tmp(6:2:dim,:).^2-cos(4.0*pi*tmp(6:2:dim,:))+1.0);  % even index
    tmp(2,:)    = tmp(2,:).^2;
    tmp(4,:)    = tmp(4,:).^2;
    y(1,:)      = x(1,:)                                  + tmp1;
    y(2,:)      = (1.0 - x(1,:)).^2 + tmp(2,:) + tmp(4,:) + tmp2;
    tmp         = 0.5*(1-x(1,:))-(1-x(1,:)).^2;
    c(1,:)      = x(2,:) - sin(6.0*pi*x(1,:)+2*pi/dim) - sign(tmp).*sqrt(abs(tmp));
    tmp         = 0.25*sqrt(1-x(1,:))-0.5*(1-x(1,:));
    c(2,:)      = x(4,:) - sin(6.0*pi*x(1,:)+4*pi/dim) - sign(tmp).*sqrt(abs(tmp));    
    clear tmp;
end

%% CF8
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function [y,c] = CF8(x)
    N           = 2.0;
    a           = 4.0;
    [dim, num]  = size(x);
    Y           = zeros(dim,num);
    Y(3:dim,:)  = (x(3:dim,:) - 2.0*repmat(x(2,:),[dim-2,1]).*sin(2.0*pi*repmat(x(1,:),[dim-2,1]) + pi/dim*repmat((3:dim)',[1,num]))).^2;
    tmp1        = sum(Y(4:3:dim,:));  % j-1 = 3*k
    tmp2        = sum(Y(5:3:dim,:));  % j-2 = 3*k
    tmp3        = sum(Y(3:3:dim,:));  % j-0 = 3*k
    y(1,:)      = cos(0.5*pi*x(1,:)).*cos(0.5*pi*x(2,:)) + 2.0*tmp1/size(4:3:dim,2);
    y(2,:)      = cos(0.5*pi*x(1,:)).*sin(0.5*pi*x(2,:)) + 2.0*tmp2/size(5:3:dim,2);
    y(3,:)      = sin(0.5*pi*x(1,:))                     + 2.0*tmp3/size(3:3:dim,2);
    c(1,:)      = (y(1,:).^2+y(2,:).^2)./(1.0-y(3,:).^2) - a*abs(sin(N*pi*((y(1,:).^2-y(2,:).^2)./(1.0-y(3,:).^2)+1.0))) - 1.0;
    clear Y;
end

%% CF9
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function [y,c] = CF9(x)
    N           = 2.0;
    a           = 3.0;
    [dim, num]  = size(x);
    Y           = zeros(dim,num);
    Y(3:dim,:)  = (x(3:dim,:) - 2.0*repmat(x(2,:),[dim-2,1]).*sin(2.0*pi*repmat(x(1,:),[dim-2,1]) + pi/dim*repmat((3:dim)',[1,num]))).^2;
    tmp1        = sum(Y(4:3:dim,:));  % j-1 = 3*k
    tmp2        = sum(Y(5:3:dim,:));  % j-2 = 3*k
    tmp3        = sum(Y(3:3:dim,:));  % j-0 = 3*k
    y(1,:)      = cos(0.5*pi*x(1,:)).*cos(0.5*pi*x(2,:)) + 2.0*tmp1/size(4:3:dim,2);
    y(2,:)      = cos(0.5*pi*x(1,:)).*sin(0.5*pi*x(2,:)) + 2.0*tmp2/size(5:3:dim,2);
    y(3,:)      = sin(0.5*pi*x(1,:))                     + 2.0*tmp3/size(3:3:dim,2);
    c(1,:)      = (y(1,:).^2+y(2,:).^2)./(1.0-y(3,:).^2) - a*sin(N*pi*((y(1,:).^2-y(2,:).^2)./(1.0-y(3,:).^2)+1.0)) - 1.0;
    clear Y;
end

%% CF10
% x and y are columnwise, the imput x must be inside the search space and
% it could be a matrix
function [y,c] = CF10(x)
    a           = 1.0;
    N           = 2.0;
    [dim, num]  = size(x);
    Y           = zeros(dim,num);
    Y(3:dim,:)  = x(3:dim,:) - 2.0*repmat(x(2,:),[dim-2,1]).*sin(2.0*pi*repmat(x(1,:),[dim-2,1]) + pi/dim*repmat((3:dim)',[1,num]));
    H           = zeros(dim,num);
    H(3:dim,:)  = 4.0*Y(3:dim,:).^2 - cos(8.0*pi*Y(3:dim,:)) + 1.0;
    tmp1        = sum(H(4:3:dim,:));  % j-1 = 3*k
    tmp2        = sum(H(5:3:dim,:));  % j-2 = 3*k
    tmp3        = sum(H(3:3:dim,:));  % j-0 = 3*k
    y(1,:)      = cos(0.5*pi*x(1,:)).*cos(0.5*pi*x(2,:)) + 2.0*tmp1/size(4:3:dim,2);
    y(2,:)      = cos(0.5*pi*x(1,:)).*sin(0.5*pi*x(2,:)) + 2.0*tmp2/size(5:3:dim,2);
    y(3,:)      = sin(0.5*pi*x(1,:))                     + 2.0*tmp3/size(3:3:dim,2);
    c(1,:)      = (y(1,:).^2+y(2,:).^2)./(1.0-y(3,:).^2) - a*sin(N*pi*((y(1,:).^2-y(2,:).^2)./(1.0-y(3,:).^2)+1.0)) - 1.0;
    clear Y H;
end

3.2 CEC2009 真实Pareto

        在计算评价标准的时候,我们需要用到真实Pareto的解集,Pareto解集一般由以下三种方式获得:

  • 采用穷举法,穷尽最优点
  • 采用多种优化方法进行优化,综合选择最优的点作为Pareto解集
  • 对于一个问题有明确的Pareto解集

        本次的cec2009真实pareto数据集我已经替大家找到,有需要的可以附件直接下载。


总结

       在打UF问题的时候,本人已经尽力不打错,但是难免可能有些小错误,建议还是看一下附件问题描述。本文只是自己的见解以及笔记,有错误的地方,欢迎大家指出。

参考文献:Multi-objective grey wolf optimizer: A novel algorithm for multi-criterion optimization - ScienceDirect

  • 30
    点赞
  • 41
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值