帕累托前沿示意图

% MATLAB script to plot a hyperbolic Pareto front and dominated solutions

% Define the range of f1
f1 = linspace(0.5, 5, 100);

% Define the hyperbolic curve (Pareto front)
f2 = 10 ./ f1;

% Select 6 points on the Pareto front (non-dominated solutions)
pareto_f1 = [1, 1.5, 2.5, 3, 4, 4.5];
pareto_f2 = 10 ./ pareto_f1;

% Randomly generate 10 points below the Pareto front (dominated solutions)
dominated_f1 = [1.2, 2, 2.7, 3.5, 4.2, 1.8, 3.8, 4.8, 2.2, 3] - 1;
dominated_f2 = [8, 4.5, 3.8, 2.5, 2, 6, 3.5, 1.5, 5, 3.3] - 1.7;

% Plotting
figure;
hold on;

% Plot the Pareto front (hyperbolic curve)
plot(f1, f2, 'k-', 'LineWidth', 1.5);

% Plot dominated solutions
plot(dominated_f1, dominated_f2, 'o', 'MarkerSize', 8, 'MarkerFaceColor', 'w', 'MarkerEdgeColor', 'k');

% Plot Pareto solutions
plot(pareto_f1, pareto_f2, 'o', 'MarkerSize', 10, 'MarkerFaceColor', [0.5, 0.5, 0.5], 'MarkerEdgeColor', 'k');

% Labeling the plot
xlabel('$f_1$', 'Interpreter', 'latex', 'FontSize', 20);
ylabel('$f_2$', 'Interpreter', 'latex', 'FontSize', 20);
%title('支配解 vs 帕累托解', 'FontSize', 20);

% Adding the legend (in Chinese)
legend('帕累托前沿', '支配解', '帕累托解', 'Location', 'northeast', 'FontSize', 20);

% Set axis limits (adjust as necessary)
xlim([0 5]);
ylim([0 11]);

% Remove axis ticks and numbers
set(gca, 'XTick', [], 'YTick', []);

% Add the text "可行解空间" below the Pareto front
text(4, 1.5, '可行解值域', 'FontSize', 20, 'HorizontalAlignment', 'center');

% Hold off to stop plotting
hold off;

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值