PlatEMO
PlatEMO copied to clipboard
MOEA/D-GR
function MOEADGR(Global)
%
% Wang, Z., Zhang, Q., Gong, M., & Zhou, A. (2014, July). % A Replacement Strategy for Balancing Convergence and Diversity in MOEA/D % In 2014 IEEE Congress on Evolutionary Computation (CEC) (pp. 2132-2139). IEEE.
% delta --- 0.8 --- The probability of choosing parents locally % operator --- DE %-------------------------------------------------------------------------- % Copyright (c) 2016-2017 BIMK Group. You are free to use the PlatEMO for % research purposes. All publications which use this platform or any code % in the platform should acknowledge the use of "PlatEMO" and reference "Ye % Tian, Ran Cheng, Xingyi Zhang, and Yaochu Jin, PlatEMO: A MATLAB Platform % for Evolutionary Multi-Objective Optimization [Educational Forum], IEEE % Computational Intelligence Magazine, 2017, 12(4): 73-87". %-------------------------------------------------------------------------- ` % Written by Lucas Farias
%% Parameter setting
[delta] = Global.ParameterSet(0.8);
%% Generate the weight vectors
[W,Global.N] = UniformPoint(Global.N,Global.M);
% Size of neighborhood
T = ceil(Global.N/10);
%% Detect the neighbours of each solution
B = pdist2(W,W);
[~,B] = sort(B,2);
B = B(:,1:T);
%% Generate random population
Population = Global.Initialization();
Z = min(Population.objs,[],1);
%% Optimization
while Global.NotTermination(Population)
for i = 1 : Global.N
% Choose the parents
if rand < delta
P = B(i,randperm(size(B,2)));
else
P = randperm(Global.N);
end
% Generate an offspring
Offspring = Global.Variation(Population([i,P(1:2)]),1,@DE);
% Update the ideal point
Z = min(Z,Offspring.obj);
% Global Replacement
all_g_TCH=max(abs((Offspring.obj-repmat(Z,Global.N,1)).*W),[],2);
best_g_TCH=min(all_g_TCH);
Chosen_one = find(all_g_TCH(:,1)==best_g_TCH);
P = B(Chosen_one(1),randperm(size(B,2)));
% Update the solutions in P by Tchebycheff approach
g_old = max(abs(Population(P).objs-repmat(Z,length(P),1)).*W(P,:),[],2);
g_new = max(repmat(abs(Offspring.obj-Z),length(P),1).*W(P,:),[],2);
Population(P(find(g_old>=g_new,T))) = Offspring;
end
end
end`