image thumbnail

ev-MOGA Multiobjective Evolutionary Algorithm

by

 

18 Apr 2011 (Updated )

This toolbox implements the ev-MOGA Multiobjective Evolutionary Algorithm.

run_evMOGA.m
% ev-MOGA Algorithm.
% Copyright 2011. Predictive Control and Heuristic Optimization Group.
% Universitat Politcnica de Valncia
% e-mail contact: juaherdu@isa.upv.es

clear all
% Initializing random number generators...
rand('twister',5489);
randn('state',0);

% here you can load the data you need to evaluate objective fucntions...
% load data.mat 

% Set the parameters to the multiobjective problem. 
% (more details in evMOGAdescription.pdf file)

% These parameters are related with crosover genetic operator...
dd_ini= 0.25;
dd_fin= 0.1;
% This parameter is mutation probability ...
Pm= 0.1;
% These parameters are related with mutation genetic operator...
Sigma_Pm_ini= 10.0;
Sigma_Pm_fin= 0.1;
% GA population size. It must be an even number
Nind_GA=4; 
% P population size.
Nind_P=100;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%   Example MOP1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% objfun contains the name of the matlab function which is used to evaluate objective functions
% see mop1.m file
objfun='mop1';
% Number of decision variables. Dimension of searching space
Lind=1;
% Limits of searching space
theta_max=10^5;
theta_min=-10^5;
% Number of objective functions. Dimension of the objective space 
Sfun=2;
% Number of boxes for each dimension in the objective space 
n_box=[50 50];
% Maximun size of the Poputation/Archive A, where the Pareto Front is stored.
% Its bounds depends of n_box.
Nind_max_A=100;
% Number of iterations of the ev-MOGA algorithm
n_iterations=4975;


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%   Example MOP4
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% objfun='mop4';
% Lind=3;
% theta_max=[5 5 5];
% theta_min=[-5 -5 -5];
% Sfun=2;
% n_box=[100 160];
% Nind_max_A=200; 
% n_iterations=4975; 

%initialising the ev-MOGA 
Ini_evMOGA;

disp('######### iteration 0')
Iteration_evMOGA(0);  
%ev-MOGA iterations
for i=1:n_iterations
   disp(['######### iteration ' num2str(i)])
   [ParetoFront,ParetoSet]=Iteration_evMOGA(i);     
end


% Results presentation
figure          
plot(ParetoFront(:,1),ParetoFront(:,2),'ro')
hold on
min_f=min(ParetoFront);
max_f=max(ParetoFront);
epsilon=(max_f-min_f)./n_box;

for i=0:n_box(1)
    x1=min_f(1)+i*epsilon(1);
    x2=min_f(1)+i*epsilon(1);
    y1=min_f(2);
    y2=max_f(2);
    plot([x1 x2],[y1 y2])
end
for i=0:n_box(2)
    y1=min_f(2)+i*epsilon(2);
    y2=min_f(2)+i*epsilon(2);
    x1=min_f(1);
    x2=max_f(1);
    plot([x1 x2],[y1 y2])
end
xlabel('J_1')
ylabel('J_2')



Contact us