diff --git a/Doc/releasenote.md b/Doc/releasenote.md index d88cd51a9..6857f748d 100644 --- a/Doc/releasenote.md +++ b/Doc/releasenote.md @@ -1,4 +1,10 @@ +# Release Highlights of PlatEMO 2.8 + +* Add three algorithms for constrained optimization (i.e., CCMO, MOEA/D-DAE, and TiGE-2) and an algorithm for many-objective optimization (i.e., PREA). There are currently 118 algorithms in the platform. +* Fix some minor bugs in the Pareto front sampling methods in LIR-CMOP and MW problems. + # Release Highlights of PlatEMO 2.6 + * Add two algorithms: MOEA/PSL and DWU. There are currently 112 algorithms in the platform. # Release Highlights of PlatEMO 2.5 @@ -29,4 +35,4 @@ # Release Highlights of PlatEMO 2.0 * __Lighter framework.__ The architecture of PlatEMO is simplified, which leads to lower learning cost and higher efficiency. The result file size is also reduced. * __Higher efficiency.__ The runtime of Pareto dominance based algorithms is reduced by using a more efficient non-dominated sorting algorithm. The runtime of decomposition based algorithms is reduced due to the new architecture of PlatEMO. The runtime of hypervolume calculation is reduced by new logic and GPU acceleration. In experimental module, the algorithms can be executed in parallel. -* __More conveniences.__ The populations obtained during the evolutionary process can be saved in result files. The references of each algorithm, problem, operator, and metric are given in the comments of the function. The codes of GUI are now open source. \ No newline at end of file +* __More conveniences.__ The populations obtained during the evolutionary process can be saved in result files. The references of each algorithm, problem, operator, and metric are given in the comments of the function. The codes of GUI are now open source. diff --git a/PlatEMO/Algorithms/CCMO/CCMO.m b/PlatEMO/Algorithms/CCMO/CCMO.m new file mode 100644 index 000000000..5d7ef1769 --- /dev/null +++ b/PlatEMO/Algorithms/CCMO/CCMO.m @@ -0,0 +1,44 @@ +function CCMO(Global) +% +% Coevolutionary constrained multi-objective optimization framework +% type --- 1 --- Type of operator (1. GA 2. DE) + +%------------------------------- Reference -------------------------------- +% Y. Tian, T. Zhang, J. Xiao, X. Zhang, and Y. Jin, A coevolutionary +% framework for constrained multi-objective optimization problems, IEEE +% Transactions on Evolutionary Computation, 2020. +%------------------------------- Copyright -------------------------------- +% Copyright (c) 2018-2019 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". +%-------------------------------------------------------------------------- + + %% Parameter setting + type = Global.ParameterSet(1); + + %% Generate random population + Population1 = Global.Initialization(); + Population2 = Global.Initialization(); + Fitness1 = CalFitness(Population1.objs,Population1.cons); + Fitness2 = CalFitness(Population2.objs); + + %% Optimization + while Global.NotTermination(Population1) + if type == 1 + MatingPool1 = TournamentSelection(2,Global.N,Fitness1); + MatingPool2 = TournamentSelection(2,Global.N,Fitness2); + Offspring1 = GAhalf(Population1(MatingPool1)); + Offspring2 = GAhalf(Population2(MatingPool2)); + elseif type == 2 + MatingPool1 = TournamentSelection(2,2*Global.N,Fitness1); + MatingPool2 = TournamentSelection(2,2*Global.N,Fitness2); + Offspring1 = DE(Population1,Population1(MatingPool1(1:end/2)),Population1(MatingPool1(end/2+1:end))); + Offspring2 = DE(Population2,Population2(MatingPool2(1:end/2)),Population2(MatingPool2(end/2+1:end))); + end + [Population1,Fitness1] = EnvironmentalSelection([Population1,Offspring1,Offspring2],Global.N,true); + [Population2,Fitness2] = EnvironmentalSelection([Population2,Offspring1,Offspring2],Global.N,false); + end +end \ No newline at end of file diff --git a/PlatEMO/Algorithms/CCMO/CalFitness.m b/PlatEMO/Algorithms/CCMO/CalFitness.m new file mode 100644 index 000000000..3b7e98da0 --- /dev/null +++ b/PlatEMO/Algorithms/CCMO/CalFitness.m @@ -0,0 +1,56 @@ +function Fitness = CalFitness(PopObj,PopCon) +% Calculate the fitness of each solution + +%------------------------------- Copyright -------------------------------- +% Copyright (c) 2018-2019 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". +%-------------------------------------------------------------------------- + + N = size(PopObj,1); + if nargin == 1 + CV = zeros(N,1); + else + CV = sum(max(0,PopCon),2); + end + + %% Detect the dominance relation between each two solutions + Dominate = false(N); + for i = 1 : N-1 + for j = i+1 : N + if CV(i) < CV(j) + Dominate(i,j) = true; + elseif CV(i) > CV(j) + Dominate(j,i) = true; + else + k = any(PopObj(i,:)PopObj(j,:)); + if k == 1 + Dominate(i,j) = true; + elseif k == -1 + Dominate(j,i) = true; + end + end + end + end + + %% Calculate S(i) + S = sum(Dominate,2); + + %% Calculate R(i) + R = zeros(1,N); + for i = 1 : N + R(i) = sum(S(Dominate(:,i))); + end + + %% Calculate D(i) + Distance = pdist2(PopObj,PopObj); + Distance(logical(eye(length(Distance)))) = inf; + Distance = sort(Distance,2); + D = 1./(Distance(:,floor(sqrt(N)))+2); + + %% Calculate the fitnesses + Fitness = R + D'; +end \ No newline at end of file diff --git a/PlatEMO/Algorithms/CCMO/EnvironmentalSelection.m b/PlatEMO/Algorithms/CCMO/EnvironmentalSelection.m new file mode 100644 index 000000000..0ce04cd67 --- /dev/null +++ b/PlatEMO/Algorithms/CCMO/EnvironmentalSelection.m @@ -0,0 +1,51 @@ +function [Population,Fitness] = EnvironmentalSelection(Population,N,isOrigin) +% The environmental selection of SPEA2 + +%------------------------------- Copyright -------------------------------- +% Copyright (c) 2018-2019 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". +%-------------------------------------------------------------------------- + + %% Calculate the fitness of each solution + if isOrigin + Fitness = CalFitness(Population.objs,Population.cons); + else + Fitness = CalFitness(Population.objs); + end + + %% Environmental selection + Next = Fitness < 1; + if sum(Next) < N + [~,Rank] = sort(Fitness); + Next(Rank(1:N)) = true; + elseif sum(Next) > N + Del = Truncation(Population(Next).objs,sum(Next)-N); + Temp = find(Next); + Next(Temp(Del)) = false; + end + % Population for next generation + Population = Population(Next); + Fitness = Fitness(Next); + % Sort the population + [Fitness,rank] = sort(Fitness); + Population = Population(rank); +end + +function Del = Truncation(PopObj,K) +% Select part of the solutions by truncation + + %% Truncation + Distance = pdist2(PopObj,PopObj); + Distance(logical(eye(length(Distance)))) = inf; + Del = false(1,size(PopObj,1)); + while sum(Del) < K + Remain = find(~Del); + Temp = sort(Distance(Remain,Remain),2); + [~,Rank] = sortrows(Temp); + Del(Remain(Rank(1))) = true; + end +end \ No newline at end of file diff --git a/PlatEMO/Algorithms/EIM-EGO/InfillSamplingEIM.m b/PlatEMO/Algorithms/EIM-EGO/InfillSamplingEIM.m index 99c9a3dab..e59e9901f 100644 --- a/PlatEMO/Algorithms/EIM-EGO/InfillSamplingEIM.m +++ b/PlatEMO/Algorithms/EIM-EGO/InfillSamplingEIM.m @@ -38,10 +38,10 @@ end s = sqrt(max(0,mse)); % the EI matrix (three dimensional matrix) - f_matrix = f .* ones(1,1,GAPopulationSize); - u_matrix = reshape(u', 1, M, GAPopulationSize).* ones(p,1); - s_matrix = reshape(s', 1, M, GAPopulationSize).* ones(p,1); - EI_matrix=(f_matrix-u_matrix).*Gaussian_CDF((f_matrix-u_matrix)./s_matrix)+s_matrix.*Gaussian_PDF((f_matrix-u_matrix)./s_matrix); + f_matrix = f .* ones(1,1,GAPopulationSize); + u_matrix = reshape(u', 1, M, GAPopulationSize).* ones(p,1); + s_matrix = reshape(s', 1, M, GAPopulationSize).* ones(p,1); + EI_matrix = (f_matrix-u_matrix).*Gaussian_CDF((f_matrix-u_matrix)./s_matrix)+s_matrix.*Gaussian_PDF((f_matrix-u_matrix)./s_matrix); switch InfillCriterionIndex case 1 % the Euclidean distance-based EI matrix criterion diff --git a/PlatEMO/Algorithms/LSMOF/WeightOptimization.m b/PlatEMO/Algorithms/LSMOF/WeightOptimization.m index 0f7547ab8..a3ef24bc7 100644 --- a/PlatEMO/Algorithms/LSMOF/WeightOptimization.m +++ b/PlatEMO/Algorithms/LSMOF/WeightOptimization.m @@ -14,14 +14,14 @@ % This function is written by Cheng He %% Choose NF solutions as the reference solutions - Reference = max(Population.objs,[],1); + Reference = max(Population.objs,[],1); [RefPop,~,~] = EnvironmentalSelection(Population,wD); %% Calculate the reference directions - lower = Global.lower;upper = Global.upper; - Direction = [sum((RefPop.decs-repmat(lower,wD,1)).^2,2).^(0.5);sum((repmat(upper,wD,1)-RefPop.decs).^2,2).^(0.5)]; - Direct = [(RefPop.decs-repmat(lower,wD,1));(repmat(upper,wD,1)-RefPop.decs)]./repmat(Direction,1,Global.D); - wmax = sum((upper-lower).^2)^(0.5)*0.5; + lower = Global.lower;upper = Global.upper; + Direction = [sum((RefPop.decs-repmat(lower,wD,1)).^2,2).^(0.5);sum((repmat(upper,wD,1)-RefPop.decs).^2,2).^(0.5)]; + Direct = [(RefPop.decs-repmat(lower,wD,1));(repmat(upper,wD,1)-RefPop.decs)]./repmat(Direction,1,Global.D); + wmax = sum((upper-lower).^2)^(0.5)*0.5; %% Optimize the weight variables by DE w0 = rand(N,2*wD).*wmax; % Initialize the population @@ -85,7 +85,7 @@ PopDec = [repmat(w0(i,1:WD)',1,Global.D).*direct(1:WD,:)+repmat(Global.lower,WD,1); repmat(Global.upper,WD,1) - repmat(w0(i,WD+1:end)',1,Global.D).*direct(WD+1:end,:)]; OffWPop = INDIVIDUAL(PopDec); - OffSpring = [OffSpring,OffWPop]; + OffSpring = [OffSpring,OffWPop]; Obj(i) = -HV(OffWPop.objs,Reference); end end \ No newline at end of file diff --git a/PlatEMO/Algorithms/MOEA-D-DAE/ArchiveUpdate.m b/PlatEMO/Algorithms/MOEA-D-DAE/ArchiveUpdate.m new file mode 100644 index 000000000..ed61d55a6 --- /dev/null +++ b/PlatEMO/Algorithms/MOEA-D-DAE/ArchiveUpdate.m @@ -0,0 +1,74 @@ +function Population = ArchiveUpdate(Population,N) +% Update archive + +%------------------------------- Copyright -------------------------------- +% Copyright (c) 2018-2019 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". +%-------------------------------------------------------------------------- + + %% Select feasible solutions + fIndex = all(Population.cons <= 0,2); + Population = Population(fIndex); + if isempty(Population) + return + else + if size(Population.objs,2)==2 + %% Non-dominated sorting + [FrontNo,~] = NDSort(Population.objs,1); + Next = (FrontNo == 1); + Population = Population(Next); + if sum(Next) > N + %% Calculate the crowding distance of each solution + CrowdDis = CrowdingDistance(Population.objs); + [~,Rank] = sort(CrowdDis,'descend'); + Population = Population(Rank(1:N)); + end + else + Population = Population(NDSort(Population.objs,1)==1); + Population = Population(randperm(length(Population))); + PCObj = Population.objs; + nND = length(Population); + %% Population maintenance + if length(Population) > N + % Normalization + fmax = max(PCObj,[],1); + fmin = min(PCObj,[],1); + PCObj = (PCObj-repmat(fmin,nND,1))./repmat(fmax-fmin,nND,1); + % Determine the radius of the niche + d = pdist2(PCObj,PCObj); + d(logical(eye(length(d)))) = inf; + sd = sort(d,2); + r = mean(sd(:,min(3,size(sd,2)))); + R = min(d./r,1); + % Delete solution one by one + while length(Population) > N + [~,worst] = max(1-prod(R,2)); + Population(worst) = []; + R(worst,:) = []; + R(:,worst) = []; + end + end + end + end +end + +function CrowdDis = CrowdingDistance(PopObj) +% Calculate the crowding distance of each solution + + [N,M] = size(PopObj); + CrowdDis = zeros(1,N); + Fmax = max(PopObj,[],1); + Fmin = min(PopObj,[],1); + for i = 1 : M + [~,Rank] = sortrows(PopObj(:,i)); + CrowdDis(Rank(1)) = inf; + CrowdDis(Rank(end)) = inf; + for j = 2 : (N - 1) + CrowdDis(Rank(j)) = CrowdDis(Rank(j))+(PopObj(Rank(j+1),i)-PopObj(Rank(j-1),i))/(Fmax(i)-Fmin(i)); + end + end +end \ No newline at end of file diff --git a/PlatEMO/Algorithms/MOEA-D-DAE/MOEADDAE.m b/PlatEMO/Algorithms/MOEA-D-DAE/MOEADDAE.m new file mode 100644 index 000000000..482f47a26 --- /dev/null +++ b/PlatEMO/Algorithms/MOEA-D-DAE/MOEADDAE.m @@ -0,0 +1,119 @@ +function MOEADDAE(Global) +% +% MOEA/D with detect-and-escape strategy + +%------------------------------- Reference -------------------------------- +% K. Li, Q. Zhang, S. Kwong, M. Li, and R. Wang, A constrained multi- +% objective evolutionary algorithm with detect-and-escape strategy, IEEE +% Transactions on Evolutionary Computation, 2020. +%------------------------------- Copyright -------------------------------- +% Copyright (c) 2018-2019 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". +%-------------------------------------------------------------------------- + + %% Generate the weight vectors + [W,Global.N] = UniformPoint(Global.N,Global.M); + % Size of neighborhood + T = ceil(Global.N/5); + + %% 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); + Pi = ones(Global.N,1); + CP_old = sum(sum(max(Population.cons,0),2)); + avg_fit = sum(max(abs((Population.objs-repmat(z,Global.N,1)).*W),[],2))/Global.N; + epsilon_max = max(sum(max(Population.cons,0),2)); + epsilon = epsilon_max*size(Population.cons,2); + sigma_min = 1-(1/(epsilon+1.0e-10))^(3/Global.maxgen); + current = 0; + A = ArchiveUpdate(Population,Global.N); + gen = 0; + CV = sum(max(Population.cons,0),2); + fr = length(find(CV<=0))/Global.N; + sigma = max(sigma_min,fr); + + %% Optimization + while Global.NotTermination(A) + Q = []; + for subgeneration = 1 : 5 + Bounday = find(sum(W<1e-3,2)==Global.M-1)'; + I = [Bounday,TournamentSelection(10,floor(Global.N/5)-length(Bounday),-Pi)]; + for j = 1 : length(I) + i = I(j); + % Choose the parents + if rand < 0.9 + P = B(i,randperm(size(B,2))); + else + P = randperm(Global.N); + end + if contains(class(Global.problem),'LIRCMOP') || contains(class(Global.problem),'DOC') + Offspring = DE(Population(i),Population(P(1)),Population(P(2))); + else + Offspring = GAhalf(Population(P(1:2))); + end + z = min([z;Offspring.objs],[],1); + [Population,Pi] = UpdatePop(Population,P,Offspring,epsilon,z,W,sigma,Pi,avg_fit); + if current == 1 + tA = UpdatetA(tA,P,Offspring,z,W,avg_fit); + end + if sum(max(Offspring.cons,0),2) == 0 + Q = [Q Offspring]; + end + end + end + gen = gen+1; + CV = sum(max(Population.cons,0),2); + fr = length(find(CV<=0))/Global.N; + sigma = max(sigma_min,fr); + if current==0 || current==2 + if fr < 0.95 + epsilon = (1-sigma)*epsilon; + else + if current == 0 + current = 1; + epsilon = 1e+30; + tA = Population; + gen = 1; + elseif current == 2 + epsilon = epsilon_max; + sigma_min = 1-(1/(epsilon+1.0e-10))^(3/Global.maxgen); + end + end + end + if mod(gen,10) == 0 + CP = sum(sum(max(Population.cons,0))); + ROC = abs(CP-CP_old)/(CP+1e-10); + CP_old = CP; + avg_fit = sum(max(abs((Population.objs-repmat(z,Global.N,1)).*W),[],2))/Global.N; + if current == 0 + if (ROC>0&&ROC<1e-5) && (CP>0.1*epsilon_max) + current = 1; + epsilon = 1e+30; + gen = 1; + tA = Population; + end + elseif current == 1 + if ROC>0 && ROC<1e-5 + current = 2; + Population = tA; + epsilon_max = max(sum(max(Population.cons,0),2)); + epsilon = epsilon_max; + sigma_min = 1-(1/(epsilon+1.0e-10))^(3/Global.maxgen); + z = min(Population.objs,[],1); + end + end + end + if size(Q,2) > 0 + A = ArchiveUpdate([A Q],Global.N); + end + end +end \ No newline at end of file diff --git a/PlatEMO/Algorithms/MOEA-D-DAE/UpdatePop.m b/PlatEMO/Algorithms/MOEA-D-DAE/UpdatePop.m new file mode 100644 index 000000000..b0e3675ad --- /dev/null +++ b/PlatEMO/Algorithms/MOEA-D-DAE/UpdatePop.m @@ -0,0 +1,39 @@ +function [Population,pi] = UpdatePop(Population,P,Offspring,epsilon,z,W,sigma,pi,avg_fit) +% Update population + +%------------------------------- Copyright -------------------------------- +% Copyright (c) 2018-2019 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". +%-------------------------------------------------------------------------- + + c = 0; + nr = 2; + while c~=nr && size(P,2)~=0 + index = randperm(size(P,2)); + i = P(index(1)); + g_o = max(repmat(abs(Offspring.objs-z),1,1).*W(i,:),[],2); + g_pi = max(repmat(abs(Population(i).objs-z),1,1).*W(i,:),[],2); + if (sum(max(Population(i).cons,0),2)<=epsilon) && (sum(max(Offspring.cons,0),2) 0.001 + pi(i) = 1; + else + pi(i) = 0.95+(0.05*delta/0.001)*pi(i); + end + c = c+1; + end + P(index(1)) = []; + end +end \ No newline at end of file diff --git a/PlatEMO/Algorithms/MOEA-D-DAE/UpdatetA.m b/PlatEMO/Algorithms/MOEA-D-DAE/UpdatetA.m new file mode 100644 index 000000000..848ea8baa --- /dev/null +++ b/PlatEMO/Algorithms/MOEA-D-DAE/UpdatetA.m @@ -0,0 +1,27 @@ +function tA = UpdatetA(tA,P,Offspring,z,W,avg_fit) +% Update temparory archive + +%------------------------------- Copyright -------------------------------- +% Copyright (c) 2018-2019 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". +%-------------------------------------------------------------------------- + + c = 0; + nr = 2; + while c~=nr && size(P,2)~=0 + index = randperm(size(P,2)); + i = P(index(1)); + g_o = max(repmat(abs(Offspring.objs-z),1,1).*W(i,:),[],2); + g_pi = max(repmat(abs(tA(i).objs-z),1,1).*W(i,:),[],2); + e = 1/size(tA,2); + if (e*g_o+(1-e)*avg_fit*sum(max(Offspring.cons,0),2))<(e*g_pi+(1-e)*avg_fit*sum(max(tA(i).cons,0),2)) + tA(i) = Offspring; + end + c = c+1; + P(index(1)) = []; + end +end \ No newline at end of file diff --git a/PlatEMO/Algorithms/TiGE-2/._Calculate_fcv.m b/PlatEMO/Algorithms/TiGE-2/._Calculate_fcv.m new file mode 100644 index 000000000..bc085b3ad Binary files /dev/null and b/PlatEMO/Algorithms/TiGE-2/._Calculate_fcv.m differ diff --git a/PlatEMO/Algorithms/TiGE-2/._EnvironmentalSelection.m b/PlatEMO/Algorithms/TiGE-2/._EnvironmentalSelection.m new file mode 100644 index 000000000..bc085b3ad Binary files /dev/null and b/PlatEMO/Algorithms/TiGE-2/._EnvironmentalSelection.m differ diff --git a/PlatEMO/Algorithms/TiGE-2/._Estimation.m b/PlatEMO/Algorithms/TiGE-2/._Estimation.m new file mode 100644 index 000000000..bc085b3ad Binary files /dev/null and b/PlatEMO/Algorithms/TiGE-2/._Estimation.m differ diff --git a/PlatEMO/Algorithms/TiGE-2/._TiGE_2.m b/PlatEMO/Algorithms/TiGE-2/._TiGE_2.m new file mode 100644 index 000000000..bc085b3ad Binary files /dev/null and b/PlatEMO/Algorithms/TiGE-2/._TiGE_2.m differ diff --git a/PlatEMO/Algorithms/TiGE-2/Calculate_fcv.m b/PlatEMO/Algorithms/TiGE-2/Calculate_fcv.m new file mode 100644 index 000000000..d5844770b --- /dev/null +++ b/PlatEMO/Algorithms/TiGE-2/Calculate_fcv.m @@ -0,0 +1,8 @@ +function fcv = Calculate_fcv(Population) +% calculate normalized constraints violation(CV) measuring feasibility + CV_Original=Population.cons; + CV_Original(CV_Original<=0)=0; + CV=CV_Original./max(CV_Original); + CV(:,isnan(CV(1,:))==1)=0; + fcv=sum(max(0,CV),2)./size(CV_Original,2); +end \ No newline at end of file diff --git a/PlatEMO/Algorithms/TiGE-2/EnvironmentalSelection.m b/PlatEMO/Algorithms/TiGE-2/EnvironmentalSelection.m new file mode 100644 index 000000000..dde7ce731 --- /dev/null +++ b/PlatEMO/Algorithms/TiGE-2/EnvironmentalSelection.m @@ -0,0 +1,18 @@ +function [Population,fitness] = EnvironmentalSelection(Population,PopObj,OffObj,N) +% The environmental selection of TiGE_1 + +%------------------------------- Copyright -------------------------------- +% Copyright (c) 2018-2019 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". +%-------------------------------------------------------------------------- + [FrontNo,~] = NDSort([PopObj;OffObj],N); + fcv = Calculate_fcv(Population); % CV of hybrid population + fitness = FrontNo' + fcv./(fcv+1); + [~,index] = sort(fitness); + Population = Population(index(1:N)); + fitness = fitness(index(1:N)); +end \ No newline at end of file diff --git a/PlatEMO/Algorithms/TiGE-2/Estimation.m b/PlatEMO/Algorithms/TiGE-2/Estimation.m new file mode 100644 index 000000000..a677acbeb --- /dev/null +++ b/PlatEMO/Algorithms/TiGE-2/Estimation.m @@ -0,0 +1,31 @@ +function [fpr,fcd] = Estimation(PopObj,r) +% Estimate the proximity and crowding degree of each solution + +%------------------------------- Copyright -------------------------------- +% Copyright (c) 2018-2019 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". +%-------------------------------------------------------------------------- + + N = size(PopObj,1); + + %% Proximity estimation + fmax = repmat(max(PopObj,[],1),N,1); + fmin = repmat(min(PopObj,[],1),N,1); + PopObj = (PopObj-fmin)./(fmax-fmin); + fpr = sum(PopObj,2); + + %% Crowding degree estimation + d = pdist2(PopObj,PopObj); + d(logical(eye(length(d)))) = inf; + fprm = repmat(fpr,1,N); + case1 = dfprm'; + sh = zeros(N); + sh(case1) = (0.5*(1-d(case1)/r)).^2; + sh(case2) = (1.5*(1-d(case2)/r)).^2; + fcd = sqrt(sum(sh,2)); +end \ No newline at end of file diff --git a/PlatEMO/Algorithms/TiGE-2/TiGE_2.m b/PlatEMO/Algorithms/TiGE-2/TiGE_2.m new file mode 100644 index 000000000..0b48b6261 --- /dev/null +++ b/PlatEMO/Algorithms/TiGE-2/TiGE_2.m @@ -0,0 +1,46 @@ +function TiGE_2(Global) +% +% Tri-Goal Evolution Framework for CMaOPs + +%------------------------------- Reference -------------------------------- +% Y. Zhou, Z. Min, J. Wang, Z. Zhang, and J.Zhang, Tri-goal evolution +% framework for constrained many-objective optimization, IEEE Transactions +% on Systems Man and Cybernetics Systems, 2018. +%------------------------------- Copyright -------------------------------- +% Copyright (c) 2018-2019 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". +%-------------------------------------------------------------------------- + + [Epsilon0,row] = Global.ParameterSet(0.05,1.01); + %% Generate random population + Population = Global.Initialization(); + [fpr,fcd] = Estimation(Population.objs,1/Global.N^(1/Global.M)); + fcv = Calculate_fcv(Population); + Epsilon = Epsilon0; + PopObj_1 = [fpr,fcd]; + [fm,~] = NDSort(PopObj_1,Global.N); + PopObj = [fm' + Epsilon * fcv,fcv]; + [frank,~] = NDSort(PopObj,Global.N); + fitness = frank' + fcv./(fcv+1); + %% Optimization + while Global.NotTermination(Population) + MatingPool = TournamentSelection(2,Global.N,fitness); + Offspring = GA(Population(MatingPool)); + [fpr,fcd] = Estimation(Offspring.objs,1/Global.N^(1/Global.M)); + fcv = Calculate_fcv(Offspring); + OffObj_1 = [fpr,fcd]; + [fm,~] =NDSort(OffObj_1,Global.N); + OffObj = [fm' + Epsilon * fcv,fcv]; + [Population,fitness] = EnvironmentalSelection([Population,Offspring],PopObj,OffObj,Global.N); + [fpr,fcd] = Estimation(Population.objs,1/Global.N^(1/Global.M)); + fcv = Calculate_fcv(Population); + PopObj_1 = [fpr,fcd]; + [fm,~] =NDSort(PopObj_1,Global.N); + PopObj = [fm' + Epsilon * fcv,fcv]; + Epsilon = row * Epsilon; + end +end \ No newline at end of file diff --git a/PlatEMO/GUI/Modules/GUI.m b/PlatEMO/GUI/Modules/GUI.m index 22bf8edd9..8268f57c2 100644 --- a/PlatEMO/GUI/Modules/GUI.m +++ b/PlatEMO/GUI/Modules/GUI.m @@ -28,7 +28,7 @@ % Read the function lists obj.readList(); % Create the figure - obj.figure = newFigure([0 0 1200 650],'PlatEMO v2.7'); + obj.figure = newFigure([0 0 1200 650],'PlatEMO v2.8'); % Create the menu obj.menu = newTab(obj.figure,[0 551 1202 100,1 1 0 1],{'Modules','Help'}); obj.figure.busy = false; diff --git a/PlatEMO/Problems/DASCMOP/DASCMOP1.m b/PlatEMO/Problems/DAS-CMOP/DASCMOP1.m similarity index 100% rename from PlatEMO/Problems/DASCMOP/DASCMOP1.m rename to PlatEMO/Problems/DAS-CMOP/DASCMOP1.m diff --git a/PlatEMO/Problems/DASCMOP/DASCMOP2.m b/PlatEMO/Problems/DAS-CMOP/DASCMOP2.m similarity index 100% rename from PlatEMO/Problems/DASCMOP/DASCMOP2.m rename to PlatEMO/Problems/DAS-CMOP/DASCMOP2.m diff --git a/PlatEMO/Problems/DASCMOP/DASCMOP3.m b/PlatEMO/Problems/DAS-CMOP/DASCMOP3.m similarity index 100% rename from PlatEMO/Problems/DASCMOP/DASCMOP3.m rename to PlatEMO/Problems/DAS-CMOP/DASCMOP3.m diff --git a/PlatEMO/Problems/DASCMOP/DASCMOP4.m b/PlatEMO/Problems/DAS-CMOP/DASCMOP4.m similarity index 100% rename from PlatEMO/Problems/DASCMOP/DASCMOP4.m rename to PlatEMO/Problems/DAS-CMOP/DASCMOP4.m diff --git a/PlatEMO/Problems/DASCMOP/DASCMOP5.m b/PlatEMO/Problems/DAS-CMOP/DASCMOP5.m similarity index 100% rename from PlatEMO/Problems/DASCMOP/DASCMOP5.m rename to PlatEMO/Problems/DAS-CMOP/DASCMOP5.m diff --git a/PlatEMO/Problems/DASCMOP/DASCMOP6.m b/PlatEMO/Problems/DAS-CMOP/DASCMOP6.m similarity index 100% rename from PlatEMO/Problems/DASCMOP/DASCMOP6.m rename to PlatEMO/Problems/DAS-CMOP/DASCMOP6.m diff --git a/PlatEMO/Problems/DASCMOP/DASCMOP7.m b/PlatEMO/Problems/DAS-CMOP/DASCMOP7.m similarity index 100% rename from PlatEMO/Problems/DASCMOP/DASCMOP7.m rename to PlatEMO/Problems/DAS-CMOP/DASCMOP7.m diff --git a/PlatEMO/Problems/DASCMOP/DASCMOP8.m b/PlatEMO/Problems/DAS-CMOP/DASCMOP8.m similarity index 100% rename from PlatEMO/Problems/DASCMOP/DASCMOP8.m rename to PlatEMO/Problems/DAS-CMOP/DASCMOP8.m diff --git a/PlatEMO/Problems/DASCMOP/DASCMOP9.m b/PlatEMO/Problems/DAS-CMOP/DASCMOP9.m similarity index 100% rename from PlatEMO/Problems/DASCMOP/DASCMOP9.m rename to PlatEMO/Problems/DAS-CMOP/DASCMOP9.m diff --git a/PlatEMO/Problems/LIRCMOP/LIRCMOP1.m b/PlatEMO/Problems/LIR-CMOP/LIRCMOP1.m similarity index 100% rename from PlatEMO/Problems/LIRCMOP/LIRCMOP1.m rename to PlatEMO/Problems/LIR-CMOP/LIRCMOP1.m diff --git a/PlatEMO/Problems/LIRCMOP/LIRCMOP10.m b/PlatEMO/Problems/LIR-CMOP/LIRCMOP10.m similarity index 100% rename from PlatEMO/Problems/LIRCMOP/LIRCMOP10.m rename to PlatEMO/Problems/LIR-CMOP/LIRCMOP10.m diff --git a/PlatEMO/Problems/LIRCMOP/LIRCMOP11.m b/PlatEMO/Problems/LIR-CMOP/LIRCMOP11.m similarity index 100% rename from PlatEMO/Problems/LIRCMOP/LIRCMOP11.m rename to PlatEMO/Problems/LIR-CMOP/LIRCMOP11.m diff --git a/PlatEMO/Problems/LIRCMOP/LIRCMOP12.m b/PlatEMO/Problems/LIR-CMOP/LIRCMOP12.m similarity index 97% rename from PlatEMO/Problems/LIRCMOP/LIRCMOP12.m rename to PlatEMO/Problems/LIR-CMOP/LIRCMOP12.m index cef474386..2045137b8 100644 --- a/PlatEMO/Problems/LIRCMOP/LIRCMOP12.m +++ b/PlatEMO/Problems/LIR-CMOP/LIRCMOP12.m @@ -61,7 +61,7 @@ end %% Sample reference points on Pareto front function P = PF(obj,N) - P = [1.6794,0.4419;1.3258,0.7955;0.9723,1.1490; + P = [1.6794,0.4419;1.3258,0.7955;0.9723,1.1490;2.0320,0.0990; 0.6187,1.5026;0.2652,1.8562;0,2.2580;2.5690,0]; end end diff --git a/PlatEMO/Problems/LIRCMOP/LIRCMOP13.m b/PlatEMO/Problems/LIR-CMOP/LIRCMOP13.m similarity index 100% rename from PlatEMO/Problems/LIRCMOP/LIRCMOP13.m rename to PlatEMO/Problems/LIR-CMOP/LIRCMOP13.m diff --git a/PlatEMO/Problems/LIRCMOP/LIRCMOP14.m b/PlatEMO/Problems/LIR-CMOP/LIRCMOP14.m similarity index 100% rename from PlatEMO/Problems/LIRCMOP/LIRCMOP14.m rename to PlatEMO/Problems/LIR-CMOP/LIRCMOP14.m diff --git a/PlatEMO/Problems/LIRCMOP/LIRCMOP2.m b/PlatEMO/Problems/LIR-CMOP/LIRCMOP2.m similarity index 100% rename from PlatEMO/Problems/LIRCMOP/LIRCMOP2.m rename to PlatEMO/Problems/LIR-CMOP/LIRCMOP2.m diff --git a/PlatEMO/Problems/LIRCMOP/LIRCMOP3.m b/PlatEMO/Problems/LIR-CMOP/LIRCMOP3.m similarity index 100% rename from PlatEMO/Problems/LIRCMOP/LIRCMOP3.m rename to PlatEMO/Problems/LIR-CMOP/LIRCMOP3.m diff --git a/PlatEMO/Problems/LIRCMOP/LIRCMOP4.m b/PlatEMO/Problems/LIR-CMOP/LIRCMOP4.m similarity index 100% rename from PlatEMO/Problems/LIRCMOP/LIRCMOP4.m rename to PlatEMO/Problems/LIR-CMOP/LIRCMOP4.m diff --git a/PlatEMO/Problems/LIRCMOP/LIRCMOP5.m b/PlatEMO/Problems/LIR-CMOP/LIRCMOP5.m similarity index 100% rename from PlatEMO/Problems/LIRCMOP/LIRCMOP5.m rename to PlatEMO/Problems/LIR-CMOP/LIRCMOP5.m diff --git a/PlatEMO/Problems/LIRCMOP/LIRCMOP6.m b/PlatEMO/Problems/LIR-CMOP/LIRCMOP6.m similarity index 100% rename from PlatEMO/Problems/LIRCMOP/LIRCMOP6.m rename to PlatEMO/Problems/LIR-CMOP/LIRCMOP6.m diff --git a/PlatEMO/Problems/LIRCMOP/LIRCMOP7.m b/PlatEMO/Problems/LIR-CMOP/LIRCMOP7.m similarity index 100% rename from PlatEMO/Problems/LIRCMOP/LIRCMOP7.m rename to PlatEMO/Problems/LIR-CMOP/LIRCMOP7.m diff --git a/PlatEMO/Problems/LIRCMOP/LIRCMOP8.m b/PlatEMO/Problems/LIR-CMOP/LIRCMOP8.m similarity index 100% rename from PlatEMO/Problems/LIRCMOP/LIRCMOP8.m rename to PlatEMO/Problems/LIR-CMOP/LIRCMOP8.m diff --git a/PlatEMO/Problems/LIRCMOP/LIRCMOP9.m b/PlatEMO/Problems/LIR-CMOP/LIRCMOP9.m similarity index 100% rename from PlatEMO/Problems/LIRCMOP/LIRCMOP9.m rename to PlatEMO/Problems/LIR-CMOP/LIRCMOP9.m diff --git a/PlatEMO/Problems/MW/MW5.m b/PlatEMO/Problems/MW/MW5.m index 3b20a1161..fee17ecf6 100644 --- a/PlatEMO/Problems/MW/MW5.m +++ b/PlatEMO/Problems/MW/MW5.m @@ -45,7 +45,7 @@ end %% Sample reference points on Pareto front function P = PF(obj,N) - P = [0 1;0.3922 0.9199;0.4862 0.8739;0.5490 0.8358;0.5970 0.8023;0.6359 0.7719;0.6969 0.7174]; + P = [0 1;0.3922 0.9199;0.4862 0.8739;0.5490 0.8358;0.5970 0.8023;0.6359 0.7719;0.6686 0.7436;0.6969 0.7174]; P = [P;flip(P,2)]; end end diff --git a/PlatEMO/Problems/MW/MW9.m b/PlatEMO/Problems/MW/MW9.m index c9e86892a..c8bfde918 100644 --- a/PlatEMO/Problems/MW/MW9.m +++ b/PlatEMO/Problems/MW/MW9.m @@ -40,7 +40,7 @@ T1 = (1-0.64*PopObj(:,1).^2-PopObj(:,2)).*(1-0.36*PopObj(:,1).^2-PopObj(:,2)); T2 = 1.35.^2 - (PopObj(:,1)+0.35).^2 - PopObj(:,2); T3 = 1.15.^2 - (PopObj(:,1)+0.15).^2 - PopObj(:,2); - PopCon = min(min(T1,T2),T3); + PopCon = min(T1,T2.*T3); end %% Sample reference points on Pareto front function P = PF(obj,N) @@ -49,13 +49,13 @@ T1 = (1-0.64*P(:,1).^2-P(:,2)).*(1-0.36*P(:,1).^2-P(:,2)); T2 = 1.35.^2 - (P(:,1)+0.35).^2 - P(:,2); T3 = 1.15.^2 - (P(:,1)+0.15).^2 - P(:,2); - invalid = min(min(T1,T2),T3) > 0; + invalid = min(T1,T2.*T3) > 0; while any(invalid) P(invalid,:) = P(invalid,:).*1.001; T1 = (1-0.64*P(:,1).^2-P(:,2)).*(1-0.36*P(:,1).^2-P(:,2)); T2 = 1.35.^2 - (P(:,1)+0.35).^2 - P(:,2); T3 = 1.15.^2 - (P(:,1)+0.15).^2 - P(:,2); - invalid = min(min(T1,T2),T3) > 0; + invalid = min(T1,T2.*T3) > 0; end P = P(NDSort(P,1)==1,:); end diff --git a/README.md b/README.md index add84b34e..917d8b752 100644 --- a/README.md +++ b/README.md @@ -35,15 +35,14 @@ following literature: pages={73--87}, year={2017}, } -``` +``` -# Release Highlights of PlatEMO 2.7 +# Release Highlights of PlatEMO 2.8 [Release Note can be found here](./Doc/releasenote.md) -* Add two algorithms for large-scale optimization, i.e., GLMO and LCSA. There are currently 114 algorithms in the platform. +* Add three algorithms for constrained optimization (i.e., CCMO, MOEA/D-DAE, and TiGE-2) and an algorithm for many-objective optimization (i.e., PREA). There are currently 118 algorithms in the platform. -* Add four sparse multi-objective optimization problems, i.e., community detection, instance selection, portfolio optimization, and sparse signal reconstruction. +* Fix some minor bugs in the Pareto front sampling methods in LIR-CMOP and MW problems. -* Add six constrained DTLZ problems, i.e., DC-DTLZ. There are currently 217 problems in the platform. # Features of PlatEMO * Totally Developed in MATLAB @@ -65,7 +64,7 @@ Users can save the statistical experimental results generated by PlatEMO as an E * [**recommend**] You can ask any question in [issues block](https://github.com/BIMK/PlatEMO/issues) and upload your contribution by pulling request(PR). * If you want to add your MOEA, MOP, operator or performance indicator to PlatEMO, please send the MATLAB code (able to be used in PlatEMO) and the relevant literature to field910921@gmail.com. * If you have any question, comment or suggestion to PlatEMO or the algorithms in PlatEMO, please contact Ye Tian (field910921@gmail.com) or join the group of QQ(Group number: 100065008). - + # Acknowledge