-
Notifications
You must be signed in to change notification settings - Fork 523
Expand file tree
/
Copy pathAGEA.m
More file actions
56 lines (51 loc) · 2.74 KB
/
AGEA.m
File metadata and controls
56 lines (51 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
classdef AGEA < ALGORITHM
% <multi> <real/binary/permutation>
% Adaptive grid based evolutionary algorithm
% limit --- 1 --- limit output solutions number to N (1. limit 0. no limit)
% div --- 10 --- initial number of grid divisions
%------------------------------- Reference --------------------------------
% Z. Liu, F. Han, Q. Ling, H. Han, J. Jiang, and Q. Liu, A multi-objective
% evolutionary algorithm based on a grid with adaptive divisions for
% multi-objective optimization with irregular Pareto fronts, Applied Soft
% Computing, 2025, 176: 113106.
%------------------------------- Copyright --------------------------------
% Copyright (c) 2024 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".
%--------------------------------------------------------------------------
% This function is written by Zhe Liu
methods
function main(Algorithm,Problem)
%% Parameter setting
[limit, div]= Algorithm.ParameterSet(1, 10);
%% Generate random population
Population = Problem.Initialization();
Grid = Population;
zmin = min(Population.objs,[],1);
zmax = max(max(Population.objs, [], 1), zmin + 1e-10);
gmax = zmax;
while Algorithm.NotTerminated(Grid)
%% Optimization
MatingPool = randperm(length(Population));
Offspring = OperatorGA(Problem, Population(MatingPool));
Population = [Grid, Offspring];
[FrontNo, ~] = NDSort(roundn(Population.objs, -10), Problem.N);
Grid = Population(FrontNo ~= inf);
NDPop = Population(FrontNo == 1);
zmin = min(zmin, min(Grid.objs,[],1));
gmax = GridStabilization(NDPop, zmin, gmax, div);
[Grid, GridIndex, div] = GridAdaptiveAdjustment(Grid, zmin, gmax, div, Problem.N);
Population = PopulationReselection(Grid, GridIndex, Problem.N);
%% limit output solutions number to N
if limit ~= 0 && length(Grid) > Problem.N
if Problem.FE >= Problem.maxFE
Grid = EnvironmentalSelection_SPEA2(Grid, Problem.N);
end
end
end
end
end
end