How to Find Pareto Optimal Solutions Using Matlab?

In this post, I’m going to show you a simple but very effective method to find Pareto optimal solutions for a multi objective optimization problem using Matlab. It is very easy, and minimum programming skill is required.

Here are the details of the benchmark problem to be solved in this video.

Let’s see how we find Pareto optimal solutions for this multi objective optimization problem.

For more videos like this, check my YouTube channel here.

Matlab Code

multi_objective_function.m

function YY = multi_objective_function(X)

for i = 1:2
    S1(i) = -10*exp(-0.2*sqrt(X(i).^2+X(i+1).^2));
end
F1 = sum(S1); % objective function 1

for i = 1:3
    S2(i) = abs(X(i)).^0.8 + 5*sin(X(i).^3);
end
F2 = sum(S2); % objective function 2

YY = [F1 F2];

solving.m

function [x,fval,exitflag,output,population,score] = solving(nvars,lb,ub,PopulationSize_Data,MaxGenerations_Data)
%% This is an auto generated MATLAB file from Optimization Tool.

%% Start with the default options
options = optimoptions('gamultiobj');
%% Modify options setting
options = optimoptions(options,'PopulationSize', PopulationSize_Data);
options = optimoptions(options,'MaxGenerations', MaxGenerations_Data);
options = optimoptions(options,'CrossoverFcn', {  @crossoverintermediate [] });
options = optimoptions(options,'Display', 'off');
options = optimoptions(options,'PlotFcn', { @gaplotpareto });
[x,fval,exitflag,output,population,score] = ...
gamultiobj(@multi_objective_function,nvars,[],[],[],[],lb,ub,[],options);

main_program.m

clc
clear all
close all

nvars = 3;
lb = [-5 -5 -5];
ub = [5 5 5];
PopulationSize_Data = 200;
MaxGenerations_Data = 50;

[x,fval,exitflag,output,population,score] = solving(nvars,lb,ub,PopulationSize_Data,MaxGenerations_Data);

optimal_solution = x

P/s: If you find the post useful, share it to remember and to help other people as well.

8 Replies to “How to Find Pareto Optimal Solutions Using Matlab?”

      1. Great video …. I would like to invite you to co-author a paper with me in the optimization of a structural engineering subject.
        It would be a great honor.

  1. How to solve that same problem of looking for the pareto optimum but using the simulated annealing heristics?

  2. hello thank you for sharing, please how to do a multi-lens optimization if one of the variable is an integer 12:1:16

Leave a Reply

Your email address will not be published. Required fields are marked *