-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathReadme
181 lines (156 loc) · 8.25 KB
/
Readme
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
This is the Readme file for NSGA-III, A-NSGA-III and A^2-NSGA-III codes. A NSGA-II extension from
Kanpur the Genetic Algorithms Laboratory (KanGAL).
The NSGA-III, A-NSGA-III and A^2-NSGA-III extension was coded by Luis Felipe Ariza Vesga.
Email: [email protected]
About the Algorithm
--------------------------------------------------------------------------
NSGA-II: Non-dominated Sorting Genetic Algorithm - II and
NSGA-III: Non-dominated Sorting Genetic Algorithm - III
Please refer to the following papers for details about the algorithm:
Authors: Dr. Kalyanmoy Deb, Sameer Agrawal, Amrit Pratap, T Meyarivan
Paper Title: A Fast and Elitist multi-objective Genetic Algorithm: NSGA-II
Journal: IEEE Transactions on Evolutionary Computation (IEEE-TEC)
Year: 2002
Volume: 6
Number: 2
Pages: 182-197
Authors: Dr. Kalyanmoy Deb, and H. Jain
Paper Title: An Evolutionary Many-Objective Optimization Algorithm Using
Reference-Point-Based Nondominated Sorting Approach, Part I: Solving Problems
With Box Constraints
Journal: IEEE Transactions on Evolutionary Computation (IEEE-TEC)
Year: 2014
Volume: 18
Number: 4
Pages: 577-601
Authors: Dr. Kalyanmoy Deb, and H. Jain
Paper Title: An Evolutionary Many-Objective Optimization Algorithm Using
Reference-Point Based Nondominated Sorting Approach, Part II: Handling
Constraints and Extending to an Adaptive Approach
Journal: IEEE Transactions on Evolutionary Computation (IEEE-TEC)
Year: 2014
Volume: 18
Number: 4
Pages: 602-622
Authors: Dr. Kalyanmoy Deb, and H. Jain
Paper Title: An Improved Adaptive Approach for Elitist Nondominated Sorting
Genetic Algorithm for Many-Objective Optimization
Journal: COIN Report Number 2013014
Year: 2013
---------------------------------------------------------------------------
---------------------------------------------------------------------------
NOTE: This archive contains routines for ploting the objective data realtime
using gnuplot. The code has been written for posix compliant operating systems
and uses standard piping method provided by GNU C library. The routines should
work on any unix and unix like OS having gnuplot installed and which are posix
compliant.
---------------------------------------------------------------------------
How to compile and run the program
---------------------------------------------------------------------------
Makefile has been provided for compiling the program on linux (and unix-like)
systems. Edit the Makefile to suit your need. By default, provided Makefile
attempts to compile and link all the existing source files into one single
executable.
Name of the executable produced is: nsga2r
To run the program type: ./nsga2r random_seed
Here random_seed is a real number in (0,1) which is used as a seed for random
number generator.
You can also store all the input data in a text file and use a redirection
operator to give the inputs to the program in a convenient way.
You may use the following syntax: ./nsga2r random_seed <inp_file.in, where
"inp_file.in" is the file that stores all the input parameters
---------------------------------------------------------------------------
About the output files
---------------------------------------------------------------------------
initial_pop.out: This file contains all the information about initial population.
final_pop.out: This file contains the data of final population.
all_pop.out: This file containts the data of populations at all generations.
best_pop.out: This file contains the best solutions obtained at the end of simulation run.
params.out: This file contains the information about input parameters as read by the program.
---------------------------------------------------------------------------
About the input parameters
---------------------------------------------------------------------------
adaptive_nsga: 2 --> A^2 NSGA-III, 1 --> A NSGA-III, 0 --> NSGA-III"
popsize: This variable stores the population size (a multiple of 4)
ngen: Number of generations
nobj: Number of objectives
ncon: Number of inequality constraints
neqcon: Number of equality constraints
nreal: Number of real variables
min_realvar[i]: minimum value of i^{th} real variable
max_realvar[i]: maximum value of i^{th} real variable
pcross_real: probability of crossover of real variable
pmut_real: probability of mutation of real variable
eta_c: distribution index for real variable SBX crossover
eta_m: distribution index for real variable polynomial mutation
nbin: number of binary variables
nbits[i]: number of bits for i^{th} binary variable
min_binvar[i]: minimum value of i^{th} binary variable
max_binvar[i]: maximum value of i^{th} binary variable
pcross_bin: probability of crossover for binary variable
pmut_bin: probability of mutation for binary variable
choice: option to display the data realtime using gnuplot
obj1, obj2, obj3: index of objectives to be shown on x, y and z axes respectively
angle1, angle2: polar and azimuthal angle required for location of eye
---------------------------------------------------------------------------
Defining the Test Problem
---------------------------------------------------------------------------
Edit the source file problemdef.c to define your test problem. Some sample
problems (24 test problems from Dr. Deb's book - Multi-Objective Optimization
using Evolutionary Algorithms) have been provided as examples to guide you
define your own objective and constraint functions. You can also link other
source files with the code depending on your need.
Following points are to be kept in mind while writing objective and constraint
functions.
1. The code has been written for minimization of objectives (min f_i). If you want to
maximize a function, you may use negetive of the function value as the objective value.
2. A solution is said to be feasible if it does not violate any of the constraints.
Constraint functions should evaluate to a quantity greater than or equal to zero
(g_j >= 0), if the solution has to be feasible. A negetive value of constraint means,
it is being violated.
3. If there are more than one constraints, it is advisable (though not mandatory)
to normalize the constraint values by either reformulating them or dividing them
by a positive non-zero constant.
---------------------------------------------------------------------------
About the files
---------------------------------------------------------------------------
global.h: Header file containing declaration of global variables and functions
rand.h: Header file containing declaration of variables and functions for random
number generator
allocate.c: Memory allocation and deallocation routines
auxiliary.c: auxiliary routines (not part of the algorithm)
crossover.c: Routines for real and binary crossover
crowddist.c: Crowding distance assignment routines
decode.c: Routine to decode binary variables
display.c: Routine to display the data realtime using gnuplot
dominance.c: Routine to perofrm non-domination checking
eval.c: Routine to evaluate constraint violation
fillnds.c: Non-dominated sorting based selection
initialize.c: Routine to perform random initialization to population members
list.c: A custom doubly linked list implementation
merge.c: Routine to merge two population into one larger population
mutation.c: Routines for real and binary mutation
nsga2r.c: Implementation of main function and the NSGA-II framework
problemdef.c: Test problem definitions
rand.c: Random number generator related routines
rank.c: Rank assignment routines
report.c: Routine to write the population information in a file
sort.c: Randomized quick sort implementation
tourselect.c: Tournament selection routine
referencepoints.c: Reference points implementation
metris.c: Inverted Generational Distace (IGD)
---------------------------------------------------------------------------
Please feel free to send questions/comments/doubts/suggestions/bugs
etc. to [email protected] about NSGA-II to
Dr. Kalyanmoy Deb
14th June 2005
http://www.iitk.ac.in/kangal/
---------------------------------------------------------------------------
Please feel free to send questions/comments/doubts/suggestions/bugs
etc about NSGA-III A-NSGA-III and A^2-NSGA-III to
Luis Felipe Ariza Vesga
17th Apr 2019
Some videos on Youtube: https://www.youtube.com/channel/UCMgWIVOV9bJtIfIxQOYhOuw
---------------------------------------------------------------------------