⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 output2popfigure.m

📁 离散算法
💻 M
字号:
function output2PopFigure(t,in_proDes,pop, in_Ptrue, in_funInd,t_pop,t_evals, in_Bounds);
% % % div = 10;
% % % xMin = 00;
% % % xLen = 1000;
% % % xMax = xMin + xLen;
% % % xStep = xLen / div;
% % % yMin = 000;
% % % yLen = 1000;
% % % yMax = yMin + yLen;
% % % yStep = yLen / div;
% div = 10;
% % % xMin = in_Bounds(1, 1);
% % % xMax = in_Bounds(1, 2);
% % % xLen = xMax - xMin;
% % % xStep = in_Bounds(1, 3);
% % % 
% % % yMin = in_Bounds(2, 1);
% % % yMax = in_Bounds(2, 2);
% % % yLen = yMax - yMin;
% % % yStep = in_Bounds(2, 3);
% % % 
figure(t),clf reset,h_ap=axes('Position',[0.08, 0.09, 0.85, 0.85]);
% % % % 坐标刻度显示
% % % set(h_ap,'Xlim',[xMin, xMax],'Ylim',[yMin, yMax]);
% % % pxtick = xMin: xStep: xMax;
% % % pytick = yMin: yStep: yMax;
% % % set(h_ap,'Xtick',pxtick,'Ytick',pytick);
hold on
% 坐标轴显示
xlabel('Makespan'); % '\fontsize{12}\fontname{隶书}f1','Position',[xMin+1.05 * xLen, yMin+0.02 * yLen, 1 * xLen]
% text(xMax, yMin+ 0.005*yLen,'\fontsize{12}\fontname{Arial Black}\bf\rightarrow'); % +0.975 * xLen       
ylabel('Total Flowtime'); %  '\fontsize{12}\fontname{隶书}f2','Position',[xMin-0.000 * xLen, yMin+1.025 * yLen, 1 * yLen],'Rotation',0
% text(xMin- 0.005*xLen , yMax- 0.01*yLen,'\fontsize{12}\fontname{Arial Black}\bf\rightarrow','Rotation',90);%         + 0.96 * yLen
% 种群显示
ps=size(pop,1);
for i=1:ps
    h1 = plot(pop(i,in_funInd),pop(i,in_funInd+1),'r+');
end
% 实际最优解显示
p=size(in_Ptrue,1);
for i=1:p
    h2 = plot(in_Ptrue(i,in_funInd),in_Ptrue(i,in_funInd+1),'bs');
end
% 设标题
popStr=strcat('pop = ',num2str(t_pop));
if (t_evals >= 0)
	evalsStr=strcat('evaluations = ',num2str(t_evals));
else
    evalsStr = ('Enumeration');
end
titleStr=[in_proDes,' (', popStr, ' ', evalsStr,')']; %\fontsize{16}\fontname{Arial Black}\bf  num2str(in_jobCount),' × ',num2str(in_machCount),' (', popStr, ' ', evalsStr,')'
title(titleStr);
% 设显示代数和迭代次数
% if nargin==6
% %     plot(xLen * 0.7 + xMin, yLen * 0.95 + yMin, 'bs');
% %     text(xLen * 0.72 + xMin, yLen * 0.95 + yMin, 'Pareto Optimal');
% %        
    if (t_evals > 0)
        legend([h2 h1], 'Pareto Optimal', 'Solutions in this Paper', 0);  
% %         plot(xLen * 0.7 + xMin, yLen * 0.9 + yMin, 'r+');
% %         text(xLen * 0.72 + xMin, yLen * 0.9 + yMin, 'Solutions in this Paper');
    elseif (t_evals == 0)
        legend([h2 h1], 'Pareto Optimal', 'Initial Solutions', 0);
% %         plot(xLen * 0.7 + xMin, yLen * 0.9 + yMin, 'r+');
% %         text(xLen * 0.72 + xMin, yLen * 0.9 + yMin, 'Initial Solutions');
    elseif ((t_evals < 0) && (ps > 0)) %    )
        legend([h2 h1], 'Pareto Optimal', 'All Solutions', 0);
% %         plot(xLen * 0.7 + xMin, yLen * 0.9 + yMin, 'r+');
% %         text(xLen * 0.72 + xMin, yLen * 0.9 + yMin, 'All Solutions');
    end
  
% end
% grid;
box
drawnow

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -