一、CEC2018简介
CEC2018共有14个测试函数:DF1-DF14,其中DF1-DF9是两个目标,DF10-DF14是三个目标。
二、DF6-DF9的PS及PF
CEC2018:动态多目标测试函数DF6~DF9的PS及PF_IT猿手的博客-CSDN博客
%% 画PS
figure
for i=1:maxgen/taut
plot(h(i).dataPS(:,1),h(i).dataPS(:,2),'.')
hold on;
end
% grid on;
xlabel('\it\fontname{Times New Roman}x_1'); ylabel('\it\fontname{Times New Roman}x_2');
title(strcat(probID,'-PS'))
%% 画PF
figure
if TestProblem<10
if (TestProblem==1)||(TestProblem==2)||(TestProblem==3)||(TestProblem==6)
for i=1:maxgen/taut
plot(h(i).dataPF(:,1),h(i).dataPF(:,2),'.')
hold on;
end
xlabel('\it\fontname{Times New Roman}f_1'); ylabel('\it\fontname{Times New Roman}f_2');
elseif (TestProblem==4)||(TestProblem==5)||(TestProblem==7)||(TestProblem==9)
for i=1:maxgen/taut
plot(h(i).dataPF(:,1)+2*h(i).t,h(i).dataPF(:,2)+2*h(i).t,'.')
hold on;
end
xlabel('\it\fontname{Times New Roman}f_1+2t'); ylabel('\it\fontname{Times New Roman}f_2+2t');
else
for i=1:maxgen/taut
plot(h(i).dataPF(:,1)+4*h(i).t,h(i).dataPF(:,2)+4*h(i).t,'.')
hold on;
end
xlabel('\it\fontname{Times New Roman}f_1+4t'); ylabel('\it\fontname{Times New Roman}f_2+4t');
end
else
for i=1:maxgen/taut
plot3(h(i).dataPF(:,1),h(i).dataPF(:,2),h(i).dataPF(:,3),'.')
hold on;
end
xlabel('\it\fontname{Times New Roman}f_1'); ylabel('\it\fontname{Times New Roman}f_2');zlabel('\it\fontname{Times New Roman}f_3');
end
% grid on;
title(strcat(probID,'-PF'))
2.1DF6的PS及PF
2.2DF7的PS及PF
2.3DF8的PS及PF
2.4DF9的PS及PF
三、完整代码
文件夹内包含动态多目标测试函数DF6、DF7、DF8和DF9的PS及PF完整MATLAB代码。
点击PlotTruePF.m即可运行。